/api/v1 for market data, account data, history, analytics, rewards, and referral workflows.
Authentication Scope
Most production traffic is expected to include:Authorization: Bearer <KEY>Origin: <your app origin>
Base URL
Request Format
- Endpoints are rooted at
/api/v1/... - Current public methods are
GETandPOST - Most endpoints use query/path parameters; no generic request body format applies globally
Spot and Perp Coverage
Some endpoints return both perpetual and spot rows. Mixed responses useasset_type with values perp or spot.
Market-address filters never mean “all BTC products”. A spot BTC market and a perp BTC market are different markets with different addresses, so request the product-specific market you want.
/api/v1/prices, /api/v1/funding_rate_history, /api/v1/asset_contexts, /api/v1/daily_stats, positions, and account-margin endpoints are perp-only. Spot markets do not have oracle price, mark price, funding, open interest, or positions; use /api/v1/spot/asset_contexts, /api/v1/orderbook, or the all_spot_mids / depth:{marketAddr} WebSocket topics for spot display prices.
Spot DTO Notes
- Spot
/api/v1/marketsrows useasset_type="spot",sz_decimalsfrom the base asset, andpx_decimalsfrom the quote asset. Perp-only fields such asmax_leverage,max_open_interest,unrealized_pnl_haircut_bps,category, andis_isolated_onlyuse neutral defaults. - Spot
OrderDtorows usetime_in_forceforGTC,POST_ONLY, orIOC. Spot has noclient_order_id, reduce-only flag, TP/SL, parent chain, or trigger condition, so those fields are empty, false, or null. - Spot
TradeDtorows useaction="Buy"or"Sell"from the row account’s perspective. Spot has no position PnL or funding, sorealized_pnl_amountandrealized_funding_amountare zero.fee_amountis the side’s actual fee, andfee_assetidentifies whether that fee is denominated in the base or quote asset. - Spot bulk-order and bulk-order-fill DTOs share the perp response shape, carry
asset_type="spot", and normalize prices/sizes with the spot market’s quote/base decimals.
Example Request
Example Response
Available Endpoints
The list below is aligned to runtime routes inrust/trading-api/src/http/routes.rs.
Market Data
Account and Trading
History
TWAP and Bulk Orders
Vaults
Analytics and Points
Referral and Affiliate
Backward-Compatible Aliases
SDK Alternative
For most application use cases, prefer the TypeScript SDK. See TypeScript SDK Overview.Related
Authentication
Credential setup and auth headers
Error Handling
Status codes and error payloads

