GaiaExGaiaEx
API

Leverage & Margin Mode

Set leverage (1x–100x) and margin mode (cross or isolated) for perpetual futures positions on GaiaEx via API.

AI AGENT READYEquip Claude Code, OpenAI Codex & Antigravity (`agy`) with Official GaiaEx Skills
CLAUDE CODESKILL.md
Claude SKILL.md

Drop-in Claude Code skill with HMAC-SHA256 signing, /fapi/v1 & /fapi/v2 schemas, and secret-redaction guardrails.

Raw ↗
OPENAI CODEXAGENTS.md
Codex AGENTS.md

Drop-in repository AGENTS.md for OpenAI Codex CLI — tick-size rules, rate-limit budgets, and self-custody boundaries.

Raw ↗
ANTIGRAVITYAGY.md
Antigravity AGY.md

Google Antigravity (agy) & Gemini agent spec with verified async Python WebSocket + REST execution templates.

Raw ↗
UNIVERSAL LLMllms.txt
/llms.txt Index

Single-URL machine-readable index of all GaiaEx documentation pages, OpenAPI 3.0 schema, and Postman collection.

Raw ↗
POST10/s key · 5/s IPhttps://openapi.gaiaex.com/fapi/v1/leverageHMAC

Change Initial Leverage (TRADE)

Change user's initial leverage of specific symbol market.

Parameters:

NameTypeMandatoryDescription
symbolSTRINGYESTrading symbol (e.g., BTCUSDC, ETHUSDC, BTCUSDT, ETHUSDT)
leverageINTYESTarget initial leverage: int from 1 to maxLeverage of the symbol
recvWindowLONGNOTimestamp validity window in ms (default 5000)
timestampLONGYESCurrent Unix timestamp in milliseconds

Example Request:

POST https://openapi.gaiaex.com/fapi/v1/leverage?symbol=ETHUSDC&leverage=10&timestamp=1743508800000&signature=c3e85abeacfbb9ef64cfb7163b31d622e1a9744c128be6249e8347479c899158
X-MBX-APIKEY: your_api_key_here

Response:

{
  "leverage": 10,
  "maxNotionalValue": "INF",
  "symbol": "ETHUSDC"
}

Parameters

symbol
stringRequired

Trading symbol (e.g. ETHUSDC)

leverage
intRequired

Target initial leverage (1 to max leverage)

timestamp
intRequired

Request timestamp in ms

signature
stringRequired

HMAC-SHA256 signature

POST10/s key · 5/s IPhttps://openapi.gaiaex.com/fapi/v1/marginTypeHMAC

Change Margin Type (TRADE)

Change symbol level margin type between cross margin (CROSSED) and isolated margin (ISOLATED).

Parameters:

NameTypeMandatoryDescription
symbolSTRINGYESTrading symbol (e.g., ETHUSDC, BTCUSDT)
marginTypeENUMYESISOLATED or CROSSED
recvWindowLONGNOTimestamp validity window in ms (default 5000)
timestampLONGYESCurrent Unix timestamp in milliseconds

Example Request:

POST https://openapi.gaiaex.com/fapi/v1/marginType?symbol=ETHUSDC&marginType=CROSSED&timestamp=1743508800000&signature=8bb72b649cea0ef7e170cf82d7e7e902279cf8b4fbf73b7248c1eb00a62ddc42
X-MBX-APIKEY: your_api_key_here

Response:

{
  "code": 200,
  "msg": "success"
}

STRICT ISOLATED SYMBOLS

Some RWA/venture symbols (e.g. COPPERUSDC, NATGASUSDC) enforce strict isolated margin mode. For these symbols, the backend automatically applies isolated margin.

Parameters

symbol
stringRequired

Trading symbol (e.g. ETHUSDC)

marginType
stringRequired

ISOLATED or CROSSED

timestamp
intRequired

Request timestamp in ms

signature
stringRequired

HMAC-SHA256 signature

GET20/s IPhttps://openapi.gaiaex.com/fapi/v1/leverageBracket

Notional and Leverage Brackets (USER_DATA)

LIVE SANDBOXhttps://openapi.gaiaex.com/fapi/v1/leverageBracket?symbol=BTCUSDC

Query notional and leverage brackets for a symbol or all symbols.

Parameters:

NameTypeMandatoryDescription
symbolSTRINGNOTrading symbol (e.g., BTCUSDT, ETHUSDC). Omit to return brackets for all symbols.
recvWindowLONGNOTimestamp validity window in ms (default 5000)
timestampLONGNOCurrent Unix timestamp in milliseconds

Response:

[
  {
    "symbol": "BTCUSDT",
    "brackets": [
      {
        "bracket": 1,
        "initialLeverage": 100,
        "notionalCap": 50000,
        "notionalFloor": 0,
        "maintMarginRatio": 0.005,
        "cum": 0.0
      },
      {
        "bracket": 2,
        "initialLeverage": 50,
        "notionalCap": 250000,
        "notionalFloor": 50000,
        "maintMarginRatio": 0.01,
        "cum": 250.0
      }
    ]
  }
]

Representative Maximum Leverage by Asset Class

Asset ClassTypical Max LeverageExamples
Crypto major (USDC)25x–40xBTCUSDC 40x, ETHUSDC 25x
Crypto mid-cap (USDC)10x–20xSOLUSDC 20x, DOGEUSDC 10x
USDT-margined perpsup to 100xBTCUSDT, ETHUSDT, SOLUSDT
Forex RWA50xEURUSDC, JPYUSDC
Commodities RWA10x–20xGOLDUSDC 20x, NATGASUSDC 10x
Equities RWA10xAAPLUSDC, TSLAUSDC, NVDAUSDC
Indices RWA20x–25xUSA500USDC 20x, XYZ100USDC 25x
Pre-IPO / Venture3x–5xOPENAIUSDC 3x, ANTHROPICUSDC 3x, SPCXUSDC 5x

Parameters

symbol
stringOptional

Trading symbol (e.g. ETHUSDC)

GET20/s IPhttps://openapi.gaiaex.com/fapi/v1/positionSide/dualHMAC

Position Mode (One-Way / Hedge Mode)

GET / POST https://openapi.gaiaex.com/fapi/v1/positionSide/dual

Query or set the account's position mode across all symbols. GaiaEx operates in One-Way Mode (dualSidePosition: false); POST accepts the parameter for 1:1 SDK compatibility.

Parameters (POST):

NameTypeMandatoryDescription
dualSidePositionSTRINGYES"false": One-way Mode
recvWindowLONGNOTimestamp validity window in ms (default 5000)
timestampLONGYESCurrent Unix timestamp in milliseconds

Response (GET):

{
  "dualSidePosition": false
}

Response (POST):

{
  "code": 200,
  "msg": "success"
}

Parameters

timestamp
intRequired

Request timestamp in ms

signature
stringRequired

HMAC-SHA256 signature

GET20/s IPhttps://openapi.gaiaex.com/fapi/v1/multiAssetsMarginHMAC

Multi-Assets Mode

GET / POST https://openapi.gaiaex.com/fapi/v1/multiAssetsMargin

Query or set Multi-Assets margin mode status across symbols.

Response (GET):

{
  "multiAssetsMargin": true
}

Parameters

timestamp
intRequired

Request timestamp in ms

signature
stringRequired

HMAC-SHA256 signature