Spot Trade
All endpoints in this section require ALL THREE authentication headers
Query an order by order ID Rate Limit: 20 times/2s
The order ID to query
Client Order Id, Unique order ID generated by users to mark their orders
1234567890Trading pair symbol (e.g. BTCUSDT)
BTCUSDTSignature generated using your API Secret
Current timestamp in milliseconds
API Key from your GaiaEx account
OK
Symbol name
BTCUSDTOrder ID
150695552109032492Client order ID
123456Transaction time
1499827319559Price
0.01Original quantity
12.00Executed quantity
10.00Cumulative quote quantity
10.00Order status
FILLEDTime in force
GTCOrder type
LIMITOrder side
BUYcurl -X GET 'https://openapi.gaiaex.com/sapi/v1/order?symbol=BTCUSDT&orderId=150695552109032492' \
-H 'X-CH-APIKEY: YOUR_API_KEY' \
-H 'X-CH-TS: 1499827319559' \
-H 'X-CH-SIGN: YOUR_SIGNATURE'
OK
{
"symbol": "BTCUSDT",
"orderId": "150695552109032492",
"clientOrderId": "123456",
"transactTime": 1499827319559,
"price": "0.01",
"origQty": "12.00",
"executedQty": "10.00",
"cummulativeQuoteQty": "10.00",
"status": "FILLED",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "BUY"
}Create a new order Rate Limit: 100 times/2s
Signature generated using your API Secret
Current timestamp in milliseconds
API Key from your GaiaEx account
Trading pair symbol (e.g. BTCUSDT)
BTCUSDTCurrency display name: Either symbol or symbolName must be provided
BTC/USDTOrder quantity
1Trade direction (BUY or SELL)
BUYPossible values: Order type (LIMIT, MARKET, etc.)
LIMITPossible values: Order price (required for LIMIT orders)
20000.5Custom client order ID
Maximum time in milliseconds the request is valid for
5000OK
Trade direction (BUY or SELL)
Executed quantity
Order ID
Order price
Original order quantity
Client-defined order ID
Transaction time in milliseconds
Order ID as string
Order type (LIMIT, MARKET)
Order status code
curl -X POST 'https://openapi.gaiaex.com/sapi/v1/order' \
-H 'X-CH-APIKEY: YOUR_API_KEY' \
-H 'X-CH-TS: 1499827319559' \
-H 'X-CH-SIGN: YOUR_SIGNATURE' \
-H 'Content-Type: application/json' \
-d '{
"symbol": "BTCUSDT",
"volume": 0.001,
"side": "BUY",
"type": "LIMIT",
"price": 20000,
"newClientOrderId": "my_order_123",
"recvWindow": 5000
}'
OK
{
"side": "BUY",
"executedQty": 0,
"orderId": 2729988948364372000,
"price": 0.02,
"origQty": 1,
"clientOrderId": null,
"transactTime": 1747564093093,
"orderIdString": 2729988948364372000,
"type": "LIMIT",
"status": 0
}Test new order creation and signature/recvWindow length. Creates and validates a new order but does not send the order into the matching engine.
Signature generated using your API Secret
Current timestamp in milliseconds
API Key from your GaiaEx account
Trading pair symbol (e.g. BTCUSDT)
BTCUSDTCurrency display name: Either symbol or symbolName must be provided
BTC/USDTOrder quantity
1Trade direction (BUY or SELL)
BUYPossible values: Order type (LIMIT, MARKET, etc.)
LIMITPossible values: Order price (required for LIMIT orders)
20000.5Custom client order ID
Maximum time in milliseconds the request is valid for
5000OK
curl -X POST 'https://openapi.gaiaex.com/sapi/v1/order/test' \
-H 'X-CH-APIKEY: YOUR_API_KEY' \
-H 'X-CH-TS: 1499827319559' \
-H 'X-CH-SIGN: YOUR_SIGNATURE' \
-H 'Content-Type: application/json' \
-d '{
"symbol": "BTCUSDT",
"volume": 0.001,
"side": "BUY",
"type": "LIMIT",
"price": 20000,
"newClientOrderId": "my_order_123",
"recvWindow": 5000
}'
OK
batch contains at most 10 orders
Signature generated using your API Secret
Current timestamp in milliseconds
API Key from your GaiaEx account
Symbol Name
BTCUSDTCurrency display name: Either symbol or symbolName must be provided
BTC/USDTOK
165964665990709250curl -X POST 'https://openapi.gaiaex.com/sapi/v1/batchOrders' \
-H 'X-CH-APIKEY: YOUR_API_KEY' \
-H 'X-CH-TS: 1499827319559' \
-H 'X-CH-SIGN: YOUR_SIGNATURE' \
-H 'Content-Type: application/json' \
-d '{
"symbol": "BTCUSDT",
"orders": [
{
"volume": 1.0,
"side": "BUY",
"batchType": "LIMIT",
"price": 20000.50,
"recvWindow": 5000
},
{
"volume": 0.5,
"side": "SELL",
"batchType": "LIMIT",
"price": 21000.50,
"recvWindow": 5000
}
]
}'
OK
{
"idsString": [
"165964665990709251",
"165964665990709252",
"165964665990709253"
],
"ids": [
165964665990709250,
165964665990709250,
165964665990709250
]
}Signature generated using your API Secret
Current timestamp in milliseconds
API Key from your GaiaEx account
Client Order Id, Unique order ID generated by users to mark their orders
354444heihieddadaOrder ID
Symbol Name
BTCUSDTCurrency display name: Either symbol or symbolName must be provided
BTC/USDTOK
Symbol Name
Client Order ID
Order ID
Order status
curl -X POST 'https://openapi.gaiaex.com/sapi/v1/cancel' \
-H 'X-CH-APIKEY: YOUR_API_KEY' \
-H 'X-CH-TS: 1499827319559' \
-H 'X-CH-SIGN: YOUR_SIGNATURE' \
-H 'Content-Type: application/json' \
-d '{
"symbol": "BTCUSDT",
"orderId": "12345678"
}'
OK
{
"symbol": "BHTUSDT",
"clientOrderId": "0",
"orderId": "499890200602846976",
"status": "CANCELED"
}Batch cancel contains at most 10 orders
Signature generated using your API Secret
Current timestamp in milliseconds
API Key from your GaiaEx account
Order IDs to cancel
Symbol Name
BTCUSDTCurrency display name: Either symbol or symbolName must be provided
BTC/USDTOK
Successfully cancelled order IDs
Failed order IDs (order does not exist or order state has expired)
curl -X POST 'https://openapi.gaiaex.com/sapi/v1/batchCancel' \
-H 'X-CH-APIKEY: YOUR_API_KEY' \
-H 'X-CH-TS: 1499827319559' \
-H 'X-CH-SIGN: YOUR_SIGNATURE' \
-H 'Content-Type: application/json' \
-d '{
"symbol": "BTCUSDT",
"orderIds": [
"165964665990709251",
"165964665990709252",
"165964665990709253"
]
}'
OK
{
"success": [
165964665990709250,
165964665990709250,
165964665990709250
],
"failed": [
165964665990709250
]
}Retrieve all open orders for a specific symbol
Trading pair symbol (e.g. BTCUSDT)
BTCUSDTMaximum number of orders to return
100Example: 10Signature generated using your API Secret
Current timestamp in milliseconds
API Key from your GaiaEx account
OK
Trade direction (BUY or SELL)
Executed quantity
Order ID
Order price
Original order quantity
Client-defined order ID
Transaction time in milliseconds
Order ID as string
Order type (LIMIT, MARKET)
Order status code
curl -X GET 'https://openapi.gaiaex.com/sapi/v1/openOrders?symbol=BTCUSDT&limit=10' \
-H 'X-CH-APIKEY: YOUR_API_KEY' \
-H 'X-CH-TS: 1499827319559' \
-H 'X-CH-SIGN: YOUR_SIGNATURE'
OK
[
{
"side": "BUY",
"executedQty": 0,
"orderId": 2729988948364372000,
"price": 0.02,
"origQty": 1,
"clientOrderId": "my_order_id_123",
"transactTime": 1747564093093,
"orderIdString": "2729988948364372145",
"type": "LIMIT",
"status": 0,
"symbol": "BTCUSDT"
},
{
"side": "SELL",
"executedQty": 0,
"orderId": 2729988948364372000,
"price": 0.025,
"origQty": 0.5,
"clientOrderId": "my_order_id_124",
"transactTime": 1747564093094,
"orderIdString": "2729988948364372146",
"type": "LIMIT",
"status": 0,
"symbol": "BTCUSDT"
},
{
"side": "BUY",
"executedQty": 0.2,
"orderId": 2729988948364372000,
"price": 0.018,
"origQty": 1.5,
"clientOrderId": "my_order_id_125",
"transactTime": 1747564093095,
"orderIdString": "2729988948364372147",
"type": "LIMIT",
"status": 0,
"symbol": "BTCUSDT"
}
]Retrieve all trades for the authenticated user for a specific symbol Rate Limit: 20 times/2s
Symbol Name. E.g. BTCUSDT
BTCUSDTCurrency display name. Either symbol or symbolName must be provided. Example- BTC/USDT
BTC/USDTDefault 100; Max 1000
100Example: 50Trade Id to fetch from
28457Signature generated using your API Secret
Current timestamp in milliseconds
API Key from your GaiaEx account
OK
Name of the symbol
BTCUSDTTrade ID
28457Bid Order ID
150695552109032480Ask Order ID
150695552109032480Price of the trade
4.01Quantity of the trade
12Timestamp of the trade
1499865549590true = Buyer, false = Seller
truetrue = Maker, false = Taker
falseTrading fee coin
ETHTrading fee
0.001Buyer UID
23334Seller UID
44112Whether is self dealt
truecurl -X GET 'https://openapi.gaiaex.com/sapi/v1/myTrades?symbol=BTCUSDT&limit=50' \
-H 'X-CH-APIKEY: YOUR_API_KEY' \
-H 'X-CH-TS: 1499827319559' \
-H 'X-CH-SIGN: YOUR_SIGNATURE'
OK
[
{
"symbol": "BTCUSDT",
"id": 28457,
"bidId": 150695552109032480,
"askId": 150695552109032480,
"price": 4.01,
"qty": 12,
"time": 1499865549590,
"isBuyer": true,
"isMaker": false,
"feeCoin": "ETH",
"fee": 0.001,
"bidUserId": 23334,
"askUserId": 44112,
"isSelf": false
},
{
"symbol": "BTCUSDT",
"id": 28458,
"bidId": 150695552109032480,
"askId": 150695552109032480,
"price": 4.02,
"qty": 5,
"time": 1499865550590,
"isBuyer": false,
"isMaker": true,
"feeCoin": "ETH",
"fee": 0.0005,
"bidUserId": 23335,
"askUserId": 44113,
"isSelf": false
},
{
"symbol": "BTCUSDT",
"id": 28459,
"bidId": 150695552109032500,
"askId": 150695552109032500,
"price": 4.03,
"qty": 8,
"time": 1499865551590,
"isBuyer": true,
"isMaker": true,
"feeCoin": "ETH",
"fee": 0.0008,
"bidUserId": 23334,
"askUserId": 23334,
"isSelf": true
}
]Get current account information including balances Rate Limit: 20 times/2s
Signature generated using your API Secret
Current timestamp in milliseconds
API Key from your GaiaEx account
OK
curl -X GET 'https://openapi.gaiaex.com/sapi/v1/account' \
-H 'X-CH-APIKEY: YOUR_API_KEY' \
-H 'X-CH-TS: 1499827319559' \
-H 'X-CH-SIGN: YOUR_SIGNATURE'
OK
{
"balances": [
{
"asset": "BTC",
"free": 0.25,
"locked": 0.05
},
{
"asset": "ETH",
"free": 5.5,
"locked": 1.2
},
{
"asset": "USDT",
"free": 1000.3,
"locked": 400
},
{
"asset": "BNB",
"free": 10,
"locked": 0
},
{
"asset": "SHIB",
"free": 15000000,
"locked": 500000
}
]
}Last updated
