API

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

TypeForm
AddressA 32-byte public key in base58: wallets, mints, programs, seal keys, quote keys
SignatureA 64-byte transaction signature in base58
U64An unsigned 64-bit integer as a decimal string. Every token amount is in base units
I64A signed 64-bit integer as a decimal string
DecimalA decimal number as a string, such as a price
IdA UUID
TimestampAn ISO 8601 time in UTC
Base64Bytes 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:

  1. Get a nonce

    GET /auth/nonce from a page on an allowed origin returns the Sign-In With Solana fields and a nonceToken.

  2. Sign

    Pass the fields to the wallet’s sign-in method. It returns the signed message bytes and the signature.

  3. Verify

    POST /auth/verify with the wallet address, the signed message, the signature and the nonceToken returns the token and 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.

bash
curl -s http://127.0.0.1:4720/health
json
{
  "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.

bash
curl -s http://127.0.0.1:4720/v1/desk
json
{
  "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.

bash
curl -s http://127.0.0.1:4720/v1/prices
json
{
  "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.

publicKeyAddressrequired

The wallet that signed, as a base58 address.

signedMessagestringrequired

The exact message bytes the wallet signed, in base64.

signaturestringrequired

The wallet’s Ed25519 signature over those bytes, 64 bytes in base64.

nonceTokenstringrequired

The 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.

sealKeyAddressrequired

Your X25519 public seal key, base58.

quoteKeyAddressrequired

Your 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.

idIdrequired

A 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.

windowSecondsinteger

How long the request stays open for quotes, in seconds. From 15 to 300. Default 60.

envelopesRequestEnvelope[]required

One 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.

Returns a page of InboxItem.

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.

envelopeEnveloperequired

The 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'required

What to build.

quoteKeyAddressrequired

The 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'required

What to build.

quoteKeyAddressrequired

The 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'required

What to build.

mintAddressrequired

A mint the desk lists.

amountU64required

The amount in base units.

With kind: 'withdraw': moves tokens from your vault for that mint back to your wallet.

kind'withdraw'required

What to build.

mintAddressrequired

A mint the desk lists.

amountU64required

The amount in base units.

With kind: 'settle': settles an accepted quote. The response carries a review of both legs and the fee.

kind'settle'required

What to build.

requestIdIdrequired

Your request the quote answers.

quoteSignedQuoterequired

The 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'required

How the transaction reaches the chain.

buildIdIdrequired

The id of the build.

idempotencyKeystringrequired

A 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.

signedTransactionBase64Base64required

The signed transaction, base64.

With mode: 'wallet-sent': your wallet sent the transaction itself; the server follows the signature.

mode'wallet-sent'required

How the transaction reaches the chain.

buildIdIdrequired

The id of the build.

idempotencyKeystringrequired

A 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.

signatureSignaturerequired

The transaction signature, base58.

With mode: 'fixture': fixture mode only; completes a fixture build without a chain.

mode'fixture'required

How the transaction reaches the chain.

buildIdIdrequired

The id of the build.

idempotencyKeystringrequired

A 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.

Returns a page of Fill.

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.

EventdataSent 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'required

fixture in fixture mode, waiting while the chain backend waits for the program, ready when it serves the chain.

mode'fixture' | 'chain'required

fixture serves a stateful stand-in with no chain; chain serves the program on its cluster.

DeskFacts

What the desk trades and on what terms.

cluster'localnet' | 'mainnet'required

The Solana cluster the desk settles on.

programIdAddressrequired

The desk’s program, as a base58 address.

feeBpsintegerrequired

The protocol fee, in basis points of the quote leg. From 0 to 10000.

feeRecipientAddressrequired

The wallet the fee is paid to, as a base58 address.

defaultsobjectrequired

Request and quote timings.

defaults.windowSecondsintegerrequired

The default request window, in seconds.

defaults.quoteValiditySecondsintegerrequired

How long a quote is valid after signing by default, in seconds.

defaults.minWindowSecondsintegerrequired

The shortest request window allowed, in seconds.

defaults.maxWindowSecondsintegerrequired

The longest request window allowed, in seconds.

pairsPair[]required

The pairs the desk lists, with both mints.

houseMakerobjectrequired

The desk’s own maker.

houseMaker.ownerAddressrequired

The house maker’s wallet, as a base58 address.

houseMaker.pairsstring[]required

The pair ids it quotes.

Makers

The maker list.

itemsMaker[]required

Active makers.

ReferencePrices

Reference prices.

itemsReferencePrice[]required

One price per pair.

asOfTimestamprequired

When the list was read.

SignInRequest

The sign-in message to sign.

inputSignInInputrequired

The Sign-In With Solana fields to pass to the wallet’s sign-in method.

nonceTokenstringrequired

Send this back with the signature to POST /auth/verify.

SignInSession

A session.

walletAddressrequired

The signed-in wallet, as a base58 address.

expiresAtTimestamprequired

When the session ends.

tokenstring

The session token, returned once by POST /auth/verify. Send it as Authorization: Bearer &lt;token>. Keep it in memory or session storage, never in a URL.

Me

The signed-in wallet’s desk state.

walletAddressrequired

The signed-in wallet, as a base58 address.

keysRegisteredbooleanrequired

Whether the desk key is registered for this wallet.

sealKeyAddress | nullrequired

The registered seal public key, or null.

quoteKeyAddress | nullrequired

The registered quote public key, or null.

isMakerbooleanrequired

Whether this wallet has a maker account.

RequestEnvelope

One sealed copy of a request.

makerAddressrequired

The maker this copy is sealed to, as a base58 address.

envelopeEnveloperequired

The sealed request.

RequestView

A request as its taker sees it.

idIdrequired

The request id.

takerAddressrequired

The taker’s wallet, as a base58 address.

takerSealKeyAddressrequired

The taker’s seal public key. Makers open the request and seal quotes with it.

status'open' | 'settling' | 'settled' | 'expired' | 'cancelled'required

Where the request stands.

windowSecondsintegerrequired

The request window, in seconds.

createdAtTimestamprequired

When it was posted.

expiresAtTimestamprequired

When the window ends.

updatedAtTimestamprequired

The last change.

envelopesobject[]required

The sealed copies, one per maker asked.

envelopes[].makerAddressrequired

The maker, as a base58 address.

envelopes[].envelopeEnveloperequired

The sealed request for that maker.

quotesQuoteEnvelope[]required

The quote envelopes received, at most one per maker.

acceptedMakerAddress | nullrequired

The maker whose quote is settling or settled, or null.

transactionIdId | nullrequired

The build id of the settlement transaction, or null.

InboxItem

A request as a maker sees it in the inbox.

requestIdIdrequired

The request id.

takerAddressrequired

The taker’s wallet, as a base58 address.

takerSealKeyAddressrequired

The taker’s seal public key, to open the envelope and seal your quote.

envelopeEnveloperequired

The request, sealed to you.

createdAtTimestamprequired

When the request was posted.

expiresAtTimestamprequired

When its window ends.

requestStatus'open' | 'settling' | 'settled' | 'expired' | 'cancelled'required

The request’s status.

state'open' | 'quoted' | 'won' | 'lost' | 'expired'required

Where the request stands for you: won when it settled with your quote, lost when it settled with another, expired when it ended without settling or was cancelled.

quoteQuoteEnvelope | nullrequired

Your 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.

boxstringrequired

The NaCl box: ciphertext with its 16-byte authenticator, base64.

noncestringrequired

The 24-byte box nonce, base64.

QuoteEnvelope

A sealed quote.

requestIdIdrequired

The request it answers.

makerAddressrequired

The maker’s wallet, as a base58 address.

makerSealKeyAddressrequired

The maker’s seal public key, to open the envelope.

quoteKeyAddressrequired

The maker’s registered quote key, to check the signature inside.

envelopeEnveloperequired

The signed quote, sealed to the taker.

createdAtTimestamprequired

When the maker first quoted.

updatedAtTimestamprequired

When 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.

programIdAddressrequired

The desk’s program, as a base58 address.

makerAddressrequired

The maker’s wallet, as a base58 address.

takerAddressrequired

The taker’s wallet, as a base58 address.

baseMintAddressrequired

The base mint, as a base58 address.

quoteMintAddressrequired

The quote mint, as a base58 address.

side'buy' | 'sell'required

The taker’s side.

baseAmountU64required

The size, in base units of the base mint.

quoteAmountU64required

The price of the whole size, in base units of the quote mint, before the fee.

expiresAtI64required

The last moment the quote settles, as Unix seconds.

nonceU64required

A number the maker chooses so two quotes with the same terms hash differently.

signaturestringrequired

The quote key’s Ed25519 signature over the 201-byte quote message, base64.

TransactionBuild

A built, simulated transaction ready for the wallet.

idIdrequired

The build id. Submit and follow with it.

kind'register-maker' | 'set-quote-key' | 'deposit' | 'withdraw' | 'settle'required

What it does.

transactionBase64Base64required

The unsigned v0 transaction, base64, for the wallet to sign.

blockhashAddressrequired

The recent blockhash it was built on.

lastValidBlockHeightintegerrequired

The last block height at which it can land.

expiresAtTimestamprequired

When the build stops being usable: the blockhash or the quote expires, whichever is first.

cosignedbooleanrequired

Whether the server signed it as well.

fixturebooleanrequired

True when built in fixture mode; such a transaction is not meant for a chain.

reviewSettlementReview | nullrequired

For a settlement, what the taker pays and receives and the fee; null for the other kinds.

TransactionStatus

A transaction being followed.

idIdrequired

The build id.

kind'register-maker' | 'set-quote-key' | 'deposit' | 'withdraw' | 'settle'required

What it does.

status'built' | 'submitted' | 'unconfirmed' | 'confirmed' | 'finalized' | 'failed' | 'expired'required

Where it stands. confirmed and finalized are commitment levels; failed and expired are final.

signatureSignature | nullrequired

The transaction signature once sent, base58, or null.

errorErrorDetail | nullrequired

Why it failed or expired, or null.

createdAtTimestamprequired

When it was built.

updatedAtTimestamprequired

The last change.

requestIdId | nullrequired

For a settlement, the request it settles; otherwise null.

Vaults

A maker’s inventory.

makerAddressrequired

The maker’s wallet, as a base58 address.

balancesobject[]required

One balance per listed mint.

balances[].mintAddressrequired

The mint, as a base58 address.

balances[].amountU64required

The vault balance, in base units.

asOfTimestamprequired

When the balances were read.

Fill

A settled trade.

idIdrequired

The fill id.

requestIdId | nullrequired

The request it settled.

makerAddressrequired

The maker’s wallet, as a base58 address.

takerAddressrequired

The taker’s wallet, as a base58 address.

pairstringrequired

The pair id.

side'buy' | 'sell'required

The taker’s side.

baseMintAddressrequired

The base mint, as a base58 address.

quoteMintAddressrequired

The quote mint, as a base58 address.

baseAmountU64required

The size, in base units.

quoteAmountU64required

The quote amount before the fee, in base units.

priceDecimalrequired

Quote tokens per base token, as a decimal string.

feeAmountU64required

The fee paid, in base units of the quote mint.

feeBpsintegerrequired

The fee rate applied.

signatureSignaturerequired

The settlement transaction’s signature.

settledAtTimestamprequired

When it settled.

explorerUrlstring | nullrequired

A link to the transaction on an explorer, or null on a local cluster.

Pair

A pair the desk lists.

id'SOL/USDC' | 'JitoSOL/USDC'required

The pair id.

baseMintrequired

The base mint.

quoteMintrequired

The quote mint.

Maker

A maker and its public keys.

ownerAddressrequired

The maker’s wallet, as a base58 address.

sealKeyAddressrequired

Its seal public key. Seal requests to it.

quoteKeyAddressrequired

Its registered quote key. Quotes from this maker verify against it.

activebooleanrequired

Whether it takes requests.

housebooleanrequired

True for the desk’s own maker.

displayNamestring | nullrequired

A name the desk shows, or null.

ReferencePrice

A reference price.

pairstringrequired

The pair id.

priceDecimalrequired

Quote tokens per base token, as a decimal string.

source'fixture' | 'localnet' | 'jupiter'required

Where it came from: jupiter on mainnet, a fixed stand-in on localnet and in fixture mode.

asOfTimestamprequired

When it was read.

SignInInput

Sign-In With Solana message fields.

domainstringrequired

The domain of the page that asked to sign in.

statementstringrequired

The one line the wallet shows above the fields.

uristringrequired

The page’s origin.

versionstringrequired

The Sign-In With Solana message version.

chainIdstringrequired

The cluster, for example solana:localnet.

noncestringrequired

A one-time value; a signature over it verifies once.

issuedAtTimestamprequired

When the message was issued.

expirationTimeTimestamprequired

When the message stops verifying.

SettlementReview

What a settlement moves, shown before the taker signs.

pairstringrequired

The pair id.

side'buy' | 'sell'required

The taker’s side.

baseAmountU64required

The size, in base units.

quoteAmountU64required

The quote amount before the fee, in base units.

feeBpsintegerrequired

The fee rate applied.

takerPaysLegrequired

What leaves the taker’s wallet. On a buy it includes the fee.

takerReceivesLegrequired

What reaches the taker’s wallet. On a sell the fee is already taken out.

feeLegrequired

The fee, in the quote mint.

ErrorDetail

The body of the error envelope.

codeErrorCoderequired

What went wrong. See Errors.

messagestringrequired

A sentence for a person to read.

retryablebooleanrequired

Whether the same call can succeed later.

stageErrorStagerequired

Where it failed. See the stage table under Errors.

fieldErrorsRecord<string, string[]>

For VALIDATION_ERROR, the messages per input field.

programErrorProgramError

For a failure the program raised, its name and number.

retryAfterSecondsinteger

For RATE_LIMITED, how long to wait.

requestIdstring

An id for this failure in the server’s logs.

Mint

A token mint.

addressAddressrequired

The mint, as a base58 address.

symbolstringrequired

The token symbol.

decimalsintegerrequired

Decimal places of one token. From 0 to 18.

nativebooleanrequired

True for SOL, which settles as wrapped SOL.

Leg

One amount of one mint.

mintAddressrequired

The mint, as a base58 address.

symbolstringrequired

The token symbol.

decimalsintegerrequired

Decimal places of one token.

amountU64required

The amount, in base units.

ProgramError

An error raised by an on-chain program.

programIdAddressrequired

The program that raised it, as a base58 address.

namestringrequired

The program’s error name. See the Program reference.

numberinteger

The 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:

bash
curl -s -H 'X-Fixture: QUOTE_EXPIRED' http://127.0.0.1:4720/v1/prices
json
{
  "error": {
    "code": "QUOTE_EXPIRED",
    "message": "Quote expired.",
    "retryable": false,
    "stage": "build"
  }
}
CodeHTTPMeaning

| 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.

StageWhere 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. |