Request for Quote (RFQ)
List RFQ Quotes
Read the quotes on one request, oldest first
GET
/
orderbooks
/
stocks
/
api
/
rfq
/
{id}
/
quotes
curl "https://api.trusset.org/orderbooks/stocks/api/rfq/clx_rfq_0091/quotes" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/stocks/api/rfq/${rfqId}/quotes`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
const now = Date.now();
const best = data.quotes
.filter((q: any) => q.status === 'ACTIVE' && Date.parse(q.validUntil) > now)
.sort((a: any, b: any) =>
data.rfq.side === 'BUY' ? Number(a.price) - Number(b.price) : Number(b.price) - Number(a.price)
)[0];
{
"success": true,
"data": {
"rfq": {
"id": "clx_rfq_0091",
"side": "BUY",
"baseAmount": "250000000",
"status": "QUOTED",
"expiresAt": "2025-06-15T12:00:30.000Z"
},
"quotes": [
{
"id": "clx_quote_441",
"lpAddress": "0x9f8c1d4b2e7a3056c1b8f4d29e0a7c3518b6d24f",
"lpAccountId": "clx_acct_31",
"price": "182410000",
"validUntil": "2025-06-15T12:00:28.000Z",
"lockId": "clx_lock_91",
"status": "ACTIVE",
"createdAt": "2025-06-15T12:00:08.000Z"
},
{
"id": "clx_quote_442",
"lpAddress": "0x5ad87a0621175206b72d10e4b8577b192e7f40ab",
"lpAccountId": "clx_acct_44",
"price": "182380000",
"validUntil": "2025-06-15T12:00:29.000Z",
"lockId": "clx_lock_92",
"status": "ACTIVE",
"createdAt": "2025-06-15T12:00:11.000Z"
}
]
}
}
Returns an RFQ together with its quotes in submission order. This is the polling endpoint: open a request, then read this until a quote you want appears or the request expires.
Ordering is by arrival, not by price. Pick the best executable quote yourself, and check
validUntil before accepting, since a quote can expire between two polls.
Only quotes with status: ACTIVE can be accepted.
Path Parameters
string
required
RFQ ID.
Response Fields
object
Show child attributes
Show child attributes
array
Quotes on this request, oldest first.
Show child attributes
Show child attributes
string
Quote ID.
string
Liquidity provider’s wallet.
string
Provider’s trading account, or
null.string
Quoted price in order book units.
string
When the quote stops being executable.
string
Balance lock committing the provider’s funds.
string
ACTIVE, ACCEPTED, EXPIRED or WITHDRAWN.string
ISO 8601 timestamp.
curl "https://api.trusset.org/orderbooks/stocks/api/rfq/clx_rfq_0091/quotes" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/stocks/api/rfq/${rfqId}/quotes`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
const now = Date.now();
const best = data.quotes
.filter((q: any) => q.status === 'ACTIVE' && Date.parse(q.validUntil) > now)
.sort((a: any, b: any) =>
data.rfq.side === 'BUY' ? Number(a.price) - Number(b.price) : Number(b.price) - Number(a.price)
)[0];
{
"success": true,
"data": {
"rfq": {
"id": "clx_rfq_0091",
"side": "BUY",
"baseAmount": "250000000",
"status": "QUOTED",
"expiresAt": "2025-06-15T12:00:30.000Z"
},
"quotes": [
{
"id": "clx_quote_441",
"lpAddress": "0x9f8c1d4b2e7a3056c1b8f4d29e0a7c3518b6d24f",
"lpAccountId": "clx_acct_31",
"price": "182410000",
"validUntil": "2025-06-15T12:00:28.000Z",
"lockId": "clx_lock_91",
"status": "ACTIVE",
"createdAt": "2025-06-15T12:00:08.000Z"
},
{
"id": "clx_quote_442",
"lpAddress": "0x5ad87a0621175206b72d10e4b8577b192e7f40ab",
"lpAccountId": "clx_acct_44",
"price": "182380000",
"validUntil": "2025-06-15T12:00:29.000Z",
"lockId": "clx_lock_92",
"status": "ACTIVE",
"createdAt": "2025-06-15T12:00:11.000Z"
}
]
}
}
Error Codes
| Code | HTTP | Cause |
|---|---|---|
INVALID_PARAM | 400 | id is missing or longer than 100 characters |
NOT_FOUND | 404 | No RFQ with that ID on your instance |
SERVICE_NOT_ENABLED | 403 | The Trading service is not enabled on this instance |
⌘I
curl "https://api.trusset.org/orderbooks/stocks/api/rfq/clx_rfq_0091/quotes" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/stocks/api/rfq/${rfqId}/quotes`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
const now = Date.now();
const best = data.quotes
.filter((q: any) => q.status === 'ACTIVE' && Date.parse(q.validUntil) > now)
.sort((a: any, b: any) =>
data.rfq.side === 'BUY' ? Number(a.price) - Number(b.price) : Number(b.price) - Number(a.price)
)[0];
{
"success": true,
"data": {
"rfq": {
"id": "clx_rfq_0091",
"side": "BUY",
"baseAmount": "250000000",
"status": "QUOTED",
"expiresAt": "2025-06-15T12:00:30.000Z"
},
"quotes": [
{
"id": "clx_quote_441",
"lpAddress": "0x9f8c1d4b2e7a3056c1b8f4d29e0a7c3518b6d24f",
"lpAccountId": "clx_acct_31",
"price": "182410000",
"validUntil": "2025-06-15T12:00:28.000Z",
"lockId": "clx_lock_91",
"status": "ACTIVE",
"createdAt": "2025-06-15T12:00:08.000Z"
},
{
"id": "clx_quote_442",
"lpAddress": "0x5ad87a0621175206b72d10e4b8577b192e7f40ab",
"lpAccountId": "clx_acct_44",
"price": "182380000",
"validUntil": "2025-06-15T12:00:29.000Z",
"lockId": "clx_lock_92",
"status": "ACTIVE",
"createdAt": "2025-06-15T12:00:11.000Z"
}
]
}
}
