> ## 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 commodity book to your venue

Imports a book another instance published, so your instance can read and route flow to it. The owner keeps configuration control: you cannot pause it, reprice it, or change its fees.

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

## Body Parameters

<ParamField body="orderBookId" type="string" required>
  ID of the book to import, from [List Importable Order Books](/endpoints/commodity-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/commodity-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>

<Note>
  Importing does not put the two books in the same fungibility class. Pooling still requires both books to derive the same class from their attestations and both to have `allowSharedLiquidity` set.
</Note>

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

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

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "id": "clx_import_031",
      "instanceId": "inst_abc123",
      "orderBookId": "clx_ob_comm_055",
      "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 a commodity book. Use the venue that matches its token type |
| `NETWORK_MISMATCH`     | `400` | The owning instance runs on a different network                             |
| `IMPORT_NOT_ALLOWED`   | `403` | The book has `allowImport` off, or does not settle on-chain                 |
| `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                         |
