> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trusset.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Shared Peers

> List the books this one pools depth with

Returns the books whose depth this book matches against, beyond its own. See [Shared liquidity](/endpoints/external-securities-trading/introduction#shared-liquidity).

A book that has not opted in reports `enabled: false` and an empty peer set. A book that has opted in but has no eligible counterpart reports `enabled: true` with `peerCount: 0`. The first is a configuration choice, the second means nothing matched.

Eligibility keys on the instrument identifier recorded on the custody contract, together with the same token address, settlement asset, custody contract and network, with both sides opted in and `ACTIVE`. A book with no identifier can never pool. The result is cached for 30 seconds and refreshed when a book's status or pooling flag changes.

## Path Parameters

<ParamField path="orderBookId" type="string" required>Order book ID.</ParamField>

## Response Fields

<ResponseField name="data" type="object">
  <Expandable>
    <ResponseField name="enabled" type="boolean">Whether this book opted into pooling.</ResponseField>
    <ResponseField name="peerCount" type="integer">Number of eligible peers, excluding this book.</ResponseField>
    <ResponseField name="peerIds" type="array">Peer order book IDs.</ResponseField>

    <ResponseField name="peers" type="array">
      <Expandable>
        <ResponseField name="id" type="string">Peer order book ID.</ResponseField>
        <ResponseField name="instanceId" type="string">Instance that owns the peer.</ResponseField>
        <ResponseField name="name" type="string">Peer display name.</ResponseField>
        <ResponseField name="symbol" type="string">Peer display symbol.</ResponseField>
        <ResponseField name="tokenAddress" type="string">Peer security token.</ResponseField>
        <ResponseField name="quoteTokenAddress" type="string">Peer settlement asset.</ResponseField>
        <ResponseField name="custodyContract" type="string">Peer custody contract.</ResponseField>
        <ResponseField name="tokenType" type="string">`EXTERNAL_SECURITY`.</ResponseField>
        <ResponseField name="status" type="string">Peer status.</ResponseField>
        <ResponseField name="underlyingIdentifier" type="string">The identifier the pooling keys on.</ResponseField>
        <ResponseField name="cfid" type="string">`null` on this venue.</ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<Note>
  A fill against a peer settles in the same transaction as any other fill, because eligibility guarantees both sides sit on the same custody contract and the same token. The settlement is signed by the owner of the maker's book.
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.trusset.org/orderbooks/external-securities/api/order-books/clx_ob_extsec_001/shared-peers" \
    -H "X-API-Key: trusset_your_key_here"
  ```

  ```typescript TypeScript theme={null}
  const res = await fetch(
    `https://api.trusset.org/orderbooks/external-securities/api/order-books/${orderBookId}/shared-peers`,
    { headers: { 'X-API-Key': 'trusset_your_key_here' } }
  );
  const { data } = await res.json();
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "enabled": true,
      "peerCount": 1,
      "peerIds": ["clx_ob_extsec_088"],
      "peers": [
        {
          "id": "clx_ob_extsec_088",
          "instanceId": "inst_partner_9",
          "name": "Helvetia Growth Fund",
          "symbol": "HELG",
          "tokenAddress": "0x51f2b9d0e77c4a1b83ce6d4a9271e5f3a0c8b912",
          "quoteTokenAddress": "0x98ad0ca091552e23c564b41c74282e5343d03e8a",
          "custodyContract": "0x489aee4ae9546081d55848f157e03192e826988c",
          "tokenType": "EXTERNAL_SECURITY",
          "status": "ACTIVE",
          "underlyingIdentifier": "CH0012032048",
          "cfid": null
        }
      ]
    }
  }
  ```
</ResponseExample>

## Error Codes

| Code                   | HTTP  | Cause                                               |
| ---------------------- | ----- | --------------------------------------------------- |
| `ORDER_BOOK_NOT_FOUND` | `404` | No such book on this instance, and not imported     |
| `SERVICE_NOT_ENABLED`  | `403` | The Trading service is not enabled on this instance |
