API
Every endpoint of the desk API and its live channel, rendered from the API contract, version 0.2.0.
The desk screens use this API and nothing else. Requests and responses are JSON; the base URL is {props.facts.SITE.api}. The full OpenAPI 3.1 document is served at /openapi.json. The samples on this page were captured from a local API in fixture mode, so their address is local and their mints and makers are stand-ins.
Conventions
| Type | Form |
|---|---|
Address | A 32-byte public key in base58: wallets, mints, programs, seal keys, quote keys |
Signature | A 64-byte transaction signature in base58 |
U64 | An unsigned 64-bit integer as a decimal string. Every token amount is in base units |
I64 | A signed 64-bit integer as a decimal string |
Decimal | A decimal number as a string, such as a price |
Id | A UUID |
Timestamp | An ISO 8601 time in UTC |
Base64 | Bytes in standard base64 |
Inputs are strict: an unknown field is a VALIDATION_ERROR. Responses may gain fields and enum values, so ignore what you do not know.
Sessions
Calls marked “Needs a session” take Authorization: Bearer <token>. To get a token:
Get a nonce
GET /auth/noncefrom a page on an allowed origin returns the Sign-In With Solana fields and anonceToken.Sign
Pass the fields to the wallet’s sign-in method. It returns the signed message bytes and the signature.
Verify
POST /auth/verifywith the wallet address, the signed message, the signature and thenonceTokenreturns thetokenand its expiry.
Before calling the request and quote endpoints, register the desk key with POST /v1/keys. Unlock the desk explains how the keys are derived.
Pages
List endpoints take cursor and limit (1 to 100, default 24) in the query and answer { items, page: { nextCursor, hasMore }, asOf }. Pass nextCursor as cursor for the next page; it is null on the last page.
Fixture mode
An API started in fixture mode serves the same contract with no chain: makers that quote by themselves, transactions that confirm without being sent. The X-Fixture header, or the fixture query parameter, picks a scenario (empty, not-maker, maker, expired, waiting, settling, settled, failed, quoted, won, lost) or any error code to force that error. X-Fixture-Session keeps one browser tab’s state apart from another’s.
Desk
GET /health
Whether the API process is up and which mode it runs in. Public.
curl -s http://127.0.0.1:4720/health{
"status": "fixture",
"mode": "fixture"
}Returns Health.
GET /v1/desk
The desk’s cluster, program, fee, pairs, request and quote defaults, and the house maker. Public.
curl -s http://127.0.0.1:4720/v1/desk{
"cluster": "localnet",
"programId": "9PGMzRqww2wmM9SXkLqsoPYiFhSqRinWveXokjU2rifz",
"feeBps": 5,
"feeRecipient": "FvJ39TfYfwDLX8nZhAqfyiRC6nkogVvzGdoy9hXmBLrS",
"defaults": {
"windowSeconds": 60,
"quoteValiditySeconds": 30,
"minWindowSeconds": 15,
"maxWindowSeconds": 300
},
"pairs": [
{
"id": "SOL/USDC",
"base": {
"address": "So11111111111111111111111111111111111111112",
"symbol": "SOL",
"decimals": 9,
"native": true
},
"quote": {
"address": "B4TTcJjK7NFWKJo8kUwFMXtgYfdXg5araP89916yp6nn",
"symbol": "USDC",
"decimals": 6,
"native": false
}
},
{
"id": "JitoSOL/USDC",
"base": {
"address": "C61Njw445mJmgAbT1KLsZNi6yjmyosRJxV8esxYMjfA3",
"symbol": "JitoSOL",
"decimals": 9,
"native": false
},
"quote": {
"address": "B4TTcJjK7NFWKJo8kUwFMXtgYfdXg5araP89916yp6nn",
"symbol": "USDC",
"decimals": 6,
"native": false
}
}
],
"houseMaker": {
"owner": "99XeEiHztLp4RgvsVFJhdnGYk7E6VNYYzctcVjBhJSXK",
"pairs": [
"SOL/USDC",
"JitoSOL/USDC"
]
}
}Returns DeskFacts.
GET /v1/makers
Every active maker with its seal key and quote key. A taker reads this to seal requests and to check quotes. Public.
Returns Makers.
GET /v1/prices
Reference prices per pair, which the desk uses to prefill a maker’s price. Public.
curl -s http://127.0.0.1:4720/v1/prices{
"items": [
{
"pair": "SOL/USDC",
"price": "150",
"source": "fixture",
"asOf": "2026-11-23T18:01:18.468Z"
},
{
"pair": "JitoSOL/USDC",
"price": "185",
"source": "fixture",
"asOf": "2026-11-23T18:01:18.468Z"
}
],
"asOf": "2026-11-23T18:01:18.468Z"
}Returns ReferencePrices.
Sign-in
GET /auth/nonce
Starts Sign-In With Solana: returns the message fields to sign and a nonce token. The domain and URI follow the calling page’s Origin, which must be one the API allows. Public.
Returns SignInRequest.
POST /auth/verify
Finishes sign-in with the wallet’s signature over the sign-in message, and returns a session token. Public.
publicKeyAddressrequiredThe wallet that signed, as a base58 address.
signedMessagestringrequiredThe exact message bytes the wallet signed, in base64.
signaturestringrequiredThe wallet’s Ed25519 signature over those bytes, 64 bytes in base64.
nonceTokenstringrequiredThe nonce token from
GET /auth/nonce.
Returns SignInSession.
GET /auth/session
The wallet and expiry of the current session. Needs a session.
Returns SignInSession.
POST /auth/logout
Ends the current session. Needs a session.
Body: {}.
Answers 204 with no body.
Desk keys
GET /v1/me
The signed-in wallet, its registered desk keys, and whether it is a maker. Needs a session.
Returns Me.
POST /v1/keys
Registers the public halves of the desk key for the signed-in wallet. Registering a different seal key is refused while the wallet has an open or settling request. Needs a session.
sealKeyAddressrequiredYour X25519 public seal key, base58.
quoteKeyAddressrequiredYour Ed25519 public quote key, base58.
Returns Me.
Requests
POST /v1/requests
Posts a request as one envelope per maker, each sealed in the client to that maker’s seal key. The server never receives the plaintext. Needs a session.
idIdrequiredA UUID the client chooses. It is also sealed inside every envelope, so a maker can tell the envelope belongs to this request. Reusing an id is refused.
windowSecondsintegerHow long the request stays open for quotes, in seconds. From 15 to 300. Default 60.
envelopesRequestEnvelope[]requiredOne envelope per maker. Each maker appears once, and the taker cannot ask itself. 1 to 50 items.
Returns RequestView.
GET /v1/requests
Your requests as taker, newest first. Needs a session.
Query: cursor, limit, as described under Pages.
Returns a page of RequestView.
GET /v1/requests/{id}
One of your requests, with its envelopes and every quote envelope sent back to it. Needs a session.
Path parameter id: the request id.
Returns RequestView.
POST /v1/requests/{id}/cancel
Cancels your request while it is open. Needs a session.
Path parameter id: the request id.
Body: {}.
Returns RequestView.
Quotes
GET /v1/inbox
Requests addressed to you as maker, newest first, with your quote if you sent one. Needs a session.
Query: cursor, limit, as described under Pages.
POST /v1/requests/{id}/quotes
Posts your sealed quote on an open request addressed to you. A second post replaces the first. Needs a session.
Path parameter id: the request id.
envelopeEnveloperequiredThe signed quote, sealed from your seal key to the taker’s.
Returns QuoteEnvelope.
Transactions
POST /v1/transactions/build
Builds and simulates a transaction for the signed-in wallet to sign: registering as a maker, changing the quote key, a deposit, a withdrawal, or the settlement of an accepted quote. Needs a session.
With kind: 'register-maker': creates the maker account for the signed-in wallet.
kind'register-maker'requiredWhat to build.
quoteKeyAddressrequiredThe Ed25519 public quote key to write into the maker account.
With kind: 'set-quote-key': replaces the quote key in your maker account.
kind'set-quote-key'requiredWhat to build.
quoteKeyAddressrequiredThe Ed25519 public quote key to write into the maker account.
With kind: 'deposit': moves tokens from your wallet into your vault for that mint.
kind'deposit'requiredWhat to build.
mintAddressrequiredA mint the desk lists.
amountU64requiredThe amount in base units.
With kind: 'withdraw': moves tokens from your vault for that mint back to your wallet.
kind'withdraw'requiredWhat to build.
mintAddressrequiredA mint the desk lists.
amountU64requiredThe amount in base units.
With kind: 'settle': settles an accepted quote. The response carries a review of both legs and the fee.
kind'settle'requiredWhat to build.
requestIdIdrequiredYour request the quote answers.
quoteSignedQuoterequiredThe signed quote, as opened from its envelope.
Returns TransactionBuild.
POST /v1/transactions/submit
Hands a built transaction back: either the signed bytes for the server to send, or the signature of a transaction the wallet sent itself. A repeat with the same idempotency key returns the same status. Needs a session.
With mode: 'relay': the server sends the bytes your wallet signed.
mode'relay'requiredHow the transaction reaches the chain.
buildIdIdrequiredThe
idof the build.idempotencyKeystringrequiredA key the client chooses for this submission. A retry with the same key and body returns the same status; a different body for the same build is refused.
signedTransactionBase64Base64requiredThe signed transaction, base64.
With mode: 'wallet-sent': your wallet sent the transaction itself; the server follows the signature.
mode'wallet-sent'requiredHow the transaction reaches the chain.
buildIdIdrequiredThe
idof the build.idempotencyKeystringrequiredA key the client chooses for this submission. A retry with the same key and body returns the same status; a different body for the same build is refused.
signatureSignaturerequiredThe transaction signature, base58.
With mode: 'fixture': fixture mode only; completes a fixture build without a chain.
mode'fixture'requiredHow the transaction reaches the chain.
buildIdIdrequiredThe
idof the build.idempotencyKeystringrequiredA key the client chooses for this submission. A retry with the same key and body returns the same status; a different body for the same build is refused.
Returns TransactionStatus.
GET /v1/transactions/{id}
The status of a transaction you built, until it is confirmed, failed or expired. Needs a session.
Path parameter id: the build id returned by POST /v1/transactions/build.
Returns TransactionStatus.
Inventory and history
GET /v1/vaults/{maker}
A maker’s vault balance for every listed mint. Needs a session.
Path parameter maker: the maker’s wallet address.
Returns Vaults.
GET /v1/history
Settled fills where you were taker or maker, newest first. Needs a session.
Query: cursor, limit, as described under Pages.
Live channel
GET /v1/events
Opens the live channel for the signed-in wallet as server-sent events. Open it with fetch and the Authorization header: the token never goes in the URL, so a browser EventSource cannot open it. Needs a session.
The stream starts with ready. Every event’s data line holds the whole event as JSON: type, id, timestamp and data, listed under Events. A comment keeps the connection alive every 15 seconds. To reconnect, send the last id you received as Last-Event-ID: the server answers resync and then ready, and does not replay missed events, so read your requests, inbox, transactions, history and vaults again.
Events
Each event reaches only the wallets it concerns: the taker and the makers of a request, or the owner of a transaction or vault.
| Event | data | Sent when |
|---|
| ready | { status: string } | The stream is open, and again after a resync. |
| resync | { reason: string } | You reconnected with Last-Event-ID; read your state again. |
| request.envelope | InboxItem | A request addressed to you as maker arrives. |
| quote.envelope | QuoteEnvelope | A quote on your request arrives or is replaced; makers also receive their own. |
| request.status | { requestId: Id, status: 'open' \| 'settling' \| 'settled' \| 'expired' \| 'cancelled' } | A request you take part in changes status. |
| transaction.updated | TransactionStatus | A transaction you built changes status. |
| fill.created | Fill | A trade you were taker or maker in settles. |
| vault.updated | Vaults | Your vault balances change. |
Types
Response objects. Every one may gain fields in a later version, and enum values may grow: ignore what you do not know.
Health
The API process and its mode.
status'fixture' | 'waiting' | 'ready'requiredfixturein fixture mode,waitingwhile the chain backend waits for the program,readywhen it serves the chain.mode'fixture' | 'chain'requiredfixtureserves a stateful stand-in with no chain;chainserves the program on its cluster.
DeskFacts
What the desk trades and on what terms.
cluster'localnet' | 'mainnet'requiredThe Solana cluster the desk settles on.
programIdAddressrequiredThe desk’s program, as a base58 address.
feeBpsintegerrequiredThe protocol fee, in basis points of the quote leg. From 0 to 10000.
feeRecipientAddressrequiredThe wallet the fee is paid to, as a base58 address.
defaultsobjectrequiredRequest and quote timings.
defaults.windowSecondsintegerrequiredThe default request window, in seconds.
defaults.quoteValiditySecondsintegerrequiredHow long a quote is valid after signing by default, in seconds.
defaults.minWindowSecondsintegerrequiredThe shortest request window allowed, in seconds.
defaults.maxWindowSecondsintegerrequiredThe longest request window allowed, in seconds.
pairsPair[]requiredThe pairs the desk lists, with both mints.
houseMakerobjectrequiredThe desk’s own maker.
houseMaker.ownerAddressrequiredThe house maker’s wallet, as a base58 address.
houseMaker.pairsstring[]requiredThe pair ids it quotes.
Makers
The maker list.
itemsMaker[]requiredActive makers.
ReferencePrices
Reference prices.
itemsReferencePrice[]requiredOne price per pair.
asOfTimestamprequiredWhen the list was read.
SignInRequest
The sign-in message to sign.
inputSignInInputrequiredThe Sign-In With Solana fields to pass to the wallet’s sign-in method.
nonceTokenstringrequiredSend this back with the signature to
POST /auth/verify.
SignInSession
A session.
walletAddressrequiredThe signed-in wallet, as a base58 address.
expiresAtTimestamprequiredWhen the session ends.
tokenstringThe session token, returned once by
POST /auth/verify. Send it asAuthorization: Bearer <token>. Keep it in memory or session storage, never in a URL.
Me
The signed-in wallet’s desk state.
walletAddressrequiredThe signed-in wallet, as a base58 address.
keysRegisteredbooleanrequiredWhether the desk key is registered for this wallet.
sealKeyAddress | nullrequiredThe registered seal public key, or null.
quoteKeyAddress | nullrequiredThe registered quote public key, or null.
isMakerbooleanrequiredWhether this wallet has a maker account.
RequestEnvelope
One sealed copy of a request.
makerAddressrequiredThe maker this copy is sealed to, as a base58 address.
envelopeEnveloperequiredThe sealed request.
RequestView
A request as its taker sees it.
idIdrequiredThe request id.
takerAddressrequiredThe taker’s wallet, as a base58 address.
takerSealKeyAddressrequiredThe taker’s seal public key. Makers open the request and seal quotes with it.
status'open' | 'settling' | 'settled' | 'expired' | 'cancelled'requiredWhere the request stands.
windowSecondsintegerrequiredThe request window, in seconds.
createdAtTimestamprequiredWhen it was posted.
expiresAtTimestamprequiredWhen the window ends.
updatedAtTimestamprequiredThe last change.
envelopesobject[]requiredThe sealed copies, one per maker asked.
envelopes[].makerAddressrequiredThe maker, as a base58 address.
envelopes[].envelopeEnveloperequiredThe sealed request for that maker.
quotesQuoteEnvelope[]requiredThe quote envelopes received, at most one per maker.
acceptedMakerAddress | nullrequiredThe maker whose quote is settling or settled, or null.
transactionIdId | nullrequiredThe build id of the settlement transaction, or null.
InboxItem
A request as a maker sees it in the inbox.
requestIdIdrequiredThe request id.
takerAddressrequiredThe taker’s wallet, as a base58 address.
takerSealKeyAddressrequiredThe taker’s seal public key, to open the envelope and seal your quote.
envelopeEnveloperequiredThe request, sealed to you.
createdAtTimestamprequiredWhen the request was posted.
expiresAtTimestamprequiredWhen its window ends.
requestStatus'open' | 'settling' | 'settled' | 'expired' | 'cancelled'requiredThe request’s status.
state'open' | 'quoted' | 'won' | 'lost' | 'expired'requiredWhere the request stands for you:
wonwhen it settled with your quote,lostwhen it settled with another,expiredwhen it ended without settling or was cancelled.quoteQuoteEnvelope | nullrequiredYour quote envelope, or null.
Envelope
A sealed value. Open it with the sender’s seal public key and your seal secret key; it fails to open if it was changed.
boxstringrequiredThe NaCl box: ciphertext with its 16-byte authenticator, base64.
noncestringrequiredThe 24-byte box nonce, base64.
QuoteEnvelope
A sealed quote.
requestIdIdrequiredThe request it answers.
makerAddressrequiredThe maker’s wallet, as a base58 address.
makerSealKeyAddressrequiredThe maker’s seal public key, to open the envelope.
quoteKeyAddressrequiredThe maker’s registered quote key, to check the signature inside.
envelopeEnveloperequiredThe signed quote, sealed to the taker.
createdAtTimestamprequiredWhen the maker first quoted.
updatedAtTimestamprequiredWhen the maker last replaced the quote.
SignedQuote
A quote as signed by the maker’s quote key and sealed to the taker. Field by field, it is the 201-byte message in What a quote signs.
programIdAddressrequiredThe desk’s program, as a base58 address.
makerAddressrequiredThe maker’s wallet, as a base58 address.
takerAddressrequiredThe taker’s wallet, as a base58 address.
baseMintAddressrequiredThe base mint, as a base58 address.
quoteMintAddressrequiredThe quote mint, as a base58 address.
side'buy' | 'sell'requiredThe taker’s side.
baseAmountU64requiredThe size, in base units of the base mint.
quoteAmountU64requiredThe price of the whole size, in base units of the quote mint, before the fee.
expiresAtI64requiredThe last moment the quote settles, as Unix seconds.
nonceU64requiredA number the maker chooses so two quotes with the same terms hash differently.
signaturestringrequiredThe quote key’s Ed25519 signature over the 201-byte quote message, base64.
TransactionBuild
A built, simulated transaction ready for the wallet.
idIdrequiredThe build id. Submit and follow with it.
kind'register-maker' | 'set-quote-key' | 'deposit' | 'withdraw' | 'settle'requiredWhat it does.
transactionBase64Base64requiredThe unsigned v0 transaction, base64, for the wallet to sign.
blockhashAddressrequiredThe recent blockhash it was built on.
lastValidBlockHeightintegerrequiredThe last block height at which it can land.
expiresAtTimestamprequiredWhen the build stops being usable: the blockhash or the quote expires, whichever is first.
cosignedbooleanrequiredWhether the server signed it as well.
fixturebooleanrequiredTrue when built in fixture mode; such a transaction is not meant for a chain.
reviewSettlementReview | nullrequiredFor a settlement, what the taker pays and receives and the fee; null for the other kinds.
TransactionStatus
A transaction being followed.
idIdrequiredThe build id.
kind'register-maker' | 'set-quote-key' | 'deposit' | 'withdraw' | 'settle'requiredWhat it does.
status'built' | 'submitted' | 'unconfirmed' | 'confirmed' | 'finalized' | 'failed' | 'expired'requiredWhere it stands.
confirmedandfinalizedare commitment levels;failedandexpiredare final.signatureSignature | nullrequiredThe transaction signature once sent, base58, or null.
errorErrorDetail | nullrequiredWhy it failed or expired, or null.
createdAtTimestamprequiredWhen it was built.
updatedAtTimestamprequiredThe last change.
requestIdId | nullrequiredFor a settlement, the request it settles; otherwise null.
Vaults
A maker’s inventory.
makerAddressrequiredThe maker’s wallet, as a base58 address.
balancesobject[]requiredOne balance per listed mint.
balances[].mintAddressrequiredThe mint, as a base58 address.
balances[].amountU64requiredThe vault balance, in base units.
asOfTimestamprequiredWhen the balances were read.
Fill
A settled trade.
idIdrequiredThe fill id.
requestIdId | nullrequiredThe request it settled.
makerAddressrequiredThe maker’s wallet, as a base58 address.
takerAddressrequiredThe taker’s wallet, as a base58 address.
pairstringrequiredThe pair id.
side'buy' | 'sell'requiredThe taker’s side.
baseMintAddressrequiredThe base mint, as a base58 address.
quoteMintAddressrequiredThe quote mint, as a base58 address.
baseAmountU64requiredThe size, in base units.
quoteAmountU64requiredThe quote amount before the fee, in base units.
priceDecimalrequiredQuote tokens per base token, as a decimal string.
feeAmountU64requiredThe fee paid, in base units of the quote mint.
feeBpsintegerrequiredThe fee rate applied.
signatureSignaturerequiredThe settlement transaction’s signature.
settledAtTimestamprequiredWhen it settled.
explorerUrlstring | nullrequiredA link to the transaction on an explorer, or null on a local cluster.
Pair
A pair the desk lists.
id'SOL/USDC' | 'JitoSOL/USDC'requiredThe pair id.
baseMintrequiredThe base mint.
quoteMintrequiredThe quote mint.
Maker
A maker and its public keys.
ownerAddressrequiredThe maker’s wallet, as a base58 address.
sealKeyAddressrequiredIts seal public key. Seal requests to it.
quoteKeyAddressrequiredIts registered quote key. Quotes from this maker verify against it.
activebooleanrequiredWhether it takes requests.
housebooleanrequiredTrue for the desk’s own maker.
displayNamestring | nullrequiredA name the desk shows, or null.
ReferencePrice
A reference price.
pairstringrequiredThe pair id.
priceDecimalrequiredQuote tokens per base token, as a decimal string.
source'fixture' | 'localnet' | 'jupiter'requiredWhere it came from:
jupiteron mainnet, a fixed stand-in onlocalnetand infixturemode.asOfTimestamprequiredWhen it was read.
SignInInput
Sign-In With Solana message fields.
domainstringrequiredThe domain of the page that asked to sign in.
statementstringrequiredThe one line the wallet shows above the fields.
uristringrequiredThe page’s origin.
versionstringrequiredThe Sign-In With Solana message version.
chainIdstringrequiredThe cluster, for example
solana:localnet.noncestringrequiredA one-time value; a signature over it verifies once.
issuedAtTimestamprequiredWhen the message was issued.
expirationTimeTimestamprequiredWhen the message stops verifying.
SettlementReview
What a settlement moves, shown before the taker signs.
pairstringrequiredThe pair id.
side'buy' | 'sell'requiredThe taker’s side.
baseAmountU64requiredThe size, in base units.
quoteAmountU64requiredThe quote amount before the fee, in base units.
feeBpsintegerrequiredThe fee rate applied.
takerPaysLegrequiredWhat leaves the taker’s wallet. On a buy it includes the fee.
takerReceivesLegrequiredWhat reaches the taker’s wallet. On a sell the fee is already taken out.
feeLegrequiredThe fee, in the quote mint.
ErrorDetail
The body of the error envelope.
codeErrorCoderequiredWhat went wrong. See Errors.
messagestringrequiredA sentence for a person to read.
retryablebooleanrequiredWhether the same call can succeed later.
stageErrorStagerequiredWhere it failed. See the stage table under Errors.
fieldErrorsRecord<string, string[]>For
VALIDATION_ERROR, the messages per input field.programErrorProgramErrorFor a failure the program raised, its name and number.
retryAfterSecondsintegerFor
RATE_LIMITED, how long to wait.requestIdstringAn id for this failure in the server’s logs.
Mint
A token mint.
addressAddressrequiredThe mint, as a base58 address.
symbolstringrequiredThe token symbol.
decimalsintegerrequiredDecimal places of one token. From 0 to 18.
nativebooleanrequiredTrue for SOL, which settles as wrapped SOL.
Leg
One amount of one mint.
mintAddressrequiredThe mint, as a base58 address.
symbolstringrequiredThe token symbol.
decimalsintegerrequiredDecimal places of one token.
amountU64requiredThe amount, in base units.
ProgramError
An error raised by an on-chain program.
programIdAddressrequiredThe program that raised it, as a base58 address.
namestringrequiredThe program’s error name. See the Program reference.
numberintegerThe program’s error number.
Errors
Every error is one envelope, { "error": ErrorDetail }, whatever the HTTP status. Branch on error.code; retryable says whether the same call can succeed later, and retryAfterSeconds when to try.
A forced error from a fixture server, answered with HTTP 409:
curl -s -H 'X-Fixture: QUOTE_EXPIRED' http://127.0.0.1:4720/v1/prices{
"error": {
"code": "QUOTE_EXPIRED",
"message": "Quote expired.",
"retryable": false,
"stage": "build"
}
}| Code | HTTP | Meaning |
|---|
| VALIDATION_ERROR | 400 | The input does not match the contract; fieldErrors says where. |
| UNAUTHORIZED | 401 | The session token is missing, wrong or expired. |
| NOT_SIGNED_IN | 401 | This call needs a session. |
| ORIGIN_NOT_ALLOWED | 403 | The calling page’s Origin is not one the API serves. |
| NOT_FOUND | 404 | No such request, transaction or resource for this wallet. |
| PROGRAM_UNAVAILABLE | 409 | The program or the chain backend is not available yet. |
| CONFIGURATION_REQUIRED | 409 | The desk is missing a setting it needs for this call. |
| IDEMPOTENCY_CONFLICT | 409 | The id or idempotency key is already used with different content, or the wallet is already a maker. |
| TRANSACTION_EXPIRED | 409 | The build’s blockhash or quote expired before it landed. Build again. |
| PAYLOAD_TOO_LARGE | 413 | The body is larger than the API accepts. |
| UNSUPPORTED_MEDIA_TYPE | 415 | The body is not JSON. |
| SIMULATION_FAILED | 422 | The program refused the transaction in simulation; programError names why. |
| CHAIN_REFUSED | 422 | The cluster refused the transaction. |
| RATE_LIMITED | 429 | Too many calls; wait retryAfterSeconds. |
| INTERNAL_ERROR | 500 | The server failed. |
| UPSTREAM_UNAVAILABLE | 502 | A service the API depends on did not answer. |
| KEYS_NOT_REGISTERED | 409 | Register the desk key first. |
| NOT_A_MAKER | 403 | The wallet has no maker account. |
| REQUEST_NOT_OPEN | 409 | The request is settling, settled, expired or cancelled. |
| REQUEST_EXPIRED | 409 | The request window has ended. |
| QUOTE_EXPIRED | 409 | The quote is past its expiry. |
| QUOTE_SIGNATURE_INVALID | 422 | The quote’s signature does not verify against the maker’s quote key, or the quote does not belong to this request and taker. |
| QUOTE_ALREADY_USED | 409 | This quote has already settled. |
| MAKER_INVENTORY_SHORT | 409 | The maker’s vault holds less than its leg. |
| MINT_NOT_ALLOWED | 422 | The mint, or the quote’s pair, is not one the desk lists. |
| WALLET_CHANGED_TRANSACTION | 422 | The signed transaction differs from the build in a way the desk does not accept. |
| WALLET_REJECTED | 400 | The wallet declined to sign. |
| SEND_FAILED | 502 | The transaction could not be sent. |
| MAKER_ALREADY_REGISTERED | 409 | The wallet already has a maker account. |
| QUOTE_NOT_FOUND | 404 | No such quote on this request. |
error.stage names where the failure happened. The desk screens name the same stages.
| Stage | Where it failed |
|---|
| validation | The input did not match the contract. |
| auth | Sign-in, the session or the desk keys. |
| read | Reading state, from the database or the chain. |
| upload | Receiving the request body. |
| build | Building the transaction. |
| wallet | Comparing what the wallet returned with what was built. |
| wallet-rejected | The wallet declined to sign. |
| wallet-changed | The wallet changed the transaction it was asked to sign. |
| co_sign | The server adding its own signature, for transactions it co-signs. |
| simulation | Simulating the transaction; the program would refuse it. |
| send | Sending the transaction. |
| confirmation | Following the transaction until it lands; it expired or failed on chain. |
| confirm | Following the transaction until it lands. |