RFQ V2
RFQ V2 is enabled in production. The generated REST reference, WebSocket reference, and error catalog list the V2 routes, messages, and codes.
V1 RFQ does not change. /rfq/request, /rfq/accept, and the rfq WebSocket channel keep their current contract.
New to quoting? Follow the tutorial: Build an RFQ V2 Maker. It walks through a working demo maker in Python, from receiving RFQs to hedging fills.
Integrating as a maker? The RFQ V2 maker FAQ covers fills, identities, nonces, deadlines, eligibility, and limits.
V2 is a separate, signed RFQ contract. The taker signs the RFQ, the maker signs the quote, and the taker signs the execution. Hypercall checks all three signatures, the remaining size, and both sides' margin when it fills.
What V2 adds over V1:
- Anonymous takers. Makers quote without seeing the taker wallet.
- Selected-maker routing. Send to one maker, a signed set of up to 128, or every eligible maker.
- Indicative quotes. Non-executable price discovery, then a signed firm-up request.
- Partial fills. Three fill policies, including repeated partial fills against one firm quote.
- Sweeps. One signed, atomic execution across up to 1,024 firm quotes.
- Maker controls. Withdraw one quote, every quote on an RFQ, or every open quote at once, plus an account-wide dead-man cancel and per-underlying block MMP.
- Auto execution. The taker signs a premium bound once; the first qualifying firm quote fills.
Availability
| Status | What you see |
|---|---|
| Disabled | Every V2 route returns 403 {"code":"rfq_v2_disabled"}, even for a malformed request. On the socket, AuthenticateRfqV2 answers an Error frame |
| Limited rollout | V2 is open to listed accounts only. An unlisted account gets 403 rfq_v2_not_allowlisted when it creates or replaces an RFQ, publishes or replaces a quote, bulk-withdraws, sets the cancel schedule, or changes block MMP, and 401 rfq_v2_not_allowlisted on reads. A selected_makers RFQ that names an unlisted maker also gets 403 rfq_v2_not_allowlisted. Execution, sweep, cancellation, quote withdrawal, firm-up, and decline act on an RFQ or quote that already passed the check, so they stay available. all_eligible routing reaches listed makers only, and create returns 422 rfq_v2_no_eligible_makers if none remain |
| Enabled | No gate. Production has been enabled since October 16, 2026. Testnet (api.testnet.hypercall.xyz, chain ID 998) is enabled too, for integration before production |
Detect availability by the code, not the status. 403 rfq_v2_disabled means V2 is off. 403 rfq_v2_unauthorized means your signer may not act for the account.
Conventions
Base URLs: https://api.hypercall.xyz and wss://api.hypercall.xyz/ws. V2 lives under /private/.... There is no /v2 path prefix and no public V2 route.
Amounts are decimal strings. Every package, capacity, price, premium, and fee value is an unsigned integer in a JSON string. target, quantity_micros_per_unit, firm quote price_micros, and the auto execution premium_micros are capped at 2^96 - 1. Timestamps (*_ms) and nonce are JSON numbers.
| Quantity | Unit | Example |
|---|---|---|
Package units (target, capacity, package_units, minimum, step) | 1,000,000 = one package | "5000000" is 5 packages |
quantity_micros_per_unit | Contracts per package, times 1,000,000 | "1000000" is 1 contract per package |
price_micros, *_premium_micros, fees | USD times 1,000,000 | "830000000" is $830 |
Leg size in contracts is package_units * quantity_micros_per_unit / 10^12. Positions are held in whole millionths of a contract, so package_units * quantity_micros_per_unit must divide by 1,000,000 for every leg. A size that fails this is refused at execution.
Enums are lowercase snake_case: buy, sell, firm_only, repeated_partial. Addresses, bytes32 values, and signatures are lowercase 0x hex. Signatures are 65 bytes, 0x plus 130 hex characters, with v of 0, 1, 27, or 28.
Errors are {"code": "...", "message": "..."}. Branch on code. Every V2 code starts with rfq_v2_. The full list is in Error codes. Two shared codes come before V2 sees the request: a body that does not decode (bad JSON, unknown enum, uppercase hex, a signature v outside the allowed set) returns 422 invalid_json, and a path ID that is not a UUID returns 400 bad_request.
Responses carry Cache-Control: no-store.
Identifiers, nonces, and operation IDs
Object IDs. terms.id on an RFQ is any non-nil UUID except version 8. A quote terms.id is any non-nil UUID. The ID is its own idempotency key: resending the identical signed body returns the original acknowledgement; different terms under the same ID return 409 rfq_v2_idempotency_conflict. A firm quote that firms up an indicative needs a fresh ID.
Nonces. Same rules as order nonces: a millisecond timestamp within two days before and one day after server time, unique per signer. See Nonce Management. Firm quote nonces and RFQ nonces are each tracked separately from order nonces, so order flow on the same key cannot invalidate a live quote or an open RFQ. When you publish a firm quote, Hypercall refuses a nonce outside that time window with 400 rfq_v2_quote_nonce_rejected. Uniqueness is checked when the quote is first executed, where the nonce is consumed; later partial fills of that quote reuse it. An RFQ create whose nonce is not a current millisecond timestamp (a small counter, for example) is refused with 400 rfq_v2_nonce_out_of_window, as is one whose expires_at_ms is more than 2 days after its nonce. See nonce rules for makers. Indicative quotes carry no nonce. Read grants sign a nonce field like any other message, but it is not checked for reuse; keep it in the signed struct.
Operation IDs must be in-window UUIDv7. These actions take a client operation_id:
- execution and sweep
- RFQ cancellation and quote withdrawal
- bulk withdrawal
- the cancel schedule
- RFQ replacement and quote replacement, firm or indicative
For these, operation_id must be an RFC 9562 version 7 UUID whose embedded timestamp is no more than 1 hour before and no more than 30 seconds after server time. Anything else returns 400 rfq_v2_invalid_operation_id; generate a fresh UUIDv7. A bad signature still reports as a signature error.
Version 8 is reserved for server-derived IDs. Hypercall derives some IDs itself, such as execution_id, as UUID version 8, so a client operation_id with version 8 returns 400 rfq_v2_invalid_request on every route that takes one. Firm-up and decline accept any other non-nil version. Use UUIDv7 everywhere and the rule never bites.
The window is also your retry horizon. Retrying an action with the same operation_id and the identical body returns the original result, but only while the ID is inside the 1-hour window. After that the retry returns 400 rfq_v2_invalid_operation_id and can no longer tell you the outcome, so retry unknown outcomes well inside the hour.
Signing
All V2 messages use the standard Hypercall domain from Authentication: name Hypercall, version 1, the environment's chain ID (999 in production), and verifyingContract 0x0000000000000000000000000000000000000000.
The signer may be the account itself, its on-chain manager, an active API wallet registered on the Account, or an agent approved through /approve-agent by the account (or, for a portfolio-margin Account, by its manager wallet). Signer authority is rechecked on every request, including reads.
| Action | Primary type | Signer |
|---|---|---|
| Create RFQ | AuthorizeRfqV2 | Taker |
| Firm quote | AuthorizeRfqQuoteV2 | Maker |
| Indicative quote | PublishRfqIndicativeQuoteV2 | Maker |
| Firm-up request | RequestFirmRfqQuoteV2 | Taker |
| Decline | DeclineRfqV2 | Maker |
| Execute or sweep | ExecuteRfqV2 | Taker |
| Cancel RFQ, withdraw quote | InvalidateRfqV2 | Taker, maker |
| Bulk withdrawal | BulkWithdrawRfqV2 | Maker |
| Cancel schedule | ScheduleRfqQuoteCancelV2 | Maker |
| Set or remove block MMP | SetRfqMmpConfigV2 | Maker |
| Reset block MMP | ResetRfqMmpV2 | Maker |
| Replace RFQ or quote | ReplaceRfqV2, plus the replacement's own signature | Taker, maker |
| Read session | AuthorizeRfqReadV2 | Any participant |
EIP-712 type definitions
struct RfqV2SigningLeg { bytes32 instrumentId; uint8 takerSide; uint128 quantityMicrosPerUnit; }
struct RfqV2SigningFeeLimits { uint128 perExecutionMicros; uint128 cumulativeMicros; }
struct RfqV2SigningTerms {
bytes16 rfqId; address takerAccount; RfqV2SigningLeg[] legs; uint128 targetUnits;
uint8 fillPolicy; uint128 minimumUnits; uint128 stepUnits;
uint8 executionMode; bool autoMakerReceivesPremium; uint128 autoPremiumLimitMicros;
uint8 quotePolicy; uint8 takerIdentity; uint8 routingMode; address[] selectedMakers;
uint64 quoteDeadlineMs; uint64 expiresAtMs; RfqV2SigningFeeLimits feeLimits;
address builder; bytes32 privateTermsBlinding;
}
struct AuthorizeRfqV2 { RfqV2SigningTerms terms; uint64 nonce; }
struct RfqV2SigningPriceLeg { bytes32 instrumentId; uint128 priceMicros; }
struct RfqFirmQuoteV2SigningTerms {
bytes16 quoteId; bytes16 rfqId; bytes32 rfqTermsCommitment; address makerAccount;
uint64 makerGeneration; uint64 rfqGeneration; RfqV2SigningPriceLeg[] pricedLegs;
uint128 referenceQuantity; bool makerReceivesReferencePremium; uint128 referencePremiumMicros;
uint128 capacity; uint8 fillPolicy; uint128 minimumUnits; uint128 stepUnits;
uint8 withdrawalPolicy; RfqV2SigningFeeLimits feeLimits; uint64 expiresAtMs;
bytes32 protectionScope; bool hasSourceIndicativeQuote; bytes16 sourceIndicativeQuoteId;
}
struct AuthorizeRfqQuoteV2 { RfqFirmQuoteV2SigningTerms terms; uint64 nonce; }
struct RfqIndicativeQuoteV2SigningTerms {
bytes16 quoteId; bytes16 rfqId; bytes32 rfqTermsCommitment; address makerAccount;
RfqV2SigningPriceLeg[] pricedLegs; uint128 referenceQuantity;
bool makerReceivesReferencePremium; uint128 referencePremiumMicros;
uint128 indicatedCapacity; uint64 expiresAtMs;
}
struct PublishRfqIndicativeQuoteV2 { RfqIndicativeQuoteV2SigningTerms terms; }
struct RfqV2ExecutionAllocation { bytes16 quoteId; uint128 packageUnits; }
struct ExecuteRfqV2 {
bytes16 rfqId; bytes16 operationId; RfqV2ExecutionAllocation[] allocations;
uint128 maxFeeMicros; uint64 expiresAtMs; uint64 nonce;
}
struct InvalidateRfqV2 {
bytes16 rfqId; bytes16 quoteId; uint8 scope; uint8 reason;
bytes16 operationId; uint64 expiresAtMs; uint64 nonce;
}
struct RfqV2BulkWithdrawalTarget { bytes16 rfqId; bytes16 quoteId; }
struct BulkWithdrawRfqV2 {
address makerAccount; uint8 scope; bytes16 rfqId; RfqV2BulkWithdrawalTarget[] targets;
bytes16 operationId; uint64 expiresAtMs; uint64 nonce;
}
struct ScheduleRfqQuoteCancelV2 {
bytes16 operationId; address makerAccount; uint64 cancelAtMs; uint64 expiresAtMs; uint64 nonce;
}
struct SetRfqMmpConfigV2 {
bytes16 operationId; address makerAccount; uint64 underlyingId; uint64 intervalMs;
uint64 frozenTimeMs; uint64 quantityLimitMicros; uint64 deltaLimitMicros;
uint32 tradeCountLimit; uint64 expiresAtMs; uint64 nonce;
}
struct ResetRfqMmpV2 {
bytes16 operationId; address makerAccount; uint64 underlyingId; uint64 expiresAtMs; uint64 nonce;
}
struct ReplaceRfqV2 {
bytes16 rfqId; bytes16 oldObjectId; bytes16 newObjectId; uint8 scope;
bytes16 operationId; uint64 expiresAtMs; uint64 nonce;
}
struct RequestFirmRfqQuoteV2 {
bytes16 operationId; bytes16 rfqId; bytes16 indicativeQuoteId;
uint128 requestedUnits; uint64 expiresAtMs; uint64 nonce;
}
struct DeclineRfqV2 { bytes16 rfqId; address makerAccount; bytes16 operationId; uint64 expiresAtMs; uint64 nonce; }
struct AuthorizeRfqReadV2 { address account; uint64 issuedAtMs; uint64 expiresAtMs; uint64 nonce; }
Field encoding:
| Signed field | Encoding |
|---|---|
UUIDs (bytes16) | The 16 raw UUID bytes |
instrumentId | keccak256("instrument" ‖ symbol), symbol as UTF-8, for example BTC-20261225-100000-C |
takerSide | buy = 0, sell = 1 |
fillPolicy | full_size_once = 0 (minimum and step signed as 0), one_smaller_package = 1, repeated_partial = 2 |
executionMode | manual = 0, auto = 1. Manual signs autoMakerReceivesPremium false and autoPremiumLimitMicros 0 |
quotePolicy | firm_only = 0, indicative_allowed = 1 |
takerIdentity | anonymous = 0, disclosed = 1 |
routingMode | all_eligible = 0 (empty selectedMakers), selected_makers = 1 |
withdrawalPolicy | not_permitted = 0, permitted = 1 |
builder, protectionScope | Zero when absent |
sourceIndicativeQuoteId | hasSourceIndicativeQuote false and zero bytes when absent |
InvalidateRfqV2 | Cancel RFQ: scope 0, reason 0, zero quoteId. Withdraw quote: scope 1, reason 1 |
BulkWithdrawRfqV2.scope | quote_ids = 0 (zero rfqId, targets set), rfq = 1 (rfqId set, empty targets), all_open = 2 (both empty) |
ReplaceRfqV2.scope | RFQ = 0, quote = 1 |
ScheduleRfqQuoteCancelV2.cancelAtMs | 0 removes the schedule. In the JSON body, omit cancel_at_ms; do not send 0 |
underlyingId | The first 8 bytes of keccak256("hypercall:underlying-id:v1:" ‖ name) as a big-endian integer, name as UTF-8. Sign the exact name you send: BTC and btc are different IDs. BTC is 0xbfc952036ae4df81 |
SetRfqMmpConfigV2 | Removal signs 0 for intervalMs, frozenTimeMs, quantityLimitMicros, deltaLimitMicros and tradeCountLimit, and the real underlyingId, expiresAtMs and nonce. A limit you leave unset signs 0. In the JSON body, omit config or a limit; do not send 0 |
terms_commitment is the EIP-712 struct hash of RfqV2SigningTerms. Every quote signs it as rfqTermsCommitment, so a quote cannot be moved to another RFQ or to altered terms.
Taker: create an RFQ
POST /private/rfqs
{
"terms": {
"id": "6d3f7a52-9c1e-4b8a-a0f4-2f71c9e0b5d1",
"taker_account": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"legs": [
{ "instrument": "BTC-20261225-100000-C", "taker_side": "buy", "quantity_micros_per_unit": "1000000" },
{ "instrument": "BTC-20261225-120000-C", "taker_side": "sell", "quantity_micros_per_unit": "1000000" }
],
"target": "5000000",
"fill_policy": { "mode": "repeated_partial", "minimum": "1000000", "step": "1000000" },
"execution_mode": "manual",
"auto_execution_limit": null,
"quote_policy": "indicative_allowed",
"taker_identity": "anonymous",
"routing": {
"mode": "selected_makers",
"makers": ["0x1111111111111111111111111111111111111111", "0x2222222222222222222222222222222222222222"]
},
"quote_deadline_ms": 1792159220000,
"expires_at_ms": 1792159260000,
"fee_limits": { "per_execution": "0", "cumulative": "0" },
"private_terms_blinding": "0x5be1c0b4d08e2f6c3a97f4e1d2b8a6c50f3e9d7a1b4c8e2f6a0d3b5c7e9f1a2b"
},
"nonce": 1792159200000,
"signature": "0x..."
}
201 response:
{
"rfq_id": "6d3f7a52-9c1e-4b8a-a0f4-2f71c9e0b5d1",
"status": "open",
"terms_commitment": "0x4ac1...",
"quote_deadline_ms": 1792159220000,
"expires_at_ms": 1792159260000
}
A 201 means the RFQ is signature-checked, stored, and sent to makers. It reserves no margin. The RFQ nonce is used on the first fill; later partial fills reuse it.
| Field | Values | Rule |
|---|---|---|
legs | 1 to 10 | No repeated instrument. Instruments must be listed and open for RFQ, else 422 rfq_v2_unknown_instrument. Quotes price legs in this order |
target | package units | Nonzero |
fill_policy.mode | full_size_once, one_smaller_package, repeated_partial | See Fill policies |
execution_mode | manual, auto | auto requires auto_execution_limit; manual forbids it |
auto_execution_limit | {maker_receives_premium, premium_micros} or null | Premium bound per package (1,000,000 units), scaled by the executed size. maker_receives_premium: true caps the taker's debit; false floors the taker's credit |
quote_policy | firm_only, indicative_allowed | Part of the signed terms. The HTTP API reads an omitted field as firm_only; the Rust SDK requires it. Gates indicative quotes and firm-ups |
taker_identity | anonymous, disclosed | Anonymous requires a nonzero private_terms_blinding |
routing.mode | all_eligible, selected_makers | Selected set: 1 to 128 addresses, sorted ascending by raw bytes, no zero or duplicate address. The RFQ goes to the selected makers that are eligible now; the rest are skipped without telling you which. If none is eligible, create returns 422 rfq_v2_no_eligible_makers. Either mode skips makers that share a principal with you (see self-trade) |
quote_deadline_ms | ms | In the future and before expires_at_ms. Quotes, firm-ups, and declines close at this time. The taker chooses it; Hypercall sets no minimum or maximum gap |
expires_at_ms | ms | Last instant any fill can land. At most nonce + 172800000 (2 days): the RFQ's nonce is consumed at its first fill, which must still be inside the nonce window. A create with a later expires_at_ms, or a nonce outside the window now, returns 400 rfq_v2_nonce_out_of_window |
fee_limits | {per_execution, cumulative} | Builder fee ceilings. Nonzero values require builder; per_execution at most cumulative |
builder | {recipient} or omitted | Builder attribution address |
private_terms_blinding | bytes32 | 32 bytes from a cryptographically secure random generator (CSPRNG), fresh per anonymous RFQ. A predictable value lets makers recover the hidden taker account |
Builder fees are zero at launch. Hypercall charges no V2 builder fee yet; fee_micros in every fill is "0". Signed fee ceilings still bind.
Anonymous is not unsigned. taker_account stays in the signed terms. Maker views drop it, along with routing, builder, and private_terms_blinding.
Your auto limit stays private. Maker views never carry auto_execution_limit. A maker sees execution_mode: "auto" and nothing about the bound, so it cannot quote up to your limit.
Maker: discover, quote, decline
Read grants
Private reads and the socket use a signed read grant, not the request signature.
{ "account": "0x1111...", "issued_at_ms": 1792159200000, "expires_at_ms": 1792159500000, "nonce": 1792159200000, "signature": "0x..." }
Sign AuthorizeRfqReadV2 with any key that may sign for the account: the account itself, its on-chain manager, an active API wallet registered on the Account, or an agent the account approved (for a portfolio-margin Account, also an agent its manager approved). Encode the JSON as base64url without padding (at most 1,024 bytes encoded) and send Authorization: Bearer <token>. A grant is refused if it is already expired, if issued_at_ms is more than 30 seconds ahead of the server clock, or if it is valid for more than 5 minutes, counted both from issued_at_ms (expires_at_ms - issued_at_ms <= 300000) and from the server clock. Reuse a grant until it expires, then sign a new one.
Discovery
Makers learn about a new RFQ from the rfq_v2 channel or from the change feed. Subscribe with "view": "full" and each change arrives as RfqV2Rfq, carrying the same maker view a read returns, so you can price straight off the socket. In the default hint mode, or for a change you missed, read the RFQ:
GET /private/rfqs/{rfq_id}
Authorization: Bearer <grant>
The maker view carries parent.view: "maker" with the economic terms, taker_account only when the RFQ is disclosed, and the fence values your next firm quote must sign. It never carries the taker's auto_execution_limit; you do not need it to sign, since a quote binds the RFQ through terms_commitment:
"maker_quote_generation": { "maker_generation": 3, "rfq_generation": 0 }
Your enrollment and eligibility
GET /private/rfq-provider returns your own enrollment:
{
"account": "0x1111...",
"enrolled": true,
"provider": "0x2222...",
"status": "active",
"tier": "qp1",
"allowed_underlyings": ["BTC"],
"receives_open_rfqs": true
}
- Open RFQs (
all_eligiblerouting) reach enrolled, active quote providers whose allowed underlyings cover every leg. - Selected RFQs can name any funded account. An account that is not enrolled can quote an RFQ whose taker names it. An enrolled account stays bound by its enrollment's status and underlyings.
- Enrollment fields are
nullwhen you are not enrolled.
Quote fences
Every firm quote signs the two fence values above, copied from your latest read of the RFQ. They let one withdrawal kill quotes you have already sent:
- A bulk withdrawal with scope
all_open, or a fired scheduled cancel, invalidates every withdrawable quote you signed before it, on every RFQ, including quotes still in flight. - A bulk withdrawal with scope
rfqinvalidates every withdrawable quote you signed before it on that RFQ only, including quotes still in flight. Your quotes on other RFQs stay live. - Invalidated quotes return
409 rfq_v2_quote_revoked. - Withdrawing quotes by ID leaves the fence values unchanged.
Never compute the values yourself. After a bulk withdrawal with scope rfq or all_open, sign the maker_generation (and, for rfq, the rfq_generation) its response returns. After any other withdrawal or a fired schedule, re-read the RFQ and sign what it returns.
Quotes signed with withdrawal_policy: "not_permitted" ignore withdrawals and the scheduled cancel, and stay executable until they expire. Use that policy only for quotes you are prepared to see filled until then.
Firm quote
POST /private/rfqs/{rfq_id}/quotes/firm
{
"terms": {
"id": "0e9b3c1a-7f45-4d2e-9b8c-1a2d3e4f5a6b",
"rfq_id": "6d3f7a52-9c1e-4b8a-a0f4-2f71c9e0b5d1",
"rfq_terms_commitment": "0x4ac1...",
"maker_account": "0x1111111111111111111111111111111111111111",
"maker_generation": 3,
"rfq_generation": 0,
"priced_legs": [
{ "instrument": "BTC-20261225-100000-C", "price_micros": "830000000" },
{ "instrument": "BTC-20261225-120000-C", "price_micros": "320000000" }
],
"reference_quantity": "1000000",
"maker_receives_reference_premium": true,
"reference_premium_micros": "510000000",
"capacity": "5000000",
"fill_policy": { "mode": "repeated_partial", "minimum": "1000000", "step": "1000000" },
"withdrawal_policy": "permitted",
"fee_limits": { "per_execution": "0", "cumulative": "0" },
"expires_at_ms": 1792159245000,
"protection_scope": null,
"source_indicative_quote_id": null
},
"nonce": 1792159209000,
"signature": "0x..."
}
Quote rules:
priced_legsmatch the RFQ's legs one for one, in order.fill_policyequals the RFQ's exactly.capacityis at most the RFQtargetand on the step grid;reference_quantityis at mostcapacity. Afull_size_oncequote sets both to the RFQ target.expires_at_msis at most the RFQ'sexpires_at_ms. Quoting closes at the RFQ'squote_deadline_ms.fee_limitsare at most the RFQ's.- Reference premium must be exact. Sum
price_micros * quantity_micros_per_unit * reference_quantity / 10^12over legs, adding legs the taker buys and subtracting legs the taker sells. A positive result means the maker receives: signmaker_receives_reference_premium: trueand the amount. Zero signsfalse. Each step-sized fill must also come out in whole micros. In the example: (830 - 320) x 1 x 1 = $510, maker receives. source_indicative_quote_idlinks a firm-up to its indicative quote (same maker,indicative_allowedRFQ, different ID).nullfor a direct firm quote.
201 response:
{
"firmness": "firm",
"quote_id": "0e9b3c1a-7f45-4d2e-9b8c-1a2d3e4f5a6b",
"status": "open",
"executable": true,
"remaining_capacity": "5000000",
"preflight": { "status": "passed", "checked_at_ms": 1792159209120 }
}
Preflight
A firm quote whose maker account, provider, or signer shares a principal with the taker is refused with 409 rfq_v2_self_trade before any check below.
Before relaying a firm quote, Hypercall runs a margin check on the maker at the quote's full capacity, the largest size it can fill.
preflight.status | Result |
|---|---|
passed | Stored and relayed |
unavailable_admitted | The check could not run. Stored and relayed; margin is checked at execution |
rejected | 422 rfq_v2_preflight_rejected. Not relayed. The RFQ stays open; send a fresh quote before the deadline |
Preflight reserves no margin and promises no fill. Margin is checked again at the executed size. A quote that loses a race with a fill, a withdrawal, or a deadline is not relayed as executable.
Indicative quote
Only on indicative_allowed RFQs. Same terms shape as a firm quote minus fence values, fill policy, withdrawal policy, fees, protection scope, and source link, with indicated_capacity in place of capacity. Body is {terms, signature}: no nonce.
POST /private/rfqs/{rfq_id}/quotes/indicative
Response: {"firmness":"indicative","quote_id":"...","status":"open","executable":false,"indicated_capacity":"5000000"}. No preflight, no reservation, never executable. Passing an indicative ID to an execution returns 400 rfq_v2_quote_not_executable.
Decline
POST /private/rfqs/{rfq_id}/declines
{ "operation_id": "01a14503-38dc-72bc-a2d1-beb3ab04b646", "maker_account": "0x1111...", "expires_at_ms": 1792159215000, "nonce": 1792159201500, "signature": "0x..." }
Returns {"operation_id":"...","status":"declined"}. Closes at the quote deadline. The taker sees every decline in declined_makers on the RFQ read; a maker sees only its own. Declines are never public. A decline and an executable firm quote from the same maker never coexist on one RFQ: while you have an executable firm quote on the RFQ, a decline returns 409 rfq_v2_decline_with_live_quote (withdraw the quote first, by ID or with a bulk withdrawal scoped to the RFQ, then decline), and after you decline, a firm quote on that RFQ returns 409 rfq_v2_maker_declined.
Taker: firm-up
Ask the maker of an open indicative quote for executable terms.
POST /private/rfqs/{rfq_id}/quotes/{indicative_quote_id}/firm-up-requests
{ "operation_id": "01a14503-3ad0-76a3-b5b3-a3216cb18501", "requested_units": "3000000", "expires_at_ms": 1792159212000, "nonce": 1792159202000, "signature": "0x..." }
Returns {"operation_id":"...","status":"requested"}. The request is delivered to the maker and nothing else: it changes nothing on the indicative quote, reserves nothing, and does not oblige the maker. The maker answers with a fresh firm quote (new ID, new nonce, source_indicative_quote_id set), which may carry a different price, size, and expiry. The first linked firm quote marks the indicative firmed.
Execute
One quote
POST /private/rfqs/{rfq_id}/executions
{
"operation_id": "01a14503-61e0-7cac-9a5d-5ba4beb4fc1b",
"quote_id": "0e9b3c1a-7f45-4d2e-9b8c-1a2d3e4f5a6b",
"package_units": "2000000",
"max_fee_micros": "0",
"expires_at_ms": 1792159230000,
"nonce": 1792159212000,
"signature": "0x..."
}
200 response:
{
"operation_id": "01a14503-61e0-7cac-9a5d-5ba4beb4fc1b",
"status": "filled",
"executions": [
{
"execution_id": "9b2f...",
"quote_id": "0e9b3c1a-7f45-4d2e-9b8c-1a2d3e4f5a6b",
"maker_account": "0x1111111111111111111111111111111111111111",
"maker_provider": "0x1111111111111111111111111111111111111111",
"maker_signer": "0x3333333333333333333333333333333333333333",
"package_units": "2000000",
"fee_micros": "0"
}
],
"rfq_remaining_target": "3000000",
"quote_remaining_capacity": "3000000"
}
status: "filled" describes this execution. The RFQ can still have target left. maker_account takes the position and premium; maker_provider is the enrolled quote provider that routed it; maker_signer signed the quote.
execution_id is a server-derived UUID version 8, stable for the execution. This response goes to the taker. The maker reads the same execution, with per-leg sizes and prices, from GET /private/rfqs/executions, gets a change on the rfq_v2 channel, and gets one Fill per leg on the fills channel and GET /fills. Every RFQ V2 fill, maker and taker, carries rfq_id, quote_id, and execution_id, matching this response. See Fills and attribution.
Sweep
POST /private/rfqs/{rfq_id}/sweeps
{
"operation_id": "01a14503-6d98-71d5-a57b-33a5eb6093e6",
"allocations": [
{ "quote_id": "0e9b3c1a-7f45-4d2e-9b8c-1a2d3e4f5a6b", "package_units": "3000000" },
{ "quote_id": "c41d8e2b-5a3f-4e6d-8b9a-0f1e2d3c4b5a", "package_units": "2000000" }
],
"max_fee_micros": "0",
"expires_at_ms": 1792159230000,
"nonce": 1792159215000,
"signature": "0x..."
}
Allocation order and sizes are signed. A sweep fills every allocation or none. At most 1,024 allocations, else 400 rfq_v2_too_many_targets. An empty list or a repeated quote returns 400 rfq_v2_invalid_terms. Same response shape, one entry per allocation. quote_remaining_capacity is present only when the execution used one quote; a sweep across several quotes returns rfq_remaining_target alone, so read each quote for its capacity.
What Hypercall checks at execution
Every execution checks: all signatures and signer approval, that the quote was signed for this RFQ, that the RFQ, quote, and execution are unexpired, that the quote has not been withdrawn or cancelled, the fill policy on both documents, remaining target and capacity, the size grid, fee ceilings, and self-trade (taker and maker resolving to the same account, on-chain manager, signer, or provider: 409 rfq_v2_self_trade). Then it checks market state and both sides' margin. Order-book MMP does not apply to RFQ: a maker's order-book MMP freeze does not block its RFQ executions. Block MMP does: a permitted quote whose maker is frozen on an underlying of the package is refused.
| Refusal | Code | What to do |
|---|---|---|
| Size breaks the fill policy or exceeds remaining capacity or target | 409 rfq_v2_capacity_unavailable | Re-read, resize, re-sign |
| Quote or RFQ already used up, withdrawn, cancelled, or replaced | 409 rfq_v2_authorization_terminal | Stop. Pick another quote |
| Quote signed before a maker withdrawal or fired cancel | 409 rfq_v2_quote_revoked | Stop. Pick another quote |
The maker is frozen by block MMP on an underlying of the package, and the quote is permitted | 409 rfq_v2_mmp_frozen | Pick another quote, or wait for the maker to sign a fresh one |
| Margin, funding, or position check refuses | 409 rfq_v2_risk_rejected | Nothing filled and no nonce was used. The same signed request may pass later |
| Request does not match the signed documents (reused nonce, mismatched terms, off-grid size, a fill amount over the fill size limit) | 409 rfq_v2_authority_rejected | Final for that request. Fix and re-sign |
| Outcome unknown | 503 rfq_v2_authority_unavailable | Retry the identical request with the same operation_id. See Unknown outcomes |
Fill size limit
In one fill, each leg size must be below 10^12 contracts, and each leg price, leg premium, package premium, and option leg underlying notional (size times spot) below 10^12 USD. In micros that is 10^18. A sweep applies the limit to each allocation; the sweep total is not limited. Signed terms can be larger; split the execution.
Fill policies and repeated partial fills
| Policy | Fills allowed |
|---|---|
full_size_once | One fill of exactly the full target. The quote's capacity and reference_quantity equal the target |
one_smaller_package | One execution, at least minimum, a multiple of step. A sweep counts as one execution, so it may split that size across several quotes. Whatever is left after it is unusable |
repeated_partial | Any number of executions, each at least minimum, a multiple of step, and within what is left |
The RFQ's policy judges the execution; each quote's policy judges its allocation. The taker's fill_policy is checked once against a sweep's total units, so a one_smaller_package RFQ can take its one package from several quotes in one sweep. Each quote's own fill_policy, capacity, and fee limits are still checked against the units allocated to that quote, and a quote signs its RFQ's policy exactly, so every allocation must itself meet the shared minimum and step. Against minimum 5, a sweep of 5 and 5 executes; 3 and 4 does not.
minimum and step are at most the target, and minimum, the target, and each quote's capacity are multiples of step.
Repeated partials against one quote. Capacity is tracked per quote; target is tracked per RFQ. Each fill uses both, and every response returns the RFQ remainder (and the quote remainder when one quote was used). A taker can hit the same firm quote repeatedly until its capacity, the RFQ target, or a deadline runs out, and can mix quotes from several makers across executions or within a sweep. There is no exception for a final remainder below minimum: once what is left is under minimum, the quote reads executable: false.
Auto execution. On an auto RFQ, Hypercall fills the first qualifying firm quote at the largest size both signed fill policies, the size grid, and the remainders allow, within the signed premium bound. The taker sends no execution request. An auto fill never happens twice for the same quote usage, and each later partial is a separate fill. If publication returns 503 rfq_v2_auto_execution_unavailable, the quote was accepted and the auto fill is still pending; retry the identical publication.
Cancel, withdraw, replace
All take {operation_id, expires_at_ms, nonce, signature} (UUIDv7 operation ID) unless shown.
| Action | Route | Signer | Response |
|---|---|---|---|
| Cancel RFQ | POST /private/rfqs/{rfq_id}/cancellations | Taker | 200 {operation_id, status: "cancelled"} |
| Withdraw quote | POST /private/rfqs/{rfq_id}/quotes/{quote_id}/withdrawals | Maker | 200 {operation_id, status: "withdrawn"}, or 409 rfq_v2_already_inactive if the quote was already withdrawn, filled, expired, or replaced |
| Replace RFQ | POST /private/rfqs/{rfq_id}/replacements | Taker | 201, create response for the new RFQ |
| Replace quote | POST /private/rfqs/{rfq_id}/quotes/{quote_id}/replacements | Maker | 201, publish response for the new quote |
| Bulk withdrawal | POST /private/rfq-quote-withdrawals | Maker | 200 {operation_id, status: "withdrawn", maker_generation?, rfq_generation?}, plus results for quote_ids |
| Set or remove block MMP | POST /private/rfq-mmp-config | Maker | 200 {operation_id, underlying, config}. See Block MMP |
| Reset block MMP | POST /private/rfq-mmp-reset | Maker | 200 {operation_id, status: "reset"}. See Block MMP |
Replacement is never an in-place edit. The body is {operation_id, replacement, expires_at_ms, nonce, signature}: replacement is a complete, separately signed create or publish body with a new ID, and the outer signature is ReplaceRfqV2 binding the old and new IDs. The old object closes and the new one opens in one step.
Bulk withdrawal takes maker_account and a scope:
{ "mode": "quote_ids", "quote_ids": [{ "rfq_id": "...", "quote_id": "..." }] }
{ "mode": "rfq", "rfq_id": "..." }
{ "mode": "all_open" }
quote_ids holds at most 64 distinct pairs, else 400 rfq_v2_too_many_targets. It is best effort per pair: every named quote that can still execute is withdrawn, and a pair that cannot be withdrawn does not stop the rest. The response lists each pair in request order:
{
"operation_id": "...",
"status": "withdrawn",
"results": [
{ "rfq_id": "...", "quote_id": "...", "status": "withdrawn" },
{ "rfq_id": "...", "quote_id": "...", "status": "already_inactive" },
{ "rfq_id": "...", "quote_id": "...", "status": "not_found" }
]
}
status | Meaning |
|---|---|
withdrawn | This request withdrew the quote |
already_inactive | The quote was no longer executable when this request reached it: already withdrawn (by an earlier request, a scoped or all-open withdrawal, or a fired cancel schedule), filled, expired, or replaced |
not_found | No firm quote of yours under that RFQ. Unknown IDs, indicative quotes, and other makers' quotes look alike |
not_permitted | You signed the quote with withdrawal_policy: not_permitted |
unauthorized | The quote's signer is no longer an agent of your account, or the RFQ's signer of the taker's |
A malformed request (bad signature, repeated pair, too many pairs, expired action) still fails as a whole. rfq and all_open invalidate every withdrawable quote you signed for that RFQ, or for every RFQ, including quotes still in flight (see Quote fences). The 200 arrives only once the withdrawal has taken effect. For rfq and all_open it also returns the fence values to sign next: maker_generation for both, plus rfq_generation for rfq. They are read after the withdrawal commits, so they may already include a later fence. quote_ids moves no fence and returns neither field.
Dead-man switch: scheduled quote cancel
A maker sets an account-wide deadline. If it is not renewed, every permitted firm quote of that maker, on every RFQ, stops being executable at that time.
POST /private/rfq-quote-cancel-schedule
{
"operation_id": "01a14503-5628-789d-b927-3a1e9ac8d854",
"maker_account": "0x1111111111111111111111111111111111111111",
"cancel_at_ms": 1792159230000,
"expires_at_ms": 1792159220000,
"nonce": 1792159209000,
"signature": "0x..."
}
Response: {"operation_id":"...","cancel_at_ms":1792159230000}. Trust the returned value; a renewal that timed out may not have taken effect.
- Lead time:
cancel_at_msat least 5,000 ms in the future, else422 rfq_v2_deadline_too_short. No maximum. - Renew by sending a later
cancel_at_msbefore the current one arrives. Each request replaces the schedule. - Clear by omitting
cancel_at_ms(signed ascancelAtMs = 0). An explicit0in the JSON is refused with400 rfq_v2_invalid_terms. If the old deadline is already due when you renew or clear, it fires first. - On fire: every withdrawable quote you signed before the deadline is dead, and the schedule is removed. A quote cannot fill after its deadline, even in the moment before the cancel shows up in reads.
- Scope: account-wide, not per socket. A dropped connection cancels nothing. RFQs and other makers' quotes are untouched.
not_permittedquotes are exempt. Indicative quotes were never executable. - Order-book MMP does not cover RFQ. RFQ fills do not count toward order-book MMP limits. To cap RFQ exposure per underlying, use block MMP.
Block MMP
Block MMP stops your RFQ V2 quoting on one underlying once your fills on it pass a limit within a rolling window. It is separate from order-book MMP, which never counts RFQ fills.
How it works:
- Window. For each underlying you configure, Hypercall keeps your RFQ V2 fills from the last
interval_ms. A fill older than that leaves the window. - Trades. Each of your allocations in an execution is one trade on each underlying its legs trade.
- Quantity is the sum of the absolute leg sizes on that underlying, in contracts.
- Delta is your net delta from those fills, tracked only when you set a delta limit. An option leg counts its option delta at the fill, from the same market data as order-book MMP. A perpetual leg counts 1 delta per contract, so a package's delta hedge offsets its options. If Hypercall cannot compute a leg's delta, the fill trips the limit.
- Trip. After each execution, Hypercall compares the window totals with your limits. A total strictly above its limit trips. Every allocation of that execution still fills.
- On a trip, Hypercall freezes you on that underlying, clears its window, and revokes every
permittedfirm quote you signed, on every RFQ and every underlying, as anall_openbulk withdrawal does. Yourmaker_generationadvances. - While frozen, a
permittedfirm quote with a leg on that underlying is refused with409 rfq_v2_mmp_frozen, when you publish it and at execution.not_permittedquotes are exempt: they stay executable, and their fills still count toward the window. - The freeze ends
frozen_time_msafter the trip, or, withfrozen_time_ms0, when you reset.
Set or remove limits
POST /private/rfq-mmp-config
{
"operation_id": "01a14503-5628-789d-b927-3a1e9ac8d855",
"maker_account": "0x1111111111111111111111111111111111111111",
"underlying": "BTC",
"config": {
"interval_ms": 60000,
"frozen_time_ms": 30000,
"quantity_limit_micros": "25000000",
"delta_limit_micros": "3000000",
"trade_count_limit": 10
},
"expires_at_ms": 1792159220000,
"nonce": 1792159209000,
"signature": "0x..."
}
| Field | Meaning |
|---|---|
underlying | Canonical underlying name, such as BTC. Names are case-sensitive. An underlying Hypercall does not list returns 422 rfq_v2_unknown_underlying |
config.interval_ms | Window length, 1 to 86,400,000 ms (one day) |
config.frozen_time_ms | Freeze length after a trip. 0 freezes until you reset |
config.quantity_limit_micros | Contracts in the window, times 1,000,000, as a string. "25000000" is 25 contracts |
config.delta_limit_micros | Absolute net delta in the window, times 1,000,000, as a string. "3000000" is 3 delta |
config.trade_count_limit | Trades in the window, as a number |
Set at least one limit. Send null, or omit the field, to leave a limit unset. No limit, a zero interval or limit, or an interval over one day returns 400 rfq_v2_invalid_mmp_config.
Response: {"operation_id":"...","underlying":"BTC","config":{...}}.
- Setting replaces the limits and clears the window. A current freeze stays.
- To remove the configuration, omit
config. Removal also lifts a freeze.
Reset after a trip
POST /private/rfq-mmp-reset
The body is {operation_id, maker_account, underlying, expires_at_ms, nonce, signature}, signed as ResetRfqMmpV2. Response: {"operation_id":"...","status":"reset"}. A reset lifts the freeze and clears the window. It keeps the limits and tripped_at_ms. A reset on an underlying without a configuration returns 409 rfq_v2_mmp_not_configured.
After a trip, your earlier permitted quotes stay revoked. Sign new quotes with the maker_generation from the status read below or from an RFQ read.
Read your status
GET /private/rfq-mmp takes a read grant like every other read and returns your block MMP on each configured underlying:
{
"maker_account": "0x1111111111111111111111111111111111111111",
"maker_generation": 4,
"underlyings": [
{
"underlying": "BTC",
"config": {
"interval_ms": 60000,
"frozen_time_ms": 30000,
"quantity_limit_micros": "25000000",
"delta_limit_micros": "3000000",
"trade_count_limit": 10
},
"frozen": true,
"frozen_until_ms": 1792159239000,
"frozen_until_reset": false,
"tripped_at_ms": 1792159209000,
"trade_count": 0,
"quantity_micros": "0",
"net_delta_micros": "0"
}
]
}
| Field | Meaning |
|---|---|
maker_generation | Your current quote fence. Sign fresh firm quotes with it |
frozen | Whether permitted quotes on this underlying are refused now |
frozen_until_ms | When a timed freeze ends. null when not frozen or frozen until reset |
frozen_until_reset | Frozen until you reset |
tripped_at_ms | The last trip. Kept after a reset |
trade_count, quantity_micros | Window totals at the read. A trip clears them |
net_delta_micros | Signed net delta in the window, as a string. null without a delta limit |
Reads and the change feed
All reads need Authorization: Bearer <grant>. Every refused grant returns 401, and the code says why: rfq_v2_session_required (no Authorization header), rfq_v2_grant_malformed (not a bearer, over 1,024 bytes, or not an encoded grant), rfq_v2_grant_expired (sign a new one), rfq_v2_grant_window_invalid (issued more than 30 seconds ahead of server time, or valid for more than 5 minutes), rfq_v2_grant_signature_invalid, rfq_v2_grant_unauthorized (the signer may not sign for the account), or rfq_v2_not_allowlisted.
| Route | Returns |
|---|---|
GET /private/rfqs | {rfqs, page, as_of_sequence}. Query: role (taker, maker, either; default either), status, limit (default 50, max 100), and cursor or after_sequence, not both |
GET /private/rfqs/{rfq_id} | One RFQ: rfq_id, status, terms_commitment, parent (tagged by view: taker or maker), target, remaining_target, quote_policy, maker_quote_generation (maker only), declined_makers (when present) |
GET /private/rfqs/{rfq_id}/quotes | {quotes, page, as_of_sequence}. Query: firmness, status, include_terminal (default false), limit (default 50, max 100), cursor or after_sequence |
GET /private/rfqs/{rfq_id}/quotes/{quote_id} | One quote, tagged by firmness, with terms, status, executable, provider, signer, and for firm quotes remaining_capacity and preflight |
GET /private/rfqs/changes | {changes: [{rfq_id, sequence}], next_after_sequence, has_more}. Query: after_sequence, limit (1 to 100, default 100) |
GET /private/rfqs/executions | {executions, next_after_sequence, has_more}: every execution where your account is the maker or the taker, in commit order. Query: after_sequence (default 0), limit (1 to 500, default 100). See Executions |
GET /private/rfq-provider | Your own enrollment and eligibility. See Your enrollment and eligibility |
GET /private/rfq-mmp | Your block MMP limits, freezes, and window totals. See Read your status |
GET /private/rfqs/{rfq_id}/activity | Aggregate counts only (deliveries, indicative and firm responses, firm-ups, declines, preflight rejections, withdrawals, no-response by deadline), never wallets or terms. The taker sees its RFQ's totals; a maker sees only its own. Non-participants get 403 rfq_v2_unauthorized |
page is {limit, next_cursor, has_more}. RFQ list pages (GET /private/rfqs) and quote list pages (GET /private/rfqs/{rfq_id}/quotes) each scan a bounded slice of history, so with a status filter (or, for quotes, firmness or include_terminal) a page can return fewer than limit items, or none, with has_more: true. Keep paging with next_cursor until has_more is false. RFQ statuses: open, partially_filled, filled, expired, cancelled, replaced. Quote statuses: open, partially_filled, filled, expired, closed, withdrawn, replaced, firmed.
Visibility. A taker reads every quote on its RFQ. A maker reads RFQs routed to it and only its own quotes, never a competitor's. Closed quotes stay readable, but the quote list hides them by default: it returns executable firm quotes and open indicative quotes unless you pass include_terminal=true. Old RFQs stay readable with their final remainders and statuses.
Check executable, not status. A quote can read open after its RFQ filled or was cancelled.
Expiry emits nothing. Passing a signed deadline creates no change-feed row and no socket hint. Refresh anything you display at its deadline.
Executions
GET /private/rfqs/executions is the cursor makers use to book fills. Each execution is one allocation of one quote:
{
"executions": [{
"sequence": 42,
"execution_id": "4c1b9e3a-6f0d-8a2e-b5c7-1d9f3e8a6b20",
"rfq_id": "6d3f7a52-9c1e-4b8a-a0f4-2f71c9e0b5d1",
"quote_id": "01a14503-2f4e-7c3a-9b1d-5e6f7a8b9c0d",
"role": "maker",
"maker_account": "0x1111...",
"package_units": "1000000",
"fee_micros": "0",
"executed_at_ms": 1792159210450,
"legs": [
{ "instrument": "BTC-20261225-100000-C", "side": "sell", "quantity_micros": "1000000", "price_micros": "4200000000" },
{ "instrument": "BTC-20261225-120000-C", "side": "buy", "quantity_micros": "1000000", "price_micros": "1500000000" }
]
}],
"next_after_sequence": 42,
"has_more": false
}
role and each leg's side are from your account's point of view. quantity_micros is contracts times 1,000,000; price_micros is the leg price you signed. Save next_after_sequence after applying a page and resume from it after a restart: each execution appears once, in commit order. execution_id matches the fills messages and rows for the same legs.
Change feed. The feed lists only RFQ IDs that changed for your account. Read the named RFQs and quotes, apply them, then save next_after_sequence. Gaps in sequence are normal: other accounts' changes are omitted. Page until has_more is false.
WebSocket
Same /ws connection. The legacy Authenticate message and ?wallet= do not authorize rfq_v2.
{"type":"AuthenticateRfqV2","token":"<base64url read grant>"}
{"type":"RfqV2Authenticated","account":"0x1111111111111111111111111111111111111111"}
{"type":"Subscribe","channel":"rfq_v2"}
{"type":"Subscribed","channel":"rfq_v2"}
{"type":"RfqV2Changed","rfq_id":"6d3f7a52-9c1e-4b8a-a0f4-2f71c9e0b5d1","sequence":812045}
Full view. Subscribe with "view": "full" to receive each change as the RFQ itself:
{"type":"Subscribe","channel":"rfq_v2","view":"full"}
{"type":"RfqV2Rfq","sequence":812045,"rfq":{"rfq_id":"6d3f7a52-9c1e-4b8a-a0f4-2f71c9e0b5d1","status":"open","parent":{"view":"maker","terms":{}},"maker_quote_generation":{"maker_generation":3,"rfq_generation":0}}}
rfq is exactly the body GET /private/rfqs/{rfq_id} returns for your account (abbreviated above). If Hypercall cannot build it for a change, that change arrives as an ordinary RfqV2Changed hint instead, so handle both. Each Subscribe sets the mode; subscribing again without view returns to hints. view is accepted only on rfq_v2.
- Every
rfq_v2refusal is anErrorframe with a stablecode.Subscribewithout a priorAuthenticateRfqV2getsrfq_v2_grant_required, and aSubscribewithsymbols,expiry, oroption_typegetsrfq_v2_filters_unsupported. A refusedAuthenticateRfqV2carries the same grant code a private read would return (for examplerfq_v2_grant_expiredorrfq_v2_grant_signature_invalid);rfq_v2_not_enabledmeans the host does not serve V2. - The grant is rechecked before each message. When one is withheld because the grant expired or no longer verifies (for example, the signing agent was revoked), you get one
{"type":"Error","code":"rfq_v2_grant_expired","channel":"rfq_v2",...}frame and nothing more until you send a freshAuthenticateRfqV2, which keeps the subscription. Re-authenticate beforeexpires_at_msto avoid the gap. RfqV2Changedis a hint, not state. It carries an RFQ ID and a sequence, nothing else. Hints and full-view messages can repeat; de-duplicate onsequence. Fetch the RFQ and quotes after a hint.- Who gets a hint. The taker and routed makers on creation. The taker and the quoting maker on that maker's quotes, firm-ups, declines, and quote replacements. The taker and every routed maker, traded or not, on fills, RFQ cancellation, and RFQ replacement. The maker on withdrawals and fired cancels, and the taker too when that maker had quoted the RFQ. Setting, renewing, or clearing the cancel schedule changes nothing a taker reads, so only the maker gets a hint. Maker-wide actions skip RFQs that are already filled, cancelled, replaced, or expired.
Quote and withdraw on the socket
A maker can send firm quotes and withdrawals on the same connection instead of over REST. Send AuthenticateRfqV2 first; you do not need to subscribe to rfq_v2.
| Message | Same as | Extra fields |
|---|---|---|
PublishRfqV2FirmQuote | POST /private/rfqs/{rfq_id}/quotes/firm | None. The RFQ is request.terms.rfq_id |
WithdrawRfqV2Quote | POST /private/rfqs/{rfq_id}/quotes/{quote_id}/withdrawals | rfq_id, quote_id |
WithdrawRfqV2Quotes | POST /private/rfq-quote-withdrawals | None |
requestis the REST body. Sign and build it exactly as for REST. Its signature authorizes the write; the read grant only identifies the connection.request_idis yours. Any string. It is echoed in the result so you can match replies to requests.- One
RfqV2CommandResultanswers every well-formed write. A frame the socket cannot read gets no reply at all, as with any other socket message. That includes a missingrequest, or arequest_id,rfq_id, orquote_idthat is not a string. Once the socket admits a write,statusis the HTTP status REST returns for the same request, andbodyis the REST response body, including{code, message}on an error. Validation, nonce rules, idempotency, and error codes are the same as REST, so the retry rules apply unchanged. - Writes on one connection run in the order you send them. A withdrawal sent after a publish is handled after it.
{"type":"PublishRfqV2FirmQuote","request_id":"q-1","request":{"terms":{"id":"0e9b3c1a-7f45-4d2e-9b8c-1a2d3e4f5a6b","rfq_id":"6d3f7a52-9c1e-4b8a-a0f4-2f71c9e0b5d1"},"nonce":1763452800000,"signature":"0x..."}}
{"type":"RfqV2CommandResult","request_id":"q-1","operation":"publish_firm","status":201,"body":{"firmness":"firm","quote_id":"0e9b3c1a-7f45-4d2e-9b8c-1a2d3e4f5a6b","status":"open","executable":true,"remaining_capacity":"5000000","preflight":{"status":"passed","checked_at_ms":1792159209120}}}
{"type":"WithdrawRfqV2Quote","request_id":"w-1","rfq_id":"6d3f7a52-9c1e-4b8a-a0f4-2f71c9e0b5d1","quote_id":"0e9b3c1a-7f45-4d2e-9b8c-1a2d3e4f5a6b","request":{"operation_id":"...","expires_at_ms":1763452860000,"nonce":1763452801000,"signature":"0x..."}}
{"type":"RfqV2CommandResult","request_id":"w-1","operation":"withdraw_quote","status":200,"body":{"operation_id":"...","status":"withdrawn"}}
The quote terms are abbreviated above. The socket admits a write only after the checks below, which REST does not run. A write can therefore get 429 on the socket while REST accepts it under its separate HTTP budget. These refusals use the same frame:
status | body.code | Meaning |
|---|---|---|
| 401 | rfq_v2_grant_required | No AuthenticateRfqV2 on this connection yet |
| 401 | Grant code, for example rfq_v2_grant_expired | The connection's grant no longer verifies. Send a fresh AuthenticateRfqV2 |
| 403 | rfq_v2_not_enabled | The host does not serve RFQ V2 |
| 429 | rfq_v2_rate_limited | Over the per-account socket budget. message says how many seconds to wait |
| 503 | rfq_v2_rate_limit_unavailable | The host cannot check the socket budget, so it refuses the write. Retry later or use REST |
Run the change feed alongside the socket. After subscribing, read GET /private/rfqs/changes from your last saved sequence before trusting local state. Keep polling it while connected, because a missed hint leaves no gap you can see. On reconnect, read from your last saved sequence and de-duplicate.
Retries and unknown outcomes
- Create and publish: resend the identical signed body. Same ID, same bytes returns the original; changed bytes return
409 rfq_v2_idempotency_conflict. - Actions with an
operation_id: resend the identical body with the sameoperation_idinside the 1-hour window to get the original result. A different body under the same operation ID conflicts. 503 rfq_v2_authority_unavailableor a timeout on an execution: the outcome is unknown and the fill may have happened. Retry the identical signed request with the sameoperation_iduntil you get a definite answer: the original result, or a definite refusal. That retry is the only answer you can rely on, and it works only inside the 1-hour window. An RFQ read is a sanity check, not proof:remaining_targetand quote capacity carry nooperation_id, can move with other fills, and can lag. Do not sign a new execution for the same intent until the retry gives a definite answer.503 rfq_v2_projection_pending: the action committed but its result is not readable yet. Retry the identical request with the sameoperation_id; it returns the original result once readable.503 rfq_v2_replacement_pending: the replacement was refused but the refusal is not recorded yet. Retry the identical request with the sameoperation_id.429 rfq_v2_rate_limited: over HTTP, honorRetry-After. The limit is 6,000 requests per minute per source IP across every V2 HTTP route. Socket writes have their own budget of 6,000 per minute per account, and the resultmessagegives the wait in seconds. See Rate Limits.
Limits
| Limit | Value |
|---|---|
| Legs per RFQ | 10 |
| Selected makers | 128 |
| Allocations per sweep | 1,024 |
| Quote pairs per bulk withdrawal | 64 |
| Read grant lifetime | 5 minutes |
| Encoded read grant | 1,024 bytes |
| Operation ID window | 1 hour back, 30 seconds forward |
| Cancel schedule lead | 5 seconds minimum |
| Block MMP window | 1 day maximum |
| Page size | 50 default, 100 max (change feed: 100 default) |
| Amounts in one fill | Below 10^12 contracts or USD (10^18 micros). See Fill size limit |
| Signed amounts | Up to 2^96 - 1 |
| V2 request rate | 6,000 requests per minute per source IP, all V2 HTTP routes combined. Socket writes: 6,000 per minute per read-grant account |
| Open firm quotes per maker | No count limit and no notional cap. Margin is checked at execution |
| Executions page | 100 default, 500 max |
Error codes
| Code | HTTP | Meaning and what to do |
|---|---|---|
rfq_v2_disabled | 403 | V2 is off on this environment |
rfq_v2_not_allowlisted | 401, 403 | V2 is limited to listed accounts during rollout. 401 on reads, 403 on writes |
rfq_v2_session_required | 401 | Read has no Authorization header. Send a signed read grant |
rfq_v2_grant_malformed | 401 | Bearer is not an encoded read grant, or is over 1,024 bytes |
rfq_v2_grant_expired | 401 | Read grant expired. Sign a new one |
rfq_v2_grant_window_invalid | 401 | Grant issued more than 30 seconds ahead of server time, or valid for more than 5 minutes |
rfq_v2_grant_signature_invalid | 401 | Grant signature does not recover a signer |
rfq_v2_grant_unauthorized | 401 | Grant signer may not sign for the account |
rfq_v2_unauthorized | 403 | Signer not approved for the account, or the account may not see this RFQ |
rfq_v2_not_found | 404 | RFQ or quote does not exist for this account |
rfq_v2_invalid_signature | 400 | Signature malformed or does not recover a signer |
rfq_v2_invalid_operation_id | 400 | Operation ID not a UUIDv7 inside the window. Generate a fresh UUIDv7 |
rfq_v2_invalid_request | 400 | Request cannot be served, including a version 8 operation ID |
rfq_v2_invalid_terms | 400 | Signed fields break a rule checked from the request alone: premium arithmetic or direction, expiry against the RFQ, list shape, an unknown instrument, or an action field. Fix the signed values |
rfq_v2_invalid_create | 400 | Create routes to more makers than one request accepts |
rfq_v2_invalid_package_units | 400 | Package, leg, target, or fill-policy quantity zero, off grid, or out of range |
rfq_v2_invalid_maker_set | 400 | Selected makers empty, over 128, unsorted, or repeated |
rfq_v2_invalid_quote | 400 | Firm quote names an indicative source that was never delivered, has expired, or belongs to another RFQ or maker |
rfq_v2_invalid_firm_up | 400 | Firm-up malformed or does not fit its indicative quote |
rfq_v2_invalid_decline | 400 | Decline malformed |
rfq_v2_invalid_action | 400 | Execution, sweep, cancel, or withdrawal malformed |
rfq_v2_invalid_replacement | 400 | Replacement malformed or does not fit the replaced object |
rfq_v2_too_many_targets | 400 | Sweep over 1,024 quotes or bulk withdrawal over 64 pairs |
rfq_v2_invalid_query | 400 | List or read query malformed, including a page limit out of range |
rfq_v2_invalid_mmp_config | 400 | Block MMP config sets no limit, a zero interval or limit, or a window over one day |
rfq_v2_invalid_cursor | 400 | Cursor malformed or out of range, or a change feed or executions limit out of range |
rfq_v2_quote_nonce_rejected | 400 | Firm quote nonce outside two days before to one day after server time. Use a current millisecond timestamp |
rfq_v2_provider_ambiguous | 409 | Your account is mapped by more than one enrollment, so GET /private/rfq-provider cannot pick one. Contact Hypercall |
rfq_v2_path_mismatch | 400 | Path ID disagrees with the signed body |
rfq_v2_deadline_passed | 400 | A signed or quote deadline has passed |
rfq_v2_nonce_out_of_window | 400 | Create: nonce is outside the nonce window, or expires_at_ms is more than 2 days after nonce |
rfq_v2_quote_not_executable | 400 | Execution named an indicative quote |
rfq_v2_unknown_instrument | 422 | Instrument not listed or not open for RFQ |
rfq_v2_unknown_underlying | 422 | Block MMP request names an underlying Hypercall does not list. Use the exact canonical name, such as BTC |
rfq_v2_no_eligible_makers | 422 | No eligible maker: none enrolled for the package, none of the selected makers (a selected maker counts when it is enrolled and active for every leg, or not enrolled and funded), or only makers that share a principal with the taker |
rfq_v2_preflight_rejected | 422 | Firm quote failed the maker margin preflight. The RFQ stays open |
rfq_v2_deadline_too_short | 422 | Cancel deadline under the 5-second lead |
rfq_v2_parent_closed | 409 | RFQ was cancelled, replaced, or filled first |
rfq_v2_idempotency_conflict | 409 | ID already used with different signed terms |
rfq_v2_indicative_replaced | 409 | Indicative quote was replaced first |
rfq_v2_quote_revoked | 409 | Quote signed for a maker or RFQ generation that a withdrawal or a due cancel schedule has since revoked. Sign with the current generations |
rfq_v2_quote_generation_ahead | 400 | Quote signed for a maker_generation or rfq_generation newer than the current one. Sign with the generations from the RFQ read |
rfq_v2_decline_with_live_quote | 409 | You have an executable firm quote on this RFQ. Withdraw it, then decline |
rfq_v2_maker_declined | 409 | You declined this RFQ, so you cannot post a firm quote on it |
rfq_v2_already_inactive | 409 | Withdrawal by quote ID found the quote already withdrawn, filled, expired, or replaced. Nothing changed; treat it as done |
rfq_v2_replacement_conflict | 409 | The object being replaced was already used or changed |
rfq_v2_replacement_rejected | 409 | Replacement refused. The original object stands |
rfq_v2_authorization_terminal | 409 | Quote or RFQ is no longer executable |
rfq_v2_capacity_unavailable | 409 | Size exceeds remaining capacity or breaks the fill policy. Re-read and resize |
rfq_v2_risk_rejected | 409 | Margin or risk check refused. Nothing filled; the same request may pass later |
rfq_v2_authority_rejected | 409 | Request does not match the signed documents. Final for that request |
rfq_v2_mmp_frozen | 409 | The quote is permitted and its maker is frozen by block MMP on an underlying of the package. Pick another quote, or as the maker wait for the freeze to end or reset |
rfq_v2_mmp_not_configured | 409 | Block MMP reset on an underlying without a configuration |
rfq_v2_self_trade | 409 | Taker and maker resolve to the same principal, at execution or when the maker publishes a firm quote |
rfq_v2_rate_limited | 429 | Rate limit exceeded. Honor Retry-After |
rfq_v2_delivery_failed | 500 | The request could not be completed. Retry the identical request |
rfq_v2_delivery_unavailable | 500, 503 | Temporarily unavailable. Retry the identical request |
rfq_v2_authority_unavailable | 503 | Outcome unknown. Retry the identical request with the same operation_id for a definite answer |
rfq_v2_auto_execution_unavailable | 503 | Quote accepted, auto fill pending. Retry the identical publication |
rfq_v2_projection_pending | 503 | Committed, result not readable yet. Retry the identical request |
rfq_v2_replacement_pending | 503 | Replacement refused, refusal not recorded yet. Retry the identical request |
Also in this release: RPI outcomes on /order
This affects POST /order with route: "best_execution", not V2. If a retail price improvement (RPI) execution against an RFQ quote has an unknown outcome, the order call returns 504, "RPI execution outcome is pending; the order may have filled, do not resubmit", and does not fall back to another quote or the book. Do not resubmit. Check fills and order status. The pending execution never fills twice.