Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Spot Trade

All endpoints in this section require ALL THREE authentication headers

Query Order

get
/sapi/v1/order

Query an order by order ID Rate Limit: 20 times/2s

Query parameters
orderIdstringOptional

The order ID to query

newClientOrderIdstringOptional

Client Order Id, Unique order ID generated by users to mark their orders

Example: 1234567890
symbolstringRequired

Trading pair symbol (e.g. BTCUSDT)

Example: BTCUSDT
Header parameters
X-CH-SIGNstringRequired

Signature generated using your API Secret

X-CH-TSstringRequired

Current timestamp in milliseconds

X-CH-APIKEYstringRequired

API Key from your GaiaEx account

Responses
200

OK

application/json
symbolstringOptional

Symbol name

Example: BTCUSDT
orderIdstringOptional

Order ID

Example: 150695552109032492
clientOrderIdstringOptional

Client order ID

Example: 123456
transactTimeintegerOptional

Transaction time

Example: 1499827319559
pricestringOptional

Price

Example: 0.01
origQtystringOptional

Original quantity

Example: 12.00
executedQtystringOptional

Executed quantity

Example: 10.00
cummulativeQuoteQtystringOptional

Cumulative quote quantity

Example: 10.00
statusstringOptional

Order status

Example: FILLED
timeInForcestringOptional

Time in force

Example: GTC
typestringOptional

Order type

Example: LIMIT
sidestringOptional

Order side

Example: BUY
get/sapi/v1/order
curl -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'
200

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"
}

New Order

post
/sapi/v1/order

Create a new order Rate Limit: 100 times/2s

Header parameters
X-CH-SIGNstringRequired

Signature generated using your API Secret

X-CH-TSstringRequired

Current timestamp in milliseconds

X-CH-APIKEYstringRequired

API Key from your GaiaEx account

Body
symbolstringRequired

Trading pair symbol (e.g. BTCUSDT)

Example: BTCUSDT
symbolNamestringOptional

Currency display name: Either symbol or symbolName must be provided

Example: BTC/USDT
volumenumberRequired

Order quantity

Example: 1
sidestring · enumRequired

Trade direction (BUY or SELL)

Example: BUYPossible values:
typestring · enumRequired

Order type (LIMIT, MARKET, etc.)

Example: LIMITPossible values:
pricenumberOptional

Order price (required for LIMIT orders)

Example: 20000.5
newClientOrderIdstringOptional

Custom client order ID

recvWindowintegerOptional

Maximum time in milliseconds the request is valid for

Example: 5000
Responses
200

OK

application/json
sidestringOptional

Trade direction (BUY or SELL)

executedQtynumberOptional

Executed quantity

orderIdnumberOptional

Order ID

pricenumberOptional

Order price

origQtynumberOptional

Original order quantity

clientOrderIdstringOptional

Client-defined order ID

transactTimenumberOptional

Transaction time in milliseconds

orderIdStringstringOptional

Order ID as string

typestringOptional

Order type (LIMIT, MARKET)

statusnumberOptional

Order status code

post/sapi/v1/order
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
}'
200

OK

{
  "side": "BUY",
  "executedQty": 0,
  "orderId": 2729988948364372000,
  "price": 0.02,
  "origQty": 1,
  "clientOrderId": null,
  "transactTime": 1747564093093,
  "orderIdString": 2729988948364372000,
  "type": "LIMIT",
  "status": 0
}

New Order Test

post
/sapi/v1/order/test

Test new order creation and signature/recvWindow length. Creates and validates a new order but does not send the order into the matching engine.

Header parameters
X-CH-SIGNstringRequired

Signature generated using your API Secret

X-CH-TSstringRequired

Current timestamp in milliseconds

X-CH-APIKEYstringRequired

API Key from your GaiaEx account

Body
symbolstringRequired

Trading pair symbol (e.g. BTCUSDT)

Example: BTCUSDT
symbolNamestringOptional

Currency display name: Either symbol or symbolName must be provided

Example: BTC/USDT
volumenumberRequired

Order quantity

Example: 1
sidestring · enumRequired

Trade direction (BUY or SELL)

Example: BUYPossible values:
typestring · enumRequired

Order type (LIMIT, MARKET, etc.)

Example: LIMITPossible values:
pricenumberOptional

Order price (required for LIMIT orders)

Example: 20000.5
newClientOrderIdstringOptional

Custom client order ID

recvWindowintegerOptional

Maximum time in milliseconds the request is valid for

Example: 5000
Responses
200

OK

application/json
post/sapi/v1/order/test
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
}'
200

OK

Batch Orders

post
/sapi/v1/batchOrders

batch contains at most 10 orders

Header parameters
X-CH-SIGNstringRequired

Signature generated using your API Secret

X-CH-TSstringRequired

Current timestamp in milliseconds

X-CH-APIKEYstringRequired

API Key from your GaiaEx account

Body
symbolstringRequired

Symbol Name

Example: BTCUSDT
symbolNamestringOptional

Currency display name: Either symbol or symbolName must be provided

Example: BTC/USDT
Responses
200

OK

application/json
idsStringstring[]Optional
idsnumber[]OptionalExample: 165964665990709250
post/sapi/v1/batchOrders
curl -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
    }
  ]
}'
200

OK

{
  "idsString": [
    "165964665990709251",
    "165964665990709252",
    "165964665990709253"
  ],
  "ids": [
    165964665990709250,
    165964665990709250,
    165964665990709250
  ]
}

