Authentication Flow
- Request Nonce message Obtain a message from the auth nonce endpoint
- Sign the message using SIWE The user signs the message with their wallet to prove ownership of the address.
- Exchange the signed message for a JWT access token Submit the signed message to receive a JWT access token.
-
Use the token for all authenticated requests
Include the JWT in the
Authorizationheader for subsequent API calls. - After completing authentication flow Deposite your funds on your contract address, use user details api to get contract address
Rate Limit
Global Rate Limit
Maximum 150 requests per second allowedOrder Creation Rate Limit
Maximum 10 orders per second allowed with networking slowdown
Authentication API
Nonce API
Request Nonce: The client first requests a unique nonce from the backend. This nonce prevents replay attacks and must be included in the signed message. Endpoint POST /api/auth/nonce Response TypeSign In API
Using the nonce from Step 1, the client creates a SIWE message and asks the wallet to sign it. Send the signed message details to the backend to authenticate the user. Endpoint POST /api/auth/signin Body| Field | Type | Required | Description |
|---|---|---|---|
address | string | Yes | Wallet address used to sign the message |
signature | string | Yes | Signature generated by the wallet |
issuedAt | string(ISO 8601) | Yes | Timestamp when the message was signed |
domain | string | Yes | Domain requesting authentication |
uri | string | Yes | URI of the requesting application |
| Field | Type | Description |
|---|---|---|
token | string | JWT used for authenticated requests |
is_firstTime | boolean | Indicates if this is the user’s first login |
Authenticated API Rules
All endpoints below require:Authorization: Bearer <token>
Notes
userAddressis extracted from the JWT
Enable Trading
Enable Trading allows the outcome market smart contracts to move your tokens on your behalf. It’s a one-time approval that lets the platform spend ERC20 Tokens. Example CodeEnable Trading Signature
Endpoint GET /api/enable-trading/signature Response TypeEnable Trade
Endpoint POST /api/enable-trading Body Parameters| Name | Type | Required | Description |
|---|---|---|---|
signature | string | Yes |
User Details API
Endpoint POST /api/me Response TypeBalance API
Get USER Balance
Endpoint GET /api/realtime/user/balance Example Response| Field | Type | Description |
|---|---|---|
available | string | On Chain balance - Open orders amount |
locked | string | Open orders amount |
total | string | On Chain balance |
Get Asset Balance
Endpoint GET /api/realtime/user/assetbalance Query Parameters| Name | Type | Required | Description |
|---|---|---|---|
marketId | number | Yes | Market ID |
| Field | Type | Description |
|---|---|---|
available | string | On Chain Asset balance - Open orders amount |
locked | string | Open orders amount |
total | string | On Chain Asset balance |
User Outcomes
Endpoint POST /api/me/outcomes Response Type| Field | Type | Description |
|---|---|---|
id | number | Unique identifier of the outcome record |
eventId | number | Associated event ID |
outcome | "Won" | "Lose" | Result of the position |
time | string (ISO 8601) | Event resolution timestamp |
contract | string | Contract or market name |
tokenType | "YES" | "NO" | Side/token held by the user |
price | string | Entry price per token |
size | string | Quantity of tokens |
pnl | string | Profit or loss for this outcome |
action | string | user claimed or not |
txnHash | string | claimed txn hash |
Claim Tokens API
Endpoint GET /api/markets/marketId/claim Response Type| Outcome | Market ID |
|---|---|
| YES | EventID × 2 |
| NO | EventID × 2 + 1 |
Order APIs
Create Order
Place a new order. Rate LimitMaximum 10 orders per second allowed with networking slowdown
Endpoint
POST /api/orders
Payload Type
| Name | Type | Required | Description |
|---|---|---|---|
market_id | number | Yes | YES = EventID × 2, NO = EventID × 2 + 1 |
quantity | string | Yes | Integer quantity |
limit_price | string | Yes | Price per unit (0.0 - 1.0) |
OrderSide | "BUY" | "SELL" | Yes | Order side |
OrderType | "LIMIT" | "MARKET" | Yes | Order execution type |
asset | "YES" | "NO" | Yes | Outcome asset (YES or NO) |
slippage | string | No | amount of slippage between 0 to 20 cents |
Cancel Order
Endpoint POST /api/orders/orderId/cancel Parameters| Name | Type | Required | Description |
|---|---|---|---|
orderId | string | Yes | your order id |
Cancel All Open Orders
Endpoint POST /api/orders/cancel-allGet Open Orders
Retrieve open and partially filled orders. Endpoint GET /api/realtime/openOrders ResponsePosition APIs
Get User Positions
Retrieve current user positions across all markets. Endpoint GET /api/realtime/positions Example Response Type| Field | Type | Description |
|---|---|---|
contract | string | Contract / market name |
size | string | Net position size |
entry_price | string | Average entry price |
mark_price | string (optional) | Current mark price |
position_value | string | Current position value |
pnl | string | PnL formatted as value (percent) |
side | "YES" | "NO" | Outcome side |
event_id | number | Event ID |
teamName | string | null | Sports team (if applicable) |
singleEvent | boolean | Single-outcome market |
category | string | CRYPTO, SPORTS, STOCK, COMMODITIES |
mark_priceandpnlmay be"NaN"if pricing data is unavailable- YES and NO positions for the same event are returned separately
Trade History APIs
Get User Trade History
Retrieve paginated executed trades. Endpoint GET /api/realtime/tradeHistory Query Parameters| Name | Type | Description |
|---|---|---|
userAddress | string | user wallet address |
page | number | Default: 1 |
pageSize | number | Default: 20, Max: 100 |
| Field | Type | Description |
|---|---|---|
id | string | Trade ID |
time | string (ISO 8601) | Execution time |
contract | string | Market name |
direction | string | e.g. Buy (Yes) |
price | number | Execution price |
size | string | Filled quantity |
tradeValue | string | price × size |
teamName | string | null | Sports team |
singleEvent | boolean | Single-outcome |
fee | string | Fee paid |
feeRate | string | Applied fee rate |
role | "Maker" | "Taker" | Liquidity role |
closedPNL | string | Realized PnL or ”—” |
pricemay include floating-point artifactsclosedPNLis populated only when a trade reduces exposure
Public Market Data APIs
Get Orderbook
Retrieve raw, non-aggregated orderbook data. Endpoint GET /api/realtime/orderbook/:marketId Authentication: Not required Market ID Convention| Outcome | Market ID |
|---|---|
| YES | EventID × 2 |
| NO | EventID × 2 + 1 |
| Field | Type | Description |
|---|---|---|
orderId | string | Unique order ID |
price | string | Limit price |
quantity | string | Remaining quantity |
userId | string | Maker wallet |
source | string | Liquidity source |
_meta)
| Field | Type | Description |
|---|---|---|
dollarCap | number | Max dollar exposure |
syntheticEnabled | boolean | Synthetic liquidity flag |
syntheticNotional | number | null | Synthetic size |
timestamp | number | Server timestamp (ms) |
- Orders are not aggregated
- Best bid = highest bid price
- Best ask = lowest ask price
Event-Level Market Data
Events API
Endpoint GET /api/realtime/events?page=1&pageSize=10&status=OPEN&sortBy=volume Response Type| Parameter | Type | Description |
|---|---|---|
category | string | Filter events by category (e.g. CRYPTO, STOCK, SPORTS) |
status | string | Filter events by status (e.g. OPEN, RESOLVED, CLOSED) |
subcategory | string | Filter events by subcategory (e.g. Hype, MEMES, SOCCER) |
search | string | Text search on event title or description |
address | string | Wallet address to personalize results (e.g. watchlisted events) |
page | number | Page number for pagination |
pageSize | number | Number of records per page |
sortBy | string | Field used for sorting (e.g. volume, end_time, created_at) |
sortOrder | "asc" | "desc" | Sort direction |
leagueName | string | Filter sports events by league name |
volume | number | Minimum total volume filter |
Get Event By Id
Endpoint GET /api/realtime/events/:eventId Response TypeGet Sports Event By Id
Endpoint GET /api/realtime/sports/:eventId Response TypeGet Event Trades
Retrieve recent trades across all markets in an event. Endpoint GET /api/realtime/sports/:eventId Response TypeGet Sports Event Trades
Retrieve recent trades across all markets in a sports event. Endpoint GET /api/realtime/sports/:eventId/trades Response TypeWithdraw Funds
Example Code| Name | Type | Required | Description |
|---|---|---|---|
amount | string | Yes | amount of tokens to withdraw |
recipient | string | Yes | Your wallet EOA Address |
signature | string | Yes | Signed Message |