Overview
Welcome to the Sparky Perpetual Contracts API reference. Sparky's developer API is Binance USDT-M Futures compatible: request formats, response fields and the HMAC signing rule match Binance's /fapi so an existing Binance SDK can be pointed at Sparky by swapping the base URL. The structure of this section follows the Binance USDT-M sidebar one-to-one, so gaps are visible at a glance.
Two HTTP surfaces
| Surface | Path prefix | Audience | Auth |
|---|---|---|---|
| Native API | /api/v1/* | Web front end, deposits/withdrawals, referral, points, Earn | Authorization: Bearer <JWT> from the EIP-712 login |
| FAPI | /fapi/v1/*, /fapi/v2/*, /futures/data/* | Bots, market makers, SDKs | X-MBX-APIKEY header + HMAC-SHA256 signature |
Both surfaces share the same matching engine, positions and balances. /fapi is mounted at the root of the host (https://api-avax.<sparky-domain>/fapi/v1/order) exactly like Binance — there is no /api/v1 prefix on FAPI routes.
Base URLs
One deployment per chain; accounts, balances and API keys are not shared across deployments. Hostnames below are placeholders until DNS is assigned.
| Chain | Chain ID | REST base URL | WebSocket |
|---|---|---|---|
| Avalanche C-Chain | 43114 | https://api-avax.<sparky-domain> | wss://api-avax.<sparky-domain>/ws |
| Arbitrum One | 42161 | https://api-arb.<sparky-domain> | wss://api-arb.<sparky-domain>/ws |
| BNB Chain | 56 | https://api-bnb.<sparky-domain> | wss://api-bnb.<sparky-domain>/ws |
| Avalanche Fuji (testnet) | 43113 | https://api-fuji.<sparky-domain> | wss://api-fuji.<sparky-domain>/ws |
| Arbitrum Sepolia (testnet) | 421614 | https://api-arb-sepolia.<sparky-domain> | wss://api-arb-sepolia.<sparky-domain>/ws |
How to read this section
Every endpoint page carries a status:
- Implemented — Sparky serves this endpoint today; the page documents the request, response, and every place Sparky's behaviour differs from Binance.
- Not yet implemented (空缺) — Sparky has not added this Binance endpoint. The page records the Binance method/path and, where one exists, the Sparky alternative. These stubs exist so SDK authors can see the gap at a glance.
Endpoints that Sparky adds on top of Binance (slippage report, algo orders, listenKey, API-key management, health) live under Sparky-specific Endpoints.
Quick links
- Quickstart — login → create key → sign → place an order
- Basic Information — auth, signing (including the POST-body rule), timestamps, symbols, rate limits
- Common Enums
- Market Data REST
- Trade REST
- Market Data Streams
- Error Codes