> ## 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 Order Book Access

> Read who may trade on a book, and whether a wallet is admitted

Returns the book's access settings: the delivery mode, the buyer and seller gates, and how a refused wallet is onboarded. Name a wallet to learn whether it may buy and sell, and how it gets admitted if not. See [Access module](https://docs.trusset.org/endpoints/external-securities-trading/introduction.md#access-module).

The gates are read live from the custody contract for the book's settlement operator, so the answer is what a settlement would enforce right now. Works on books you own and books you have imported.

## Path Parameters

**orderBookId** `string` *required*

Order book ID.

## Query Parameters

**wallet** `string`

Wallet to check. Omit for the settings only.

## Response Fields

**data** `object`

**orderBookId** `string`

Order book ID.

**supported** `boolean`

Whether the book's custody contract carries the access module. False on generation 1, where no gates exist. The wallet check still runs there: a buyer must be verified on the security's identity registry, and a seller is always admitted.

**generation** `integer`

Custody contract generation: `1` or `2`.

**deliveryMode** `string`

`AGENT` or `TRANSFER`, or `null` when the security is not registered.

**tokenIdentityRegistry** `string`

The security's own identity registry, or `null` when it has none.

**buyer** `object`

The buyer gate.

**gate** `string`

The gate saved for the book, or the one on chain when none is saved. `null` for none.

**onChainGate** `string`

The gate on chain for the settlement operator, or `null`.

**profile** `object`

Owning instance only. The verification profile behind the gate: `key`, `name`, `entityType`, `professionalOnly` and `requirementsHash`, or only `key`. `null` when the gate is not a profile register.

**accessList** `object`

Owning instance only. The whitelist behind the gate: `id`, `name`, `purpose`, `address`, `ownerWallet` and `own`, or only `id`. `null` when the gate is not a whitelist.

**seller** `object`

The seller gate, same shape as `buyer`.

**onboarding** `object`

**mode** `string`

`NONE`, `VERIFICATION_SERVICE`, `ID_LINK` or `INTEGRATION`.

**url** `string`

The venue's own onboarding page in `INTEGRATION` mode, otherwise `null`.

**inSync** `boolean`

Whether the gates on chain match the ones saved for the book. Always true on generation 1.

**buyerGateRequired** `boolean`

True when the security has no identity registry, so the book needs a buyer gate before anyone can buy.

**wallet** `object`

Present only when `wallet` was supplied.

**address** `string`

The wallet, lower-cased.

**buy** `object`

`admitted`, `code` and `reason`. `code` is `0` when admitted, otherwise the check that refused it, as listed on [Submit Order](https://docs.trusset.org/endpoints/external-securities-trading/submit-order.md#access-refusals).

**sell** `object`

Same shape, for selling.

**remedy** `object`

How the wallet gets admitted, when it is refused by the identity registry or a gate and the book names an onboarding route. Same shape as on [Submit Order](https://docs.trusset.org/endpoints/external-securities-trading/submit-order.md#access-refusals).

```bash cURL theme={null}
curl "https://api.trusset.org/orderbooks/external-securities/api/order-books/clx_ob_extsec_001/access?wallet=0xabc7f1093d5e26b804a1c3f78de025916b47c0d3" \
  -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}/access?wallet=${wallet}`,
  { headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();

if (!data.wallet.buy.admitted && data.wallet.remedy?.url) {
  window.open(data.wallet.remedy.url, '_blank', 'noopener');
}
```

```json Response theme={null}
{
  "success": true,
  "data": {
    "orderBookId": "clx_ob_extsec_001",
    "supported": true,
    "generation": 2,
    "deliveryMode": "AGENT",
    "tokenIdentityRegistry": "0x2d7f9c3a6b81e05f4ad927c1b36e8f05a4c19d72",
    "buyer": {
      "gate": "0x8e3b17ad0c94f25e6b7a1d38c05f92e4b6a73c15",
      "onChainGate": "0x8e3b17ad0c94f25e6b7a1d38c05f92e4b6a73c15"
    },
    "seller": { "gate": null, "onChainGate": null },
    "onboarding": { "mode": "INTEGRATION", "url": "https://onboarding.example.com/investors" },
    "inSync": true,
    "buyerGateRequired": false,
    "wallet": {
      "address": "0xabc7f1093d5e26b804a1c3f78de025916b47c0d3",
      "buy": { "admitted": false, "code": 16, "reason": "This wallet is not admitted to buy on this order book." },
      "sell": { "admitted": true, "code": 0, "reason": null },
      "remedy": { "kind": "ONBOARD", "url": "https://onboarding.example.com/investors" }
    }
  }
}
```

## Error Codes

| Code | HTTP | Cause |
| - | - | - |
| `VALIDATION_ERROR` | `400` | `wallet` is not an address |
| `ORDER_BOOK_NOT_FOUND` | `404` | The book does not exist, is not reachable, or is not an external securities book |
| `CHAIN_UNAVAILABLE` | `503` | The custody contract or the token could not be read |
| `SERVICE_NOT_ENABLED` | `403` | The Trading service is not enabled on this instance |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.