Order Books
Import Order Book
Add another instance’s published security book to your venue
POST
/
orderbooks
/
external-securities
/
api
/
imports
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" }'
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();
{
"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"
}
}
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.
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.
Settlement on an imported book
When a fill happens on a book you do not own, the response carriessettledByOrderBookOwner: 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 using the returned settlementId.
Body Parameters
string
required
ID of the book to import, from List Importable Order Books. Up to 100 characters.
Response Fields
Returns201 with the import record.
object
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" }'
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();
{
"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"
}
}
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 |
⌘I
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" }'
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();
{
"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"
}
}
