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
sizenumber (Decimal)YesOrder size in base token units
pricenumber (optional)NoLimit 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": "resting",
  "timestamp": 1743508800000
}

Note: status reflects the exchange response and may be "resting", "filled", or "pending" depending on order type and fill result.

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,
  "failed_count": 0,
  "errors": null,
  "market": "spot",
  "timestamp": 1743508800000
}

Transfer (Perp ↔ Spot)

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

⛔ Permanently Deprecated

This endpoint is permanently deprecated. It returns HTTP 410. Use the sendAsset flow instead:

  1. GET /sendAsset/payload — fetch the unsigned payload
  2. Sign the payload client-side
  3. POST /sendAsset — submit the signed transaction

Actual response (HTTP 410):

{
  "detail": "This endpoint is deprecated. Use the sendAsset flow."
}