- REST API:
https://perps.standx.com - WebSocket:
wss://perps.standx.com/ws-stream/v1
Visit https://standx.com/user/session to generate:
- JWT Token (valid for 7 days)
- Ed25519 Private Key (Base58 encoded)
All authenticated requests must include:
Authorization: Bearer <JWT_TOKEN>
x-request-sign-version: v1
x-request-id: <UUID>
x-request-timestamp: <UNIX_TIMESTAMP_MS>
x-request-signature: <BASE64_SIGNATURE>
Sign the following message with Ed25519:
message = "v1,request_id,timestamp,payload"
Where payload is the request body (or empty string for GET requests).
GET /api/query_symbol_infoReturns information about all available trading pairs.
Response:
[
{
"symbol": "BTC-USD",
"base_asset": "BTC",
"quote_asset": "DUSD",
"base_decimals": 9,
"price_tick_decimals": 2,
"qty_tick_decimals": 4,
"min_order_qty": "0.0001",
"def_leverage": "10",
"max_leverage": "40",
"maker_fee": "0.0001",
"taker_fee": "0.0004",
"status": "trading"
}
]GET /api/query_symbol_market?symbol=BTC-USDReturns market data including funding rate.
Response:
{
"symbol": "BTC-USD",
"mark_price": "63127.37",
"index_price": "63126.67",
"last_price": "63115.80",
"volume_24h": 8755.733700000033,
"high_price_24h": 66571.0,
"low_price_24h": 62684.48,
"funding_rate": "0.00001250",
"next_funding_time": "2026-02-24T09:00:00Z"
}GET /api/query_depth_book?symbol=BTC-USD&limit=10Returns order book depth.
Response:
{
"asks": [
["63239", "3.6699"],
["63245", "0.20"]
],
"bids": [
["63230", "1.0822"],
["63229", "0.0473"]
]
}GET /api/query_recent_trades?symbol=BTC-USD&limit=100Returns recent trades.
Response:
[
{
"is_buyer_taker": true,
"price": "63102.97",
"qty": "0.0320",
"quote_qty": "2019.295040",
"symbol": "BTC-USD",
"time": "2026-02-24T08:06:52.515929Z"
}
]GET /api/kline/history?symbol=BTC-USD&resolution=1h&from=1704067200&to=1706659200Returns historical kline/candlestick data.
Parameters:
symbol: Trading pair symbolresolution: Time resolution (1m, 5m, 15m, 1h, 4h, 1d)from: Start timestamp (Unix seconds)to: End timestamp (Unix seconds)
Response:
[
{
"time": "2026-01-01T00:00:00Z",
"open": "63000",
"high": "63500",
"low": "62800",
"close": "63200",
"volume": "100.5"
}
]GET /api/query_funding_rates?symbol=BTC-USD&start_time=1700000000&end_time=1700000100Returns funding rate history.
Response:
[
{
"symbol": "BTC-USD",
"funding_rate": "0.00001250",
"next_funding_time": "2026-02-24T09:00:00Z"
}
]GET /api/query_balance
Authorization: Bearer <JWT>Returns account balances.
Response:
[
{
"asset": "DUSD",
"available": "10000.00",
"frozen": "500.00",
"total": "10500.00"
}
]GET /api/query_positions?symbol=BTC-USD
Authorization: Bearer <JWT>Returns position information.
Response:
[
{
"symbol": "BTC-USD",
"side": "Long",
"quantity": "0.5",
"entry_price": "63000",
"mark_price": "63127.37",
"liquidation_price": "50000",
"margin": "3150",
"leverage": "10",
"unrealized_pnl": "63.68"
}
]GET /api/query_open_orders?symbol=BTC-USD
Authorization: Bearer <JWT>Returns open orders.
Response:
[
{
"id": "12345",
"symbol": "BTC-USD",
"side": "Buy",
"type": "Limit",
"quantity": "0.1",
"filled_quantity": "0",
"price": "62000",
"status": "New",
"created_at": "2026-02-24T08:00:00Z",
"updated_at": "2026-02-24T08:00:00Z"
}
]POST /api/new_order
Authorization: Bearer <JWT>
Content-Type: application/json
x-request-sign-version: v1
x-request-id: <UUID>
x-request-timestamp: <TIMESTAMP>
x-request-signature: <SIGNATURE>
{
"symbol": "BTC-USD",
"side": "buy",
"order_type": "limit",
"qty": "0.1",
"price": "63000",
"time_in_force": "GTC",
"reduce_only": false,
"sl_price": "62000",
"tp_price": "65000"
}Creates a new order.
Request Fields:
symbol: Trading pair symbolside:buyorsellorder_type:limitormarketqty: Order quantityprice: Order price (required for limit orders)time_in_force:GTC,IOC, orFOKreduce_only: Close position onlysl_price: Stop-loss price (optional)tp_price: Take-profit price (optional)
Response:
{
"code": 0,
"message": "Success",
"request_id": "uuid"
}POST /api/cancel_order
Authorization: Bearer <JWT>
Content-Type: application/json
x-request-sign-version: v1
x-request-id: <UUID>
x-request-timestamp: <TIMESTAMP>
x-request-signature: <SIGNATURE>
{
"symbol": "BTC-USD",
"order_id": 12345
}Cancels an order by ID.
POST /api/cancel_orders
Authorization: Bearer <JWT>
Content-Type: application/json
x-request-sign-version: v1
x-request-id: <UUID>
x-request-timestamp: <TIMESTAMP>
x-request-signature: <SIGNATURE>
{
"symbol": "BTC-USD",
"order_id_list": [12345, 12346]
}Cancels multiple orders.
Connect to wss://perps.standx.com/ws-stream/v1
Send authentication message immediately after connection:
{
"auth": {
"token": "eyJ..."
}
}Subscribe to channels after successful authentication:
{
"subscribe": {
"channel": "depth_book",
"symbol": "BTC-USD"
}
}Order book updates.
Message Format:
{
"channel": "depth_book",
"data": {
"symbol": "BTC-USD",
"bids": [["63230", "1.0822"], ["63229", "0.0473"]],
"asks": [["63239", "3.6699"], ["63245", "0.20"]]
},
"seq": 12345
}Price ticker updates.
Message Format:
{
"channel": "price",
"data": {
"symbol": "BTC-USD",
"mark_price": "63127.37",
"index_price": "63126.67",
"last_price": "63115.80",
"time": "2026-02-24T08:06:48.645735Z"
}
}Position updates (authenticated).
Message Format:
{
"channel": "position",
"data": {
"symbol": "BTC-USD",
"side": "Long",
"quantity": "0.5",
"entry_price": "63000",
"mark_price": "63127.37"
}
}Balance updates (authenticated).
Message Format:
{
"channel": "balance",
"data": {
"token": "DUSD",
"available": "10000.00",
"frozen": "500.00"
}
}Order updates (authenticated).
Message Format:
{
"channel": "order",
"data": {
"id": "12345",
"symbol": "BTC-USD",
"status": "Filled",
"filled_quantity": "0.1"
}
}| Code | Description |
|---|---|
| 400 | Bad Request |
| 401 | Unauthorized - Invalid or missing JWT |
| 403 | Forbidden - Invalid signature |
| 404 | Not Found |
| 429 | Rate Limited |
| 500 | Internal Server Error |
- Public API: 100 requests per minute per IP
- Authenticated API: 200 requests per minute per account
- WebSocket: 1 connection per account
buy- Buy/Longsell- Sell/Short
limit- Limit ordermarket- Market order
GTC- Good Till CancelIOC- Immediate or CancelFOK- Fill or Kill
New- New orderPartiallyFilled- Partially filledFilled- Completely filledCanceled- CanceledRejected- RejectedExpired- Expired
Long- Long positionShort- Short position