Skip to main content
POST
Unified protocol and venue-account quote auction

Authorizations

X-API-Key
string
header
required

Send the API key in X-API-Key.

Request signing. A key with signing enabled (POST /api/v1/workspaces/{workspaceId}/users/me/api-keys/{keyId}/signing, which returns the signing secret once) must also sign every request:

  • X-Timestamp: the current Unix time in seconds, within 300 seconds of the server clock.
  • X-Signature: lower-case hex HMAC-SHA256 of the canonical string, keyed with the signing secret's 32 bytes (the secret is 64 hex characters; decode it first).

The canonical string is four lines joined by \n, with no trailing newline: the X-Timestamp value, the upper-case method, the path with its query exactly as sent (/api/v1/orders?limit=1), and the lower-case hex SHA-256 of the exact body bytes (the SHA-256 of an empty body when there is none).

A write's signature (POST, PUT, PATCH, DELETE) is accepted once: sending the same signed write again is refused, so a retry signs again. A read (GET, HEAD) changes nothing, so an identical signed read inside the window is admitted again and polling needs no nonce.

A signing refusal is a 401 AUTH_REQUIRED whose details.reason names the cause: SIGNATURE_REQUIRED (a header is missing), SIGNATURE_INVALID (a malformed header or a wrong signature), TIMESTAMP_OUT_OF_RANGE or SIGNATURE_REPLAYED.

Headers

X-Workspace-Id
string<uuid>

The workspace the request acts in. An API key bound to a workspace implies it: omit the header, or send that same id (another id answers 403 WORKSPACE_SCOPE_MISMATCH). A member session must send it (400 MISSING_WORKSPACE without it).

Body

application/json

The POST /quotes request body, told apart by shape: a top-level requote is a Requote; any other object is a pair request (the legacy intent body is retired).

buy
object
required

The Asset the taker buys, and optionally its chain.

sell
object
required

The Asset the taker sells, and optionally its chain.

buyAmount
null | string

The exact amount to buy, a positive decimal string in Asset units. Exactly one of sellAmount and buyAmount.

Example:

"10000"

deliverTo
object

Output to own money, a third-party payee, or an explicit chain address.

New values may be added; treat unknown values as other.

filters
null | object

The public request's narrowing filters; an omitted filter means all.

integrationAppId
string | null
onBehalfOf
string | null

The direct user a broker quotes for.

preferredWallets
object | null

Per CAIP-2 chain: a wallet the caller prefers to sell from, by target id or address. A preference, not a choice: a venue account uses it only where it is one of that account's linked wallets on the venue's network, and otherwise quotes from its own default; a venue is never refused because of it. source.tradingWallets is the explicit choice and wins on its chain.

priceProtectionBps
integer<int32> | null

The bound between a non-firm executable quote and what execution delivers.

Required range: x >= 0
sellAmount
null | string

The exact amount to sell, a positive decimal string in Asset units. Exactly one of sellAmount and buyAmount (400 INVALID_REQUEST naming both otherwise).

Example:

"10000"

sort
null | enum<string>

Default netReceived.

Available options:
netReceived,
eta
source
null | object

An explicit request choice. Every value is a financial-account id.

timeout
null | string<duration>

Collection deadline, an ISO 8601 duration; default PT6S, at least 100 milliseconds and at most PT10S.

Pattern: ^PT(?:[0-9]+H(?:[0-9]+M)?(?:[0-9]+(?:\.[0-9]{1,3})?S)?|[0-9]+M(?:[0-9]+(?:\.[0-9]{1,3})?S)?|[0-9]+(?:\.[0-9]{1,3})?S)$
Example:

"PT120S"

Response

Quotes aggregated successfully: a PairQuoteSet. Accept: text/event-stream selects JSON-data SSE events: quote (PairQuote), source (QuoteSourceEntry), complete (PairQuoteSet), error. A venue the workspace's LP relationship does not allow reads restricted venueRelationship with neutral words in detail and is never asked. Event IDs increase monotonically; the stream includes keepalive comments. Example: broad USD 25000 to USDC, Selini source unavailable accountSetupIncomplete and asked=false; captured live (rfq 2ef31a1ea), one of twelve sources retained and referenceMid omitted. No Selini price or firm ask is implied; Selini USD settlement precision is six decimal places.

POST /quotes 200 body: the quote set. Schema only.

quoteRequestId
string
required

The quote set's id (rq_…), read back at GET /quotes/requests/{quoteRequestId}. The HTTP request id is separate (X-Request-Id, an error body's requestId).

quotes
object[]
required

One venue's quote for the pair. Every field is always present; one that does not apply to the quote's firmness is null:

A stub (sources[].priceOnRequest) is indicative with null amounts.

The example is an executable non-firm quote: 10000 USDC paid, buy.amount 9996.0 USDT lands after the included 4.0 USDT provider fee; netReceived 9994.8 also subtracts the 0.0004 ETH network fee the taker pays separately (included: false, about 1.2 USDT at the Reference mid), so it is lower than buy.amount; minOut 9966.01 (30 bps) bounds buy.amount, not netReceived.

Example:
sourceOptions
object[]
required

The trading wallets this caller may name in source.tradingWallets, per network: each one's stored financial account (acct_…), scoped to the principal (an API key sees only the organisation wallets granted to it). Sent even when no card was priced, so an unbound request learns what to bind. Empty when none is usable.

New values may be added; treat unknown values as other.

sources
object[]
required

Every considered venue, with its outcome.

One considered venue's outcome, a closed set tagged status:

An unscreened default wallet is not a status: the quote carries screening. venue is the venue block, its id the one quote legs and /prices rows carry. Durations (retryAfter) are ISO 8601, counted from when the response was sent. Every entry carries asked: whether this venue was consulted for this request: a live ask, or a fresh read of its published book or live desk price within that source's freshness window. An estimate no venue gave (a model or reference price) is not consulted, and an answered entry is always consulted. How a card's price was obtained is its own price basis, never this flag.

New values may be added; treat unknown values as other.

venueAsked
boolean
required

Whether answering this request contacted any venue (a live or firm ask), always sent; false when every quote came from cache.

referenceMid
null | object

The Reference mid this request's cards were priced against, read once per request. Absent when the read failed or ran past its budget: the cards then read noReferenceMid, never a spread of 0.