Order Books
Get Shared Peers
List the books this one pools depth with
GET
/
orderbooks
/
external-securities
/
api
/
order-books
/
{orderBookId}
/
shared-peers
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"
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();
{
"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
}
]
}
}
Returns the books whose depth this book matches against, beyond its own. See 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
string
required
Order book ID.
Response Fields
object
Show child attributes
Show child attributes
boolean
Whether this book opted into pooling.
integer
Number of eligible peers, excluding this book.
array
Peer order book IDs.
array
Show child attributes
Show child attributes
string
Peer order book ID.
string
Instance that owns the peer.
string
Peer display name.
string
Peer display symbol.
string
Peer security token.
string
Peer settlement asset.
string
Peer custody contract.
string
EXTERNAL_SECURITY.string
Peer status.
string
The identifier the pooling keys on.
string
null on this venue.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.
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"
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();
{
"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
}
]
}
}
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 |
⌘I
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"
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();
{
"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
}
]
}
}
