Skip to main content

Connection Model

1

Authenticate

Create a bearer session with POST /v1/auth/wallet or POST /v1/auth/session.
2

Discover the market

Fetch GET /v1/markets/current?asset=BTC&duration_secs=300 or use GET /v1/markets/lookup for a specific window.
3

Sign the order

Build the order, sign it with EIP-191 personal-sign, and encode the 65-byte signature as base64.
4

Submit the RFQ

Send POST /v1/rfq with the signed order and bearer token.
5

Read or cancel

Poll GET /v1/rfq/{id} while the RFQ is pending, or cancel with POST /v1/rfq/{id}/cancel.
6

Monitor portfolio

Completed RFQs return execution details; use the portfolio endpoints to track the resulting positions and PnL.

Environment URLs

EnvironmentREST Base URL
Localhttp://127.0.0.1:3001
Demohttps://api.longshot.xyz
Stagingprovided per team
Productionprovided per team

Notes From Live Demo RFQ Testing

The demo API accepted wallet auth, returned a bearer session, and completed single-leg BTC 5m RFQs. The completed RFQ response included request_id, status, odds, payout_micros, and quotes_received. For a one-leg RFQ, the implied executable price in cents is:
implied_price_cents = 100 / odds
or equivalently:
implied_price_cents = 100 * wager_micros / payout_micros

Next Steps

Wallet Auth

Create and store the bearer token used by all taker REST routes.

Submit RFQs

Build the signed order payload for POST /v1/rfq.