Request for Quote (RFQ)
Cancel RFQ
Withdraw an open request and release the quotes against it
POST
/
orderbooks
/
stocks
/
api
/
rfq
/
{id}
/
cancel
curl -X POST "https://api.trusset.org/orderbooks/stocks/api/rfq/clx_rfq_0091/cancel" \
-H "X-API-Key: trusset_your_key_here" \
-H "Content-Type: application/json" \
-d '{ "requesterAddress": "0xabc7f1093d5e26b804a1c3f78de025916b47c0d3" }'
const res = await fetch(
`https://api.trusset.org/orderbooks/stocks/api/rfq/${rfqId}/cancel`,
{
method: 'POST',
headers: {
'X-API-Key': 'trusset_your_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({ requesterAddress: await wallet.getAddress() })
}
);
const { data } = await res.json();
{
"success": true,
"data": {
"id": "clx_rfq_0091",
"requesterAddress": "0xabc7f1093d5e26b804a1c3f78de025916b47c0d3",
"side": "BUY",
"baseAmount": "250000000",
"status": "CANCELLED",
"expiresAt": "2025-06-15T12:00:30.000Z",
"updatedAt": "2025-06-15T12:00:19.000Z",
"quotes": [
{
"id": "clx_quote_441",
"lpAddress": "0x9f8c1d4b2e7a3056c1b8f4d29e0a7c3518b6d24f",
"price": "182410000",
"status": "WITHDRAWN",
"validUntil": "2025-06-15T12:00:28.000Z"
}
]
}
}
{
"success": false,
"data": null,
"error": {
"code": "FORBIDDEN",
"message": "Only the requester can cancel the RFQ"
}
}
Cancels an RFQ you opened. Only the original
requesterAddress may cancel.
Cancelling withdraws every live quote and releases the funds each provider had committed, so it is the courteous way to close a request you no longer want rather than letting it expire. Providers get their inventory back immediately instead of at the next sweep.
An RFQ that is already ACCEPTED, CANCELLED or EXPIRED is returned unchanged. The call succeeds, so a retry is safe.
Idempotency
Accepts an optionalIdempotency-Key header.
Path Parameters
string
required
RFQ ID.
Body Parameters
string
required
Must equal the RFQ’s
requesterAddress.Response Fields
Returns the RFQ with its quotes, in the same shape as Get RFQ. Live quotes now readWITHDRAWN.
Releasing a provider’s committed funds is a custody operation. Where that release needs a signature that is not available, the release is retried by the balance lock reconciler rather than failing the cancel: the RFQ is cancelled either way.
curl -X POST "https://api.trusset.org/orderbooks/stocks/api/rfq/clx_rfq_0091/cancel" \
-H "X-API-Key: trusset_your_key_here" \
-H "Content-Type: application/json" \
-d '{ "requesterAddress": "0xabc7f1093d5e26b804a1c3f78de025916b47c0d3" }'
const res = await fetch(
`https://api.trusset.org/orderbooks/stocks/api/rfq/${rfqId}/cancel`,
{
method: 'POST',
headers: {
'X-API-Key': 'trusset_your_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({ requesterAddress: await wallet.getAddress() })
}
);
const { data } = await res.json();
{
"success": true,
"data": {
"id": "clx_rfq_0091",
"requesterAddress": "0xabc7f1093d5e26b804a1c3f78de025916b47c0d3",
"side": "BUY",
"baseAmount": "250000000",
"status": "CANCELLED",
"expiresAt": "2025-06-15T12:00:30.000Z",
"updatedAt": "2025-06-15T12:00:19.000Z",
"quotes": [
{
"id": "clx_quote_441",
"lpAddress": "0x9f8c1d4b2e7a3056c1b8f4d29e0a7c3518b6d24f",
"price": "182410000",
"status": "WITHDRAWN",
"validUntil": "2025-06-15T12:00:28.000Z"
}
]
}
}
{
"success": false,
"data": null,
"error": {
"code": "FORBIDDEN",
"message": "Only the requester can cancel the RFQ"
}
}
Error Codes
| Code | HTTP | Cause |
|---|---|---|
VALIDATION_ERROR | 400 | requesterAddress is missing or not an address |
INVALID_PARAM | 400 | id is missing or longer than 100 characters |
FORBIDDEN | 403 | The caller is not the RFQ’s requester |
NOT_FOUND | 404 | No RFQ with that ID on your instance |
IDEMPOTENCY_MISMATCH | 409 | The key was used before with a different body |
SERVICE_NOT_ENABLED | 403 | The Trading service is not enabled on this instance |
⌘I
curl -X POST "https://api.trusset.org/orderbooks/stocks/api/rfq/clx_rfq_0091/cancel" \
-H "X-API-Key: trusset_your_key_here" \
-H "Content-Type: application/json" \
-d '{ "requesterAddress": "0xabc7f1093d5e26b804a1c3f78de025916b47c0d3" }'
const res = await fetch(
`https://api.trusset.org/orderbooks/stocks/api/rfq/${rfqId}/cancel`,
{
method: 'POST',
headers: {
'X-API-Key': 'trusset_your_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({ requesterAddress: await wallet.getAddress() })
}
);
const { data } = await res.json();
{
"success": true,
"data": {
"id": "clx_rfq_0091",
"requesterAddress": "0xabc7f1093d5e26b804a1c3f78de025916b47c0d3",
"side": "BUY",
"baseAmount": "250000000",
"status": "CANCELLED",
"expiresAt": "2025-06-15T12:00:30.000Z",
"updatedAt": "2025-06-15T12:00:19.000Z",
"quotes": [
{
"id": "clx_quote_441",
"lpAddress": "0x9f8c1d4b2e7a3056c1b8f4d29e0a7c3518b6d24f",
"price": "182410000",
"status": "WITHDRAWN",
"validUntil": "2025-06-15T12:00:28.000Z"
}
]
}
}
{
"success": false,
"data": null,
"error": {
"code": "FORBIDDEN",
"message": "Only the requester can cancel the RFQ"
}
}
