GaiaExGaiaEx
API

Spot Trading Orders & History

Execute spot trades on GaiaEx via API: place market and limit orders, cancel orders, and retrieve trade history.

Overview

All spot trading endpoints require authentication.

Place Spot Order

POST https://openapi.gaiaex.com/v1/trade/spot/order

Place a spot market or limit order.

Request Body:

FieldTypeRequiredDescription
user_addressstringYesYour wallet address
symbolstringYesSpot pair (e.g., PURR/USDC)
is_buybooleanYestrue for buy, false for sell
sizestringYesOrder size in base token units
pricestringNoLimit price. Required for limit orders.
order_typestringNo"market" (default) or "limit"
client_idstringNoClient-assigned order ID

Example — Market Buy:

{
  "user_address": "0xYourAddress",
  "symbol": "PURR/USDC",
  "is_buy": true,
  "size": "1000",
  "order_type": "market"
}

Example — Limit Sell:

{
  "user_address": "0xYourAddress",
  "symbol": "PURR/USDC",
  "is_buy": false,
  "size": "1000",
  "price": "0.0550",
  "order_type": "limit"
}

Response:

{
  "success": true,
  "orderId": 555666777,
  "symbol": "PURR/USDC",
  "side": "BUY",
  "type": "MARKET",
  "origQty": "1000",
  "status": "filled",
  "timestamp": 1743508800000
}

Cancel Spot Order

POST https://openapi.gaiaex.com/v1/trade/spot/order/cancel

Cancel a single open spot order.

Request Body:

FieldTypeRequiredDescription
user_addressstringYesYour wallet address
symbolstringYesSpot pair
order_idintYesThe order ID to cancel

Example Request:

{
  "user_address": "0xYourAddress",
  "symbol": "PURR/USDC",
  "order_id": 555666777
}

Cancel All Spot Orders

POST https://openapi.gaiaex.com/v1/trade/spot/order/cancel-all

Cancel all open spot orders, optionally filtered by symbol.

Request Body:

FieldTypeRequiredDescription
user_addressstringYesYour wallet address
symbolstringNoFilter by pair. Omit to cancel all.

Response:

{
  "success": true,
  "cancelled_count": 3,
  "timestamp": 1743508800000
}

Transfer (Perp ↔ Spot)

POST https://openapi.gaiaex.com/v1/trade/spot/transfer

Transfer USDC between your perpetual and spot accounts.

Request Body:

FieldTypeRequiredDescription
user_addressstringYesYour wallet address
amount_usdcstringYesAmount to transfer
to_perpbooleanYestrue = spot→perp, false = perp→spot

Example — Move $100 from spot to perp:

{
  "user_address": "0xYourAddress",
  "amount_usdc": "100",
  "to_perp": true
}

Response:

{
  "success": true,
  "direction": "spot_to_perp",
  "amount_usdc": "100.00",
  "result": { "status": "ok" },
  "timestamp": 1743508800000
}