rfq, sign and return a quote, and reply to ping
heartbeats. It quotes every RFQ with a fixed odds and fill size — real
pricing logic belongs where the comments mark it.
Prerequisites
Export your market-maker credentials before running any example:Get Your User ID
Use the same EVM key you plan to run as a market maker. Wallet auth signs the plain-text Longshot sign-in message, sends the 65-byte signature as base64, and returns theuser_id needed for whitelist requests.
Python
Authenticate
Open the WebSocket, run the challenge-response handshake, and get a session token. Keep the samews around — the Build Quote section attaches onto it.
Build Quote
build_quote fills the 97-byte QuoteResponse layout, signs the first
32 bytes with EIP-191, and wraps it in the { type, data }
envelope. The receive loop attached below subscribes to RFQs, calls
build_quote on every rfq, and pongs server pings.
Next Steps
Authentication
Deep dive on the challenge-response handshake and session lifecycle.
Receive RFQs
Full
BroadcastRfqRequest byte layout and typed decoder helpers.Submit Quotes
Full
QuoteResponse layout, liability math, and build examples.Acks and Outcomes
Handle
quote_ack and quote_result notifications.