> For the complete documentation index, see [llms.txt](https://faq.finerymarkets.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://faq.finerymarkets.com/api-reference/rest-api/client-management/getcounterpartyinfo.md).

# getCounterpartyInfo

**POST api/getCounterpartyInfo**<br>

{% tabs %}
{% tab title="Payload" %}

```json
{
    "counterpartyId": 5 // Optional
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
[
    {
        "clientId": 5,
        "clientType": "taker",
        "username": "Some User",
        "subaccount": true,
        "status": "connected",
        "disabled": false,
        "internal": false
    },
    ...
]
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
  "error": 0
}
```

{% endtab %}
{% endtabs %}

**Request parameters**

| Field name     | Type          | Description                                                                                                                      |
| -------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| counterpartyId | Efx::ClientId | *Optional.* The FM ID of the counterparty whose information is to be fetched. If omitted, all known counterparties are returned. |

**Response description**

| Field name | Type          | Description                                                                                                                                                                                                                                             |
| ---------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| clientId   | Efx::ClientId | Id of the connected client                                                                                                                                                                                                                              |
| clientType | string        | Type of the connected client: "maker", "taker" or "master"                                                                                                                                                                                              |
| username   | string        | *Optional.* Username of the counterparty. Visible only if the counterparty sent or accepted a connection request.                                                                                                                                       |
| subaccount | bool          | *Optional.* True and present only if the counterparty is a subaccount.                                                                                                                                                                                  |
| status     | string        | <p>Connection status:<br>"connected" - connection request has been accepted.<br>"invite\_sent" - you have sent an invitation to connect, but it has not been accepted yet.<br>"invite\_pending" - a counterparty sent you an invitation to connect.</p> |
| disabled   | bool          | True if the client is disabled. Trading is not allowed with disabled clients.                                                                                                                                                                           |
| internal   | bool          | *Optional.* Present only if the couterparty is a subaccount. True if the subaccount is internal.                                                                                                                                                        |
