Expand description
Typed low-level client for the RFQ V2 HTTP contract (/private/rfqs*).
Callers supply complete signed payloads. crate::rfq_v2_signing builds
and signs them with a crate::HypercallWallet; remote signers and
non-Rust implementations sign the same EIP-712 messages and use the same
transport.
§Availability
Compiled with the rfq-v2 cargo feature, on by default since 0.3.0. RFQ V2
is open to every account in production from October 16, 2026.
A non-production environment can run RFQ V2 in two other modes. Disabled,
it refuses every RFQ V2 request, including private reads and
AuthenticateRfqV2 socket authentication, with HTTP 403 and error code
rfq_v2_disabled. Over HTTP that surfaces as ClientError::RfqV2Api
with status: 403 and that code; on the socket,
crate::WsClient::connect_rfq_v2 fails. Allowlist-only, it answers 403
rfq_v2_not_allowlisted to accounts not on the list.
§Operation IDs
Every client-chosen operation ID must be a UUIDv7 whose embedded timestamp,
measured against the server clock, is at most one hour old and at most 30
seconds in the future. Any other ID is refused with HTTP 400
rfq_v2_invalid_operation_id. Mint a fresh Uuid::now_v7() for each new
operation, and reuse an ID only to retry the identical signed request while
it is still inside that window.
Structs§
- RfqV2
Best Quote Criteria - Exact parent and size constraints for deterministic local quote selection.
- RfqV2
Parent Unit Grid - Leg sizes are whole micro-units of a contract held in a
u64. A fill ofunitspackage units isunits * quantity_micros_per_unit / 1e6contract micro-units on each leg, and an execution is refused when any leg’s quantity is fractional or exceedsu64. - RfqV2
Read Credentials - Caller-provided read session for role-filtered private RFQ data.
Enums§
Functions§
- encode_
rfq_ v2_ read_ grant - Encode a signed private-read grant as a bearer token. The grant must be
EIP-712 signed for
AuthorizeRfqReadV2under the Hypercall domain. - select_
best_ rfq_ v2_ quote - Select the best eligible firm quote. Selection is local and executes nothing.