> ## 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.

# Import Order Book

> Add another instance's published security book to your venue

Imports a book another instance published, so your instance can read it and route orders to it. The owner keeps configuration control and settlement authority.

Re-importing a book you previously removed reactivates the existing link rather than creating a second one.

<Note>
  Your traders still need their own standing on the security: the seller must hold unfrozen tokens, and the buyer must be verified on the token's identity registry and have approved the custody contract. Importing a book grants venue access, not compliance standing.
</Note>

## Settlement on an imported book

When a fill happens on a book you do not own, the response carries `settledByOrderBookOwner: true` and a `settlementId` instead of calldata. Only the owner's settlement operator is authorized on the custody contract for that security, so a transaction built for you would revert.

Track the outcome with [Get Settlement](/endpoints/external-securities-trading/get-settlement) using the returned `settlementId`.

## Body Parameters

<ParamField body="orderBookId" type="string" required>
  ID of the book to import, from [List Importable Order Books](/endpoints/external-securities-trading/list-importable). Up to 100 characters.
</ParamField>

## Response Fields

Returns `201` with the import record.

<ResponseField name="data" type="object">
  <Expandable>
    <ResponseField name="id" type="string">Import ID. Pass it to [Remove Import](/endpoints/external-securities-trading/remove-import).</ResponseField>
    <ResponseField name="instanceId" type="string">Your instance.</ResponseField>
    <ResponseField name="orderBookId" type="string">The imported book.</ResponseField>
    <ResponseField name="active" type="boolean">`true`.</ResponseField>
    <ResponseField name="createdAt" type="string">ISO 8601 timestamp.</ResponseField>
    <ResponseField name="updatedAt" type="string">ISO 8601 timestamp.</ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.trusset.org/orderbooks/external-securities/api/imports" \
    -H "X-API-Key: trusset_your_key_here" \
    -H "Content-Type: application/json" \
    -d '{ "orderBookId": "clx_ob_extsec_088" }'
  ```

  ```typescript TypeScript theme={null}
  const res = await fetch(
    'https://api.trusset.org/orderbooks/external-securities/api/imports',
    {
      method: 'POST',
      headers: {
        'X-API-Key': 'trusset_your_key_here',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({ orderBookId: 'clx_ob_extsec_088' })
    }
  );
  const { data } = await res.json();
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "id": "clx_import_022",
      "instanceId": "inst_abc123",
      "orderBookId": "clx_ob_extsec_088",
      "active": true,
      "createdAt": "2025-06-15T12:00:00.000Z",
      "updatedAt": "2025-06-15T12:00:00.000Z"
    }
  }
  ```
</ResponseExample>

## Error Codes

| Code                   | HTTP  | Cause                                                     |
| ---------------------- | ----- | --------------------------------------------------------- |
| `VALIDATION_ERROR`     | `400` | `orderBookId` is missing or malformed                     |
| `IMPORT_OWN`           | `400` | The book already belongs to your instance                 |
| `IMPORT_TYPE_MISMATCH` | `400` | The book is not an external securities book               |
| `NETWORK_MISMATCH`     | `400` | The owning instance runs on a different network           |
| `IMPORT_NOT_ALLOWED`   | `403` | The book has `allowImport` off                            |
| `ORDER_BOOK_NOT_FOUND` | `404` | No book with that ID                                      |
| `ALREADY_IMPORTED`     | `409` | An active import already links this book to your instance |
| `SERVICE_NOT_ENABLED`  | `403` | The Trading service is not enabled on this instance       |