Cancel Order

post
/sapi/v1/cancel
Header parameters
X-CH-SIGNstringRequired

Signature generated using your API Secret

X-CH-TSstringRequired

Current timestamp in milliseconds

X-CH-APIKEYstringRequired

API Key from your GaiaEx account

Body
newClientOrderIdstringOptional

Client Order Id, Unique order ID generated by users to mark their orders

Example: 354444heihieddada
orderIdstringOptional

Order ID

symbolstringOptional

Symbol Name

Example: BTCUSDT
symbolNamestringOptional

Currency display name: Either symbol or symbolName must be provided

Example: BTC/USDT
Responses
200

OK

application/json
symbolstringOptional

Symbol Name

clientOrderIdstringOptional

Client Order ID

orderIdstringOptional

Order ID

statusstring · enumOptional

Order status

Possible values:
post/sapi/v1/cancel
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"
}'
200

OK

{
  "symbol": "BHTUSDT",
  "clientOrderId": "0",
  "orderId": "499890200602846976",
  "status": "CANCELED"
}

Batch Cancel Orders

post
/sapi/v1/batchCancel

Batch cancel contains at most 10 orders

Header parameters
X-CH-SIGNstringRequired

Signature generated using your API Secret

X-CH-TSstringRequired

Current timestamp in milliseconds

X-CH-APIKEYstringRequired

API Key from your GaiaEx account

Body
orderIdsstring[]Required

Order IDs to cancel

symbolstringRequired

Symbol Name

Example: BTCUSDT
symbolNamestringOptional

Currency display name: Either symbol or symbolName must be provided

Example: BTC/USDT
Responses
200

OK

application/json
successnumber[]Optional

Successfully cancelled order IDs

failednumber[]Optional

Failed order IDs (order does not exist or order state has expired)

post/sapi/v1/batchCancel
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"
  ]
}'
200

OK

{
  "success": [
    165964665990709250,
    165964665990709250,
    165964665990709250
  ],
  "failed": [
    165964665990709250
  ]
}

Current Open Orders

get
/sapi/v1/openOrders

Retrieve all open orders for a specific symbol

Query parameters
symbolstringRequired

Trading pair symbol (e.g. BTCUSDT)

Example: BTCUSDT
limitinteger · min: 1 · max: 1000Optional

Maximum number of orders to return

Default: 100Example: 10
Header parameters
X-CH-SIGNstringRequired

Signature generated using your API Secret

X-CH-TSstringRequired

Current timestamp in milliseconds

X-CH-APIKEYstringRequired

API Key from your GaiaEx account

Responses
200

OK

application/json
sidestringOptional

Trade direction (BUY or SELL)

executedQtynumberOptional

Executed quantity

orderIdnumberOptional

Order ID

pricenumberOptional

Order price

origQtynumberOptional

Original order quantity

clientOrderIdstringOptional

Client-defined order ID

transactTimenumberOptional

Transaction time in milliseconds

orderIdStringstringOptional

Order ID as string

typestringOptional

Order type (LIMIT, MARKET)

statusnumberOptional

Order status code

get/sapi/v1/openOrders
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'
200

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"
  }
]

Query My Trades

get
/sapi/v1/myTrades

Retrieve all trades for the authenticated user for a specific symbol Rate Limit: 20 times/2s

Query parameters
symbolstringRequired

Symbol Name. E.g. BTCUSDT

Example: BTCUSDT
symbolNamestringOptional

Currency display name. Either symbol or symbolName must be provided. Example- BTC/USDT

Example: BTC/USDT
limitinteger · min: 1 · max: 1000Optional

Default 100; Max 1000

Default: 100Example: 50
fromIdstringOptional

Trade Id to fetch from

Example: 28457
Header parameters
X-CH-SIGNstringRequired

Signature generated using your API Secret

X-CH-TSstringRequired

Current timestamp in milliseconds

X-CH-APIKEYstringRequired

API Key from your GaiaEx account

Responses
200

OK

application/json
symbolstringOptional

Name of the symbol

Example: BTCUSDT
idintegerOptional

Trade ID

Example: 28457
bidIdinteger · int64Optional

Bid Order ID

Example: 150695552109032480
askIdinteger · int64Optional

Ask Order ID

Example: 150695552109032480
pricenumberOptional

Price of the trade

Example: 4.01
qtynumberOptional

Quantity of the trade

Example: 12
timeinteger · int64Optional

Timestamp of the trade

Example: 1499865549590
isBuyerbooleanOptional

true = Buyer, false = Seller

Example: true
isMakerbooleanOptional

true = Maker, false = Taker

Example: false
feeCoinstringOptional

Trading fee coin

Example: ETH
feenumberOptional

Trading fee

Example: 0.001
bidUserIdinteger · int64Optional

Buyer UID

Example: 23334
askUserIdinteger · int64Optional

Seller UID

Example: 44112
isSelfbooleanOptional

Whether is self dealt

Example: true
get/sapi/v1/myTrades
curl -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'
200

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
  }
]

Account Information

get
/sapi/v1/account

Get current account information including balances Rate Limit: 20 times/2s

Header parameters
X-CH-SIGNstringRequired

Signature generated using your API Secret

X-CH-TSstringRequired

Current timestamp in milliseconds

X-CH-APIKEYstringRequired

API Key from your GaiaEx account

Responses
200

OK

application/json
get/sapi/v1/account
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'
200

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