# getCounterpartyInfo

**POST /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
    },
    ...
]
```

{% 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.                                                                                                                                                                           |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://faq.finerymarkets.com/api-reference/rest-api/client-management/getcounterpartyinfo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
