Markets
Decline Market
Take a market off the register queue without importing it
POST
/
asset-registers
/
api
/
markets
/
{marketAddress}
/
decline
curl -X POST "https://api.trusset.org/asset-registers/api/markets/0x70a0e25c7b768b87e658348b3b577678a173e038/decline" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/asset-registers/api/markets/${marketAddress}/decline`,
{ method: 'POST', headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { success, data, error } = await res.json();
if (!success) throw new Error(`${error.code}: ${error.message}`);
{
"success": true,
"data": {
"marketAddress": "0x70a0e25c7b768b87e658348b3b577678a173e038",
"status": "DECLINED",
"decidedAt": "2026-11-18T10:33:48.000Z"
},
"error": null,
"metadata": {
"timestamp": "2026-11-18T10:33:48.000Z",
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"instanceId": "cmwk2r8v10003l80f4t6h9d2e"
}
}
Declines a market that names this instance as the asset register of its collateral token. The market leaves List Register Queue, and the deployer reads
response: DECLINED on Get Market Register. The Reject button of the Queue page in the Issuer Portal makes the same call.
A decline is a database write and it answers for one market only. The deployer’s assignment for the token stays, so another market on the same token still reaches the queue. A decline is not final: Import Market on the same address turns it into an import.
Declining an imported market removes the import. The market leaves List Register Markets, its pledge record closes for this instance, and this instance’s webhooks receive no further events for it.
Only an account Trusset approved as an asset register can decline, and only a market that names this instance.
Path Parameters
The market contract address,
0x followed by 40 hex characters. Lowercase or correctly checksummed.Response Fields
curl -X POST "https://api.trusset.org/asset-registers/api/markets/0x70a0e25c7b768b87e658348b3b577678a173e038/decline" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/asset-registers/api/markets/${marketAddress}/decline`,
{ method: 'POST', headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { success, data, error } = await res.json();
if (!success) throw new Error(`${error.code}: ${error.message}`);
{
"success": true,
"data": {
"marketAddress": "0x70a0e25c7b768b87e658348b3b577678a173e038",
"status": "DECLINED",
"decidedAt": "2026-11-18T10:33:48.000Z"
},
"error": null,
"metadata": {
"timestamp": "2026-11-18T10:33:48.000Z",
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"instanceId": "cmwk2r8v10003l80f4t6h9d2e"
}
}
Error Codes
| Code | HTTP | Cause |
|---|---|---|
VALIDATION_ERROR | 400 | marketAddress is not 0x followed by 40 hex characters |
INVALID_ADDRESS | 400 | marketAddress is the zero address, or mixed case with a failing checksum |
AUTH_REQUIRED | 401 | No X-API-Key header |
AUTH_FAILED | 401 | The key is malformed, unknown, expired, or its instance is archived |
CREDIT_LIMIT_EXCEEDED | 402 | The instance’s monthly credit allowance is exhausted |
ACCOUNT_FROZEN | 403 | The account behind the key is suspended |
REGISTER_NOT_APPROVED | 403 | Trusset has not approved this account as an asset register |
REGISTER_NOT_NAMED | 403 | The deployer has not named this instance as the asset register of the token behind this market |
MARKET_NOT_FOUND | 404 | No lending market with this address is recorded on the network and environment of this instance |
RATE_LIMIT_EXCEEDED | 429 | More than 10 writes in the minute |
REGISTER_DECLINE_FAILED | 500 | The decline could not be stored |
⌘I
curl -X POST "https://api.trusset.org/asset-registers/api/markets/0x70a0e25c7b768b87e658348b3b577678a173e038/decline" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/asset-registers/api/markets/${marketAddress}/decline`,
{ method: 'POST', headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { success, data, error } = await res.json();
if (!success) throw new Error(`${error.code}: ${error.message}`);
{
"success": true,
"data": {
"marketAddress": "0x70a0e25c7b768b87e658348b3b577678a173e038",
"status": "DECLINED",
"decidedAt": "2026-11-18T10:33:48.000Z"
},
"error": null,
"metadata": {
"timestamp": "2026-11-18T10:33:48.000Z",
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"instanceId": "cmwk2r8v10003l80f4t6h9d2e"
}
}
