Gate MCP
Public Gate market data MCP for spot, futures, margin, options, delivery, earn, and alpha.
我該用這個嗎
品質與安全性
發現項目(42)
- LOW在 cex_alpha_list_alpha_currencies 中
- LOW在 cex_dc_list_dc_insurance_ledger 中
- LOW在 cex_dc_list_dc_risk_limit_tiers 中
- LOW在 cex_earn_get_dual_stock_project_recommend 中
- LOW在 cex_earn_list_dual_investment_plans 中
- LOW在 cex_earn_list_dual_stock_investment_plans 中
- LOW在 cex_earn_list_earn_fixed_term_products 中
- LOW在 cex_earn_list_earn_fixed_term_products_by_asset 中
- LOW在 cex_fx_list_batch_fx_funding_rates 中
- LOW在 cex_fx_list_fx_insurance_ledger 中
根據工具定義與協定合規性的自動化分析。
上下文成本
這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。
安裝
一鍵安裝
將以下內容加入你的 `claude_desktop_config.json` 檔案:
{
"mcpServers": {
"gate-mcp": {
"url": "https://api.gatemcp.ai/mcp"
}
}
}遠端端點
https://api.gatemcp.ai/mcpstreamable-http它能做什麼
工具清單
工具(83)
🟢cex_alpha_list_alpha_currencies(currency, limit, page)
List Alpha currencies.
輸入結構描述
{
"type": "object",
"properties": {
"currency": {
"description": "Alpha currency ID, for example USDS02b5a8dd2f59a098, not the display symbol USDS. First call GET /alpha/currencies without currency, match the token by name, chain and address, and use the returned currency field. Paginate with page and limit. Use cex_alpha_list_alpha_currencies without currency to obtain the currency field.",
"type": "string"
},
"limit": {
"default": 100,
"description": "Maximum number of records returned in a single list",
"format": "int32",
"maximum": 100,
"minimum": 1,
"type": "integer"
},
"page": {
"default": 1,
"description": "Page number",
"format": "int32",
"minimum": 1,
"type": "integer"
}
}
}🟢cex_alpha_list_alpha_tickers(currency, limit, page)
List Alpha tickers.
輸入結構描述
{
"type": "object",
"properties": {
"currency": {
"description": "Alpha currency ID, for example USDS02b5a8dd2f59a098, not the display symbol USDS. First call GET /alpha/currencies without currency, match the token by name, chain and address, and use the returned currency field. Paginate with page and limit. Use cex_alpha_list_alpha_currencies without currency to obtain the currency field.",
"type": "string"
},
"limit": {
"default": 100,
"description": "Maximum number of records returned in a single list",
"format": "int32",
"maximum": 100,
"minimum": 1,
"type": "integer"
},
"page": {
"default": 1,
"description": "Page number",
"format": "int32",
"minimum": 1,
"type": "integer"
}
}
}🟢cex_alpha_list_alpha_tokens(address, chain, launch_platform, page)
List Alpha tokens.
輸入結構描述
{
"type": "object",
"properties": {
"address": {
"description": "Query by contract address",
"type": "string"
},
"chain": {
"description": "Chain: solana, eth, bsc, base, world, sui, arbitrum, avalanche, polygon, linea, optimism, zksync, gatelayer",
"type": "string"
},
"launch_platform": {
"description": "Launch platform: meteora_dbc, fourmeme, moonshot, pump, raydium_launchlab, letsbonk, gatefun, virtuals",
"type": "string"
},
"page": {
"default": 1,
"description": "Page number",
"format": "int32",
"minimum": 1,
"type": "integer"
}
}
}🟢cex_cfd_query_categories
List all TradFi instrument categories
輸入結構描述
{
"type": "object"
}🟢cex_cfd_query_symbol_kline(begin_time, end_time, kline_type, limit, symbol)
Get kline/OHLCV data for a TradFi symbol
輸入結構描述
{
"type": "object",
"properties": {
"begin_time": {
"description": "Start time (Unix timestamp in seconds)",
"example": 1769378400,
"format": "int64",
"type": "integer"
},
"end_time": {
"description": "End time (Unix timestamp in seconds)",
"example": 1769464800,
"format": "int64",
"type": "integer"
},
"kline_type": {
"description": "Kline type (time period)",
"enum": [
"1m",
"15m",
"1h",
"4h",
"1d",
"7d",
"30d"
],
"example": "1m",
"type": "string"
},
"limit": {
"description": "Kline limit (max 500)",
"example": 100,
"maximum": 500,
"minimum": 1,
"type": "integer"
},
"symbol": {
"description": "Trading symbol code",
"example": "EURUSD",
"type": "string"
}
},
"required": [
"symbol",
"kline_type"
]
}🟢cex_cfd_query_symbol_ticker(symbol)
Get latest ticker for a TradFi symbol
輸入結構描述
{
"type": "object",
"properties": {
"symbol": {
"description": "Trading symbol code",
"example": "EURUSD",
"type": "string"
}
},
"required": [
"symbol"
]
}🟢cex_cfd_query_symbols
List all available TradFi trading symbols
輸入結構描述
{
"type": "object"
}🟢cex_dc_get_dc_contract(contract, settle)
Get delivery contract.
輸入結構描述
{
"type": "object",
"properties": {
"contract": {
"description": "Delivery contract identifier (e.g. BTC_USDT)",
"type": "string"
},
"settle": {
"description": "Settlement currency for delivery (e.g. usdt, btc)",
"enum": [
"usdt"
],
"type": "string"
}
},
"required": [
"contract",
"settle"
]
}🟢cex_dc_list_dc_candlesticks(contract, from, interval, limit, settle, ...)
List delivery candlesticks.
輸入結構描述
{
"type": "object",
"properties": {
"contract": {
"description": "Delivery contract identifier (e.g. BTC_USDT; may use mark_/index_ prefix for price type)",
"type": "string"
},
"from": {
"description": "Start timestamp in seconds",
"format": "int64",
"type": "integer"
},
"interval": {
"default": "5m",
"description": "Time interval for data points",
"enum": [
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"4h",
"6h",
"8h",
"12h",
"1d",
"7d",
"1w",
"30d"
],
"type": "string"
},
"limit": {
"default": 100,
"description": "Maximum number of data points to return",
"maximum": 2000,
"type": "integer"
},
"settle": {
"description": "Settlement currency for delivery (e.g. usdt, btc)",
"enum": [
"usdt"
],
"type": "string"
},
"to": {
"description": "End timestamp in seconds",
"format": "int64",
"type": "integer"
}
},
"required": [
"contract",
"settle"
]
}🟢cex_dc_list_dc_contracts(settle)
List delivery contracts.
輸入結構描述
{
"type": "object",
"properties": {
"settle": {
"description": "Settlement currency for delivery (e.g. usdt, btc)",
"enum": [
"usdt"
],
"type": "string"
}
},
"required": [
"settle"
]
}🟢cex_dc_list_dc_insurance_ledger(limit, settle)
List delivery insurance ledger.
輸入結構描述
{
"type": "object",
"properties": {
"limit": {
"default": 100,
"description": "Maximum number of records to return",
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
"settle": {
"description": "Settlement currency for delivery (e.g. usdt, btc)",
"enum": [
"usdt"
],
"type": "string"
}
},
"required": [
"settle"
]
}🟢cex_dc_list_dc_order_book(contract, interval, limit, settle, with_id)
Get delivery order book.
輸入結構描述
{
"type": "object",
"properties": {
"contract": {
"description": "Delivery contract identifier (e.g. BTC_USDT)",
"type": "string"
},
"interval": {
"default": "0",
"description": "Order depth aggregation precision. 0 means no aggregation, defaults to 0 if not specified",
"enum": [
"0",
"0.1",
"0.01"
],
"type": "string"
},
"limit": {
"default": 10,
"description": "Maximum number of order depth levels to return",
"maximum": 50,
"minimum": 1,
"type": "integer"
},
"settle": {
"description": "Settlement currency for delivery (e.g. usdt, btc)",
"enum": [
"usdt"
],
"type": "string"
},
"with_id": {
"default": false,
"description": "Whether to return order book update ID",
"type": "boolean"
}
},
"required": [
"contract",
"settle"
]
}🟢cex_dc_list_dc_risk_limit_tiers(contract, limit, offset, settle)
List delivery risk limit tiers.
輸入結構描述
{
"type": "object",
"properties": {
"contract": {
"description": "Optional delivery contract identifier; if set, risk tiers for that contract only",
"type": "string"
},
"limit": {
"default": 100,
"description": "Maximum number of records to return",
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
"offset": {
"default": 0,
"description": "List offset, starting from 0",
"minimum": 0,
"type": "integer"
},
"settle": {
"description": "Settlement currency for delivery (e.g. usdt, btc)",
"enum": [
"usdt"
],
"type": "string"
}
},
"required": [
"settle"
]
}🟢cex_dc_list_dc_tickers(contract, settle)
List delivery tickers.
輸入結構描述
{
"type": "object",
"properties": {
"contract": {
"description": "Optional delivery contract identifier; if set, only that contract's ticker is returned",
"type": "string"
},
"settle": {
"description": "Settlement currency for delivery (e.g. usdt, btc)",
"enum": [
"usdt"
],
"type": "string"
}
},
"required": [
"settle"
]
}🟢cex_dc_list_dc_trades(contract, from, last_id, limit, settle, ...)
List delivery trades.
輸入結構描述
{
"type": "object",
"properties": {
"contract": {
"description": "Delivery contract identifier (e.g. BTC_USDT)",
"type": "string"
},
"from": {
"description": "Start timestamp in seconds",
"format": "int64",
"type": "integer"
},
"last_id": {
"description": "Specify list starting point using the last record ID from previous request",
"type": "string"
},
"limit": {
"default": 100,
"description": "Maximum number of records to return",
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
"settle": {
"description": "Settlement currency for delivery (e.g. usdt, btc)",
"enum": [
"usdt"
],
"type": "string"
},
"to": {
"description": "End timestamp in seconds",
"format": "int64",
"type": "integer"
}
},
"required": [
"contract",
"settle"
]
}🟢cex_earn_get_dual_stock_project_recommend(coin, history_pids, mode, type)
Get recommendations for stock dual investment products
輸入結構描述
{
"type": "object",
"properties": {
"coin": {
"description": "Underlying currency",
"type": "string"
},
"history_pids": {
"description": "Previously recommended project IDs, separated by commas",
"type": "string"
},
"mode": {
"default": "normal",
"description": "Recommendation mode. Default: normal\nnormal: Regular users\nsenior: Experienced users",
"enum": [
"normal",
"senior"
],
"type": "string"
},
"type": {
"description": "`call`: sell high; `put`: buy low",
"enum": [
"call",
"put"
],
"type": "string"
}
}
}🟢cex_earn_get_uni_currency(currency)
Get Simple Earn currency details.
輸入結構描述
{
"type": "object",
"properties": {
"currency": {
"description": "Currency name",
"example": "btc",
"type": "string"
}
},
"required": [
"currency"
]
}🟢cex_earn_list_dual_investment_plans(coin, page, page_size, plan_id, quote_currency, ...)
List dual investment plans.
輸入結構描述
{
"type": "object",
"properties": {
"coin": {
"description": "Investment currency, e.g. BTC",
"type": "string"
},
"page": {
"description": "Page number",
"type": "integer"
},
"page_size": {
"description": "Items per page",
"type": "integer"
},
"plan_id": {
"description": "Financial project ID (int64)",
"format": "int64",
"type": "integer"
},
"quote_currency": {
"description": "Settlement currency: default USDT, optional GUSD",
"type": "string"
},
"sort": {
"description": "Sort: apy (APR desc), short-period (term asc), multiple (premium desc)",
"type": "string"
},
"type": {
"description": "put (low buy) or call (high sell)",
"type": "string"
}
}
}🟢cex_earn_list_dual_stock_investment_plans(coin, page, page_size, plan_id, quote_currency, ...)
List stock dual investment products
輸入結構描述
{
"type": "object",
"properties": {
"coin": {
"description": "Underlying currency",
"type": "string"
},
"page": {
"description": "page number",
"minimum": 1,
"type": "integer"
},
"page_size": {
"description": "Items per page,Maximum 100",
"maximum": 100,
"minimum": 1,
"type": "integer"
},
"plan_id": {
"description": "Product/plan ID. If provided, only the matching product is returned",
"type": "string"
},
"quote_currency": {
"default": "USDT",
"description": "Settlement currency. Default: USDT",
"type": "string"
},
"sort": {
"description": "Sort field enum:\n`apy` — highest APY first\n`short-period` — shortest tenor first\n`multiple` — highest premium first",
"type": "string"
},
"type": {
"description": "Type enum: `put` — buy low; `call` — sell high",
"enum": [
"call",
"put"
],
"type": "string"
}
}
}🟢cex_earn_list_earn_fixed_term_products(asset, limit, page, show_status, status, ...)
List fixed-term Earn products.
輸入結構描述
{
"type": "object",
"properties": {
"asset": {
"description": "Currency name, e.g. USDT",
"type": "string"
},
"limit": {
"description": "Page size",
"type": "integer"
},
"page": {
"description": "Page number",
"type": "integer"
},
"show_status": {
"description": "Visibility status filter. Pass \"2\" for visible products.",
"type": "string"
},
"status": {
"description": "Product status filter. Pass 2 for products available for subscription.",
"type": "integer"
},
"type": {
"description": "Product type: 1=normal, 2=vip",
"type": "integer"
}
},
"required": [
"page",
"limit"
]
}🟢cex_earn_list_earn_fixed_term_products_by_asset(asset, type)
List fixed-term Earn products by asset.
輸入結構描述
{
"type": "object",
"properties": {
"asset": {
"description": "Currency name, e.g. USDT, BTC",
"type": "string"
},
"type": {
"description": "Product type: empty or 1=normal, 2=vip, 0=all",
"type": "string"
}
},
"required": [
"asset"
]
}🟢cex_earn_list_uni_currencies
List Simple Earn currencies.
輸入結構描述
{
"type": "object"
}🟢cex_fc_list_fc_currency_pairs(currency, limit, page)
List all supported flash swap currency pairs
輸入結構描述
{
"type": "object",
"properties": {
"currency": {
"description": "Query by specified currency name",
"type": "string"
},
"limit": {
"default": 1000,
"description": "Maximum number of items returned. Default: 1000, minimum: 1, maximum: 1000",
"format": "int32",
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
"page": {
"default": 1,
"description": "Page number",
"format": "int32",
"minimum": 1,
"type": "integer"
}
}
}🟢cex_fx_get_fx_candlesticks(contract, from, interval, limit, settle, ...)
Get futures candlestick/OHLCV data
輸入結構描述
{
"type": "object",
"properties": {
"contract": {
"description": "Futures contract name",
"type": "string"
},
"from": {
"description": "Start timestamp in seconds. Defaults to to - 100 * interval if not specified",
"format": "int64",
"type": "integer"
},
"interval": {
"default": "5m",
"description": "Time interval. Note: 1w means natural week, 7d aligns with Unix epoch, 30d means natural month",
"enum": [
"10s",
"1m",
"5m",
"15m",
"30m",
"1h",
"4h",
"8h",
"1d",
"7d"
],
"type": "string"
},
"limit": {
"default": 100,
"description": "Maximum number of data points to return. Mutually exclusive with from/to parameters",
"maximum": 2000,
"type": "integer"
},
"settle": {
"description": "Settlement currency",
"enum": [
"btc",
"usdt",
"usd1"
],
"type": "string"
},
"timezone": {
"default": "utc0",
"description": "Timezone: all/utc0/utc8, defaults to utc0",
"type": "string"
},
"to": {
"description": "End timestamp in seconds, defaults to current time if not specified",
"format": "int64",
"type": "integer"
}
},
"required": [
"contract",
"settle"
]
}🟢cex_fx_get_fx_contract(contract, settle)
Get details of a single futures contract
輸入結構描述
{
"type": "object",
"properties": {
"contract": {
"description": "Futures contract name",
"type": "string"
},
"settle": {
"description": "Settlement currency",
"enum": [
"btc",
"usdt",
"usd1"
],
"type": "string"
}
},
"required": [
"contract",
"settle"
]
}🟢cex_fx_get_fx_funding_rate(contract, from, limit, settle, to)
Get funding rate history for a futures contract
輸入結構描述
{
"type": "object",
"properties": {
"contract": {
"description": "Futures contract name",
"type": "string"
},
"from": {
"description": "Start timestamp in seconds",
"format": "int64",
"type": "integer"
},
"limit": {
"default": 100,
"description": "Maximum number of records to return",
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
"settle": {
"description": "Settlement currency",
"enum": [
"btc",
"usdt",
"usd1"
],
"type": "string"
},
"to": {
"description": "End timestamp in seconds",
"format": "int64",
"type": "integer"
}
},
"required": [
"contract",
"settle"
]
}🟢cex_fx_get_fx_order_book(contract, interval, limit, settle, with_id)
Get futures order book
輸入結構描述
{
"type": "object",
"properties": {
"contract": {
"description": "Futures contract name",
"type": "string"
},
"interval": {
"default": "0",
"description": "Order depth aggregation precision. 0 means no aggregation, defaults to 0 if not specified",
"type": "string"
},
"limit": {
"default": 10,
"description": "Maximum number of order depth levels to return",
"maximum": 50,
"minimum": 1,
"type": "integer"
},
"settle": {
"description": "Settlement currency",
"enum": [
"btc",
"usdt",
"usd1"
],
"type": "string"
},
"with_id": {
"default": false,
"description": "Whether to return order book update ID. ID increments by 1 on each change",
"type": "boolean"
}
},
"required": [
"contract",
"settle"
]
}🟢cex_fx_get_fx_premium_index(contract, from, interval, limit, settle, ...)
Get premium index (mark price minus index price) history for a contract
輸入結構描述
{
"type": "object",
"properties": {
"contract": {
"description": "Futures contract name",
"type": "string"
},
"from": {
"description": "Start timestamp in seconds. Defaults to to - 100 * interval if not specified",
"format": "int64",
"type": "integer"
},
"interval": {
"default": "5m",
"description": "Time interval for data points",
"enum": [
"1m",
"5m",
"15m",
"30m",
"1h",
"4h",
"8h",
"1d",
"7d"
],
"type": "string"
},
"limit": {
"default": 100,
"description": "Maximum number of data points to return. Mutually exclusive with from/to parameters",
"maximum": 2000,
"type": "integer"
},
"settle": {
"description": "Settlement currency",
"enum": [
"btc",
"usdt",
"usd1"
],
"type": "string"
},
"to": {
"description": "End timestamp in seconds, defaults to current time if not specified",
"format": "int64",
"type": "integer"
}
},
"required": [
"contract",
"settle"
]
}🟢cex_fx_get_fx_risk_limit_table(settle, table_id)
Get a specific risk limit tier table by table ID.
輸入結構描述
{
"type": "object",
"properties": {
"settle": {
"description": "Settlement currency: usdt or btc",
"enum": [
"btc",
"usdt",
"usd1"
],
"type": "string"
},
"table_id": {
"description": "Risk limit table ID",
"type": "string"
}
},
"required": [
"settle",
"table_id"
]
}🟢cex_fx_get_fx_tickers(contract, settle)
Get ticker information for futures contracts
輸入結構描述
{
"type": "object",
"properties": {
"contract": {
"description": "Futures contract name. Only returns data for this contract if specified",
"type": "string"
},
"settle": {
"description": "Settlement currency",
"enum": [
"btc",
"usdt",
"usd1"
],
"type": "string"
}
},
"required": [
"settle"
]
}🟢cex_fx_get_fx_trades(contract, from, last_id, limit, offset, ...)
Get recent public trades for a futures contract
輸入結構描述
{
"type": "object",
"properties": {
"contract": {
"description": "Futures contract name",
"type": "string"
},
"from": {
"description": "Start timestamp in seconds. If not specified, returns records limited by to and limit",
"format": "int64",
"type": "integer"
},
"last_id": {
"description": "Specify list starting point using the last record ID from previous request",
"type": "string"
},
"limit": {
"default": 100,
"description": "Maximum number of records to return",
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
"offset": {
"default": 0,
"description": "List offset, starting from 0",
"minimum": 0,
"type": "integer"
},
"settle": {
"description": "Settlement currency",
"enum": [
"btc",
"usdt",
"usd1"
],
"type": "string"
},
"to": {
"description": "End timestamp in seconds, defaults to current time if not specified",
"format": "int64",
"type": "integer"
}
},
"required": [
"contract",
"settle"
]
}🟢cex_fx_get_index_constituents(index, settle)
Get constituent assets and weights for a futures index
輸入結構描述
{
"type": "object",
"properties": {
"index": {
"description": "Index name",
"type": "string"
},
"settle": {
"description": "Settlement currency",
"enum": [
"btc",
"usdt",
"usd1"
],
"type": "string"
}
},
"required": [
"index",
"settle"
]
}🟢cex_fx_list_batch_fx_funding_rates(contracts, settle)
Get current funding rates for multiple contracts in one request
輸入結構描述
{
"type": "object",
"properties": {
"contracts": {
"description": "Comma-separated list of contract names, e.g. BTC_USDT,ETH_USDT",
"example": [
"BTC_USDT",
"ETH_USDT"
],
"maxItems": 200,
"minItems": 1,
"type": "string"
},
"settle": {
"description": "Settlement currency",
"enum": [
"btc",
"usdt",
"usd1"
],
"type": "string"
}
},
"required": [
"settle",
"contracts"
]
}🟢cex_fx_list_contract_stats(contract, from, interval, limit, settle)
Get contract statistics (open interest, long/short ratio, etc.)
輸入結構描述
{
"type": "object",
"properties": {
"contract": {
"description": "Futures contract name",
"type": "string"
},
"from": {
"description": "Start timestamp in seconds",
"format": "int64",
"type": "integer"
},
"interval": {
"default": "5m",
"description": "Time interval for data points",
"type": "string"
},
"limit": {
"default": 30,
"description": "Maximum number of data points to return",
"maximum": 100,
"minimum": 1,
"type": "integer"
},
"settle": {
"description": "Settlement currency",
"enum": [
"btc",
"usdt",
"usd1"
],
"type": "string"
}
},
"required": [
"contract",
"settle"
]
}🟢cex_fx_list_fx_adl_risk_states(settle)
List market-level ADL risk states List the current ADL risk states of all futures markets for the specified settlement currency
輸入結構描述
{
"type": "object",
"properties": {
"settle": {
"description": "Perpetual futures settlement currency",
"enum": [
"btc",
"usdt",
"usd1"
],
"type": "string"
}
},
"required": [
"settle"
]
}🟢cex_fx_list_fx_contracts(limit, offset, settle)
List all perpetual futures contracts
輸入結構描述
{
"type": "object",
"properties": {
"limit": {
"default": 100,
"description": "Maximum number of records to return",
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
"offset": {
"default": 0,
"description": "List offset, starting from 0",
"minimum": 0,
"type": "integer"
},
"settle": {
"description": "Settlement currency",
"enum": [
"btc",
"usdt",
"usd1"
],
"type": "string"
}
},
"required": [
"settle"
]
}🟢cex_fx_list_fx_contracts_all(limit, offset, settle)
Query all contract information (including delisted)
輸入結構描述
{
"type": "object",
"properties": {
"limit": {
"default": 100,
"description": "Maximum number of records returned in a single list",
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
"offset": {
"default": 0,
"description": "List offset, starting from 0",
"minimum": 0,
"type": "integer"
},
"settle": {
"description": "Perpetual futures settlement currency",
"enum": [
"btc",
"usdt",
"usd1"
],
"type": "string"
}
},
"required": [
"settle"
]
}🟢cex_fx_list_fx_insurance_ledger(limit, settle)
Get futures insurance fund history
輸入結構描述
{
"type": "object",
"properties": {
"limit": {
"default": 100,
"description": "Maximum number of records to return",
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
"settle": {
"description": "Settlement currency",
"enum": [
"btc",
"usdt",
"usd1"
],
"type": "string"
}
},
"required": [
"settle"
]
}🟢cex_fx_list_fx_liq_orders(contract, from, limit, settle, to)
Get personal futures liquidation history.
輸入結構描述
{
"type": "object",
"properties": {
"contract": {
"description": "Futures contract name. Only returns data for this contract if specified",
"type": "string"
},
"from": {
"description": "Start timestamp in seconds",
"format": "int64",
"type": "integer"
},
"limit": {
"default": 100,
"description": "Maximum number of records to return",
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
"settle": {
"description": "Settlement currency",
"enum": [
"btc",
"usdt",
"usd1"
],
"type": "string"
},
"to": {
"description": "End timestamp in seconds",
"format": "int64",
"type": "integer"
}
},
"required": [
"settle"
]
}🟢cex_fx_list_fx_risk_limit_tiers(contract, limit, offset, settle)
Get risk limit tiers for a futures contract
輸入結構描述
{
"type": "object",
"properties": {
"contract": {
"description": "Futures contract name. Only returns data for this contract if specified",
"type": "string"
},
"limit": {
"default": 100,
"description": "Maximum number of records to return",
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
"offset": {
"default": 0,
"description": "List offset, starting from 0",
"minimum": 0,
"type": "integer"
},
"settle": {
"description": "Settlement currency: usdt or btc",
"enum": [
"btc",
"usdt",
"usd1"
],
"type": "string"
}
},
"required": [
"settle"
]
}🟢cex_fx_list_fx_rpi_order_book(contract, interval, limit, settle, with_id)
Query futures RPI order book Bids will be sorted by price from high to low, while asks sorted reversely
輸入結構描述
{
"type": "object",
"properties": {
"contract": {
"description": "Futures contract",
"type": "string"
},
"interval": {
"default": "0",
"description": "Price precision for merged depth. 0 means no merging. If not specified, defaults to 0",
"type": "string"
},
"limit": {
"default": 10,
"description": "Number of depth levels",
"maximum": 50,
"minimum": 1,
"type": "integer"
},
"settle": {
"description": "Perpetual futures settlement currency",
"enum": [
"btc",
"usdt",
"usd1"
],
"type": "string"
},
"with_id": {
"default": false,
"description": "Whether to return depth update ID. This ID increments by 1 each time the depth changes",
"type": "boolean"
}
},
"required": [
"settle",
"contract"
]
}🟢cex_margin_get_market_margin_tier(currency_pair)
Get margin leverage tiers for a currency pair
輸入結構描述
{
"type": "object",
"properties": {
"currency_pair": {
"description": "Currency pair, e.g. BTC_USDT",
"type": "string"
}
},
"required": [
"currency_pair"
]
}🟢cex_margin_get_uni_currency_pair(currency_pair)
Get details of a specific unified margin currency pair
輸入結構描述
{
"type": "object",
"properties": {
"currency_pair": {
"description": "Currency pair, e.g. ADA_USDT",
"example": "AE_USDT",
"type": "string"
}
},
"required": [
"currency_pair"
]
}🟢cex_margin_list_uni_currency_pairs
List all currency pairs supported for unified margin lending
輸入結構描述
{
"type": "object"
}🟢cex_mcl_get_multi_collateral_current_rate(currencies, vip_level)
Get current interest rates for specified currencies in multi-collateral loans (public)
輸入結構描述
{
"type": "object",
"properties": {
"currencies": {
"description": "Currency names separated by commas, e.g. BTC,ETH,USDT. Maximum 100 items",
"items": {
"type": "string"
},
"maxItems": 100,
"minItems": 1,
"type": "string"
},
"vip_level": {
"default": "0",
"description": "VIP level, defaults to 0 if not specified",
"type": "string"
}
},
"required": [
"currencies"
]
}🟢cex_mcl_get_multi_collateral_fix_rate
Get available fixed interest rates for multi-collateral loans (public)
輸入結構描述
{
"type": "object"
}🟢cex_mcl_get_multi_collateral_ltv
Get LTV (Loan-to-Value) ratios for multi-collateral loans (public)
輸入結構描述
{
"type": "object"
}🟢cex_mcl_list_multi_collateral_currencies
List all supported currencies for multi-collateral loans (public)
輸入結構描述
{
"type": "object"
}🟢cex_options_get_options_contract(contract)
Get details of a single options contract
輸入結構描述
{
"type": "object",
"properties": {
"contract": {
"description": "Options contract name",
"type": "string"
}
},
"required": [
"contract"
]
}🟢cex_options_get_options_settlement(at, contract, underlying)
Get a single options settlement record
輸入結構描述
{
"type": "object",
"properties": {
"at": {
"description": "Settlement timestamp (Unix timestamp in seconds)",
"format": "int64",
"type": "string"
},
"contract": {
"description": "Options contract name",
"type": "string"
},
"underlying": {
"description": "Underlying asset name, e.g. BTC_USDT",
"type": "string"
}
},
"required": [
"contract",
"underlying",
"at"
]
}🟢cex_options_list_options_candlesticks(contract, from, interval, limit, to)
Get options candlestick data
輸入結構描述
{
"type": "object",
"properties": {
"contract": {
"description": "Options contract name",
"type": "string"
},
"from": {
"description": "Start timestamp in seconds",
"format": "int64",
"type": "integer"
},
"interval": {
"default": "5m",
"description": "Time interval between data points, e.g. 1m, 5m, 15m, 30m, 1h",
"enum": [
"1m",
"5m",
"15m",
"30m",
"1h"
],
"type": "string"
},
"limit": {
"default": 100,
"description": "Maximum number of records to return",
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
"to": {
"description": "End timestamp in seconds",
"format": "int64",
"type": "integer"
}
},
"required": [
"contract"
]
}🟢cex_options_list_options_contracts(expiration, underlying)
List all options contracts for an underlying
輸入結構描述
{
"type": "object",
"properties": {
"expiration": {
"description": "Unix timestamp of expiration date",
"format": "int64",
"type": "integer"
},
"underlying": {
"description": "Underlying asset name, e.g. BTC_USDT",
"type": "string"
}
},
"required": [
"underlying"
]
}🟢cex_options_list_options_expirations(underlying)
List option expiration dates for an underlying
輸入結構描述
{
"type": "object",
"properties": {
"underlying": {
"description": "Underlying asset name, e.g. BTC_USDT",
"type": "string"
}
},
"required": [
"underlying"
]
}🟢cex_options_list_options_order_book(contract, interval, limit, with_id)
Get options order book
輸入結構描述
{
"type": "object",
"properties": {
"contract": {
"description": "Options contract name",
"type": "string"
},
"interval": {
"default": "0",
"description": "Price precision for merged depth. 0 means no merging",
"enum": [
"0",
"0.1",
"0.01"
],
"type": "string"
},
"limit": {
"default": 10,
"description": "Number of depth levels",
"maximum": 50,
"minimum": 1,
"type": "integer"
},
"with_id": {
"default": false,
"description": "Whether to return depth update ID",
"type": "boolean"
}
},
"required": [
"contract"
]
}🟢cex_options_list_options_settlements(from, limit, offset, to, underlying)
List options settlement history for an underlying
輸入結構描述
{
"type": "object",
"properties": {
"from": {
"description": "Start timestamp in seconds",
"format": "int64",
"type": "integer"
},
"limit": {
"default": 100,
"description": "Maximum number of records to return",
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
"offset": {
"default": 0,
"description": "List offset, starting from 0",
"minimum": 0,
"type": "integer"
},
"to": {
"description": "End timestamp in seconds",
"format": "int64",
"type": "integer"
},
"underlying": {
"description": "Underlying asset name, e.g. BTC_USDT",
"type": "string"
}
},
"required": [
"underlying"
]
}🟢cex_options_list_options_tickers(underlying)
Get options tickers for an underlying
輸入結構描述
{
"type": "object",
"properties": {
"underlying": {
"description": "Underlying asset name, e.g. BTC_USDT",
"type": "string"
}
},
"required": [
"underlying"
]
}🟢cex_options_list_options_trades(contract, from, limit, offset, to, ...)
List public options trades
輸入結構描述
{
"type": "object",
"properties": {
"contract": {
"description": "Options contract name",
"type": "string"
},
"from": {
"description": "Start timestamp in seconds",
"format": "int64",
"type": "integer"
},
"limit": {
"default": 100,
"description": "Maximum number of records to return",
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
"offset": {
"default": 0,
"description": "List offset, starting from 0",
"minimum": 0,
"type": "integer"
},
"to": {
"description": "End timestamp in seconds",
"format": "int64",
"type": "integer"
},
"type": {
"description": "Option type: C for call, P for put",
"format": "P",
"type": "string"
}
}
}🟢cex_options_list_options_underlying_candlesticks(from, interval, limit, to, underlying)
Get candlestick data for an options underlying index
輸入結構描述
{
"type": "object",
"properties": {
"from": {
"description": "Start timestamp in seconds",
"format": "int64",
"type": "integer"
},
"interval": {
"default": "5m",
"description": "Time interval between data points, e.g. 1m, 5m, 15m, 30m, 1h",
"enum": [
"1m",
"5m",
"15m",
"30m",
"1h"
],
"type": "string"
},
"limit": {
"default": 100,
"description": "Maximum number of records to return",
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
"to": {
"description": "End timestamp in seconds",
"format": "int64",
"type": "integer"
},
"underlying": {
"description": "Underlying asset name, e.g. BTC_USDT",
"type": "string"
}
},
"required": [
"underlying"
]
}🟢cex_options_list_options_underlying_tickers(underlying)
Get ticker data for all contracts under an underlying
輸入結構描述
{
"type": "object",
"properties": {
"underlying": {
"description": "Underlying asset name, e.g. BTC_USDT",
"type": "string"
}
},
"required": [
"underlying"
]
}🟢cex_options_list_options_underlyings
List all options underlying assets
輸入結構描述
{
"type": "object"
}🟢cex_spot_get_currency(currency)
Get details of a single currency
輸入結構描述
{
"type": "object",
"properties": {
"currency": {
"description": "Currency name",
"type": "string"
}
},
"required": [
"currency"
]
}🟢cex_spot_get_currency_pair(currency_pair)
Get details of a single currency pair
輸入結構描述
{
"type": "object",
"properties": {
"currency_pair": {
"description": "Currency pair name, e.g. BTC_USDT",
"type": "string"
}
},
"required": [
"currency_pair"
]
}🟢cex_spot_get_spot_candlesticks(currency_pair, from, interval, limit, to)
Get candlestick/OHLCV data for a currency pair
輸入結構描述
{
"type": "object",
"properties": {
"currency_pair": {
"description": "Currency pair",
"type": "string"
},
"from": {
"description": "Start time of K-line in Unix timestamp (seconds). Defaults to to - 100 * interval if not specified",
"format": "int64",
"type": "integer"
},
"interval": {
"default": "30m",
"description": "Time interval of data points. Note: 30d represents natural month, not 30 days",
"enum": [
"1s",
"10s",
"1m",
"5m",
"15m",
"30m",
"1h",
"4h",
"8h",
"1d",
"7d",
"30d"
],
"type": "string"
},
"limit": {
"default": 100,
"description": "Maximum number of data points to return. Mutually exclusive with from/to parameters",
"maximum": 1000,
"type": "integer"
},
"to": {
"description": "End time of K-line in Unix timestamp (seconds). Defaults to current time if not specified",
"format": "int64",
"type": "integer"
}
},
"required": [
"currency_pair"
]
}🟢cex_spot_get_spot_insurance_history(business, currency, from, limit, page, ...)
Get spot insurance fund history for a currency
輸入結構描述
{
"type": "object",
"properties": {
"business": {
"description": "Leverage business: margin - position by position; unified - unified account",
"type": "string"
},
"currency": {
"description": "Currency",
"type": "string"
},
"from": {
"description": "Start timestamp in seconds",
"format": "int64",
"type": "string"
},
"limit": {
"default": 30,
"description": "Maximum number of items returned in the list, default 30",
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
"page": {
"default": 1,
"description": "Page number",
"format": "int32",
"minimum": 1,
"type": "integer"
},
"to": {
"description": "End timestamp in seconds",
"format": "int64",
"type": "string"
}
},
"required": [
"business",
"currency",
"from",
"to"
]
}🟢cex_spot_get_spot_order_book(currency_pair, interval, limit, with_id)
Get the order book for a currency pair
輸入結構描述
{
"type": "object",
"properties": {
"currency_pair": {
"description": "Currency pair",
"type": "string"
},
"interval": {
"default": "0",
"description": "Order depth aggregation precision. 0 means no aggregation",
"type": "string"
},
"limit": {
"default": 10,
"description": "Maximum number of order depth levels to return, default 10, max 100",
"minimum": 1,
"type": "integer"
},
"with_id": {
"default": false,
"description": "Whether to return order book update ID",
"type": "boolean"
}
},
"required": [
"currency_pair"
]
}🟢cex_spot_get_spot_tickers(currency_pair, timezone)
Get ticker information for one or all currency pairs
輸入結構描述
{
"type": "object",
"properties": {
"currency_pair": {
"description": "Currency pair name, e.g. BTC_USDT. Returns all pairs if not specified",
"type": "string"
},
"timezone": {
"description": "Timezone, e.g. Asia/Shanghai. Affects the time range of statistics",
"enum": [
"utc0",
"utc8",
"all"
],
"type": "string"
}
}
}🟢cex_spot_get_spot_trades(currency_pair, from, last_id, limit, page, ...)
Get recent trades for a currency pair
輸入結構描述
{
"type": "object",
"properties": {
"currency_pair": {
"description": "Currency pair",
"type": "string"
},
"from": {
"description": "Start timestamp in seconds",
"format": "int64",
"type": "integer"
},
"last_id": {
"description": "Use the last record ID from previous list as starting point for next list",
"type": "string"
},
"limit": {
"default": 100,
"description": "Maximum number of records to return, default 100",
"format": "int32",
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
"page": {
"default": 1,
"description": "Page number",
"format": "int32",
"minimum": 1,
"type": "integer"
},
"reverse": {
"default": false,
"description": "Whether to retrieve records less than last_id. Default returns records greater than last_id",
"type": "boolean"
},
"to": {
"description": "End timestamp in seconds, defaults to current time if not specified",
"format": "int64",
"type": "integer"
}
},
"required": [
"currency_pair"
]
}🟢cex_spot_list_currencies
List all currencies supported
輸入結構描述
{
"type": "object"
}🟢cex_spot_list_currency_pairs
List all available spot trading pairs
輸入結構描述
{
"type": "object"
}🟢cex_spot_list_spot_rpi_order_book(currency_pair, interval, limit, with_id)
Get the RPI order book Get the RPI order book, with bids sorted by descending price and asks by ascending price.
輸入結構描述
{
"type": "object",
"properties": {
"currency_pair": {
"description": "Currency pair",
"type": "string"
},
"interval": {
"default": "0",
"description": "Price precision for merged depth. 0 means no merging. If not specified, defaults to 0",
"type": "string"
},
"limit": {
"default": 10,
"description": "Number of depth levels",
"minimum": 1,
"type": "integer"
},
"with_id": {
"default": false,
"description": "Return order book update ID",
"type": "boolean"
}
},
"required": [
"currency_pair"
]
}🟢cex_square_list_live_replay(coin, limit, sort, tag)
List live stream replays from Gate Square
輸入結構描述
{
"type": "object",
"properties": {
"coin": {
"description": "Currency name filter (e.g. BTC, ETH)",
"type": "string"
},
"limit": {
"default": 3,
"description": "Number of results, 1~10, default 3",
"maximum": 10,
"minimum": 1,
"type": "integer"
},
"sort": {
"default": "hot",
"description": "Sort order: hot=hottest (default), new=newest",
"enum": [
"hot",
"new"
],
"type": "string"
},
"tag": {
"description": "Business type filter: Market Analysis, Hot Topics, Blockchain, Others",
"type": "string"
}
}
}🟢cex_square_list_square_ai_search(currency, keyword, limit, page, sort, ...)
Search Gate Square content using AI (posts, analysis, signals)
輸入結構描述
{
"type": "object",
"properties": {
"currency": {
"description": "Currency filter (exact currency code, e.g. BTC, ETH, SOL)",
"type": "string"
},
"keyword": {
"description": "Search keyword (currency name or content keyword, e.g. BTC, ETH)",
"type": "string"
},
"limit": {
"default": 10,
"description": "Number of results, 1~50, default 10",
"maximum": 50,
"minimum": 1,
"type": "integer"
},
"page": {
"default": 1,
"description": "Page number for pagination, starting from 1",
"format": "int32",
"minimum": 1,
"type": "integer"
},
"sort": {
"default": 0,
"description": "Sort order: 0=hottest (default), 1=newest",
"enum": [
0,
1
],
"type": "integer"
},
"time_range": {
"default": 0,
"description": "Time range: 0=all (default), 1=last day, 2=last week, 3=last month",
"enum": [
0,
1,
2,
3
],
"type": "integer"
}
}
}🟢cex_stock_query_stock_exchanges
Query supported exchanges Query stock spot supported exchanges and whether stock transfers are supported. Rate limit: 5 qps.
輸入結構描述
{
"type": "object"
}🟢cex_stock_query_stock_fee_rate
Query fee rates for Japanese and Korean stocks Query fee rates for Japanese and Korean stocks. Rate limit: 5 qps.
輸入結構描述
{
"type": "object"
}🟢cex_stock_query_stock_order_book(symbol)
Query market order book Rate limit: 5 qps.
輸入結構描述
{
"type": "object",
"properties": {
"symbol": {
"description": "Symbol",
"example": "AAPL",
"type": "string"
}
},
"required": [
"symbol"
]
}🟢cex_stock_query_stock_symbol_detail(exchange, page, page_size, symbols)
Query symbol details Rate limit: 5 qps.
輸入結構描述
{
"type": "object",
"properties": {
"exchange": {
"description": "Exchange.\n- us: US stocks.\n- hk: Hong Kong stocks.\n- kr: Korean stocks.\n- jp: Japanese stocks.",
"enum": [
"us",
"hk",
"kr",
"jp"
],
"example": "us",
"type": "string"
},
"page": {
"description": "Page number, defaults to 1",
"example": 1,
"type": "integer"
},
"page_size": {
"description": "Page size, defaults to 10, max 500; server caps at 500",
"example": 100,
"maximum": 500,
"type": "integer"
},
"symbols": {
"description": "Symbol list, multiple separated by commas",
"example": "AAPL,TSLA",
"type": "string"
}
}
}🟢cex_stock_query_stock_symbols(exchange, page, page_size, symbols, with_desc_i18n)
Query symbol list Rate limit: 5 qps.
輸入結構描述
{
"type": "object",
"properties": {
"exchange": {
"description": "Exchange.\n- us: US stocks.\n- hk: Hong Kong stocks.\n- kr: Korean stocks.\n- jp: Japanese stocks.",
"enum": [
"us",
"hk",
"kr",
"jp"
],
"example": "us",
"type": "string"
},
"page": {
"description": "Page number, defaults to 1",
"example": 1,
"type": "integer"
},
"page_size": {
"description": "Page size, defaults to 10, max 500; server caps at 500",
"example": 100,
"maximum": 500,
"type": "integer"
},
"symbols": {
"description": "Symbol list, multiple separated by commas",
"example": "AAPL,TSLA",
"type": "string"
},
"with_desc_i18n": {
"description": "Whether to return multilingual symbol description",
"example": true,
"type": "boolean"
}
}
}🟢cex_unified_calculate_portfolio_margin(body)
Calculate portfolio margin for hypothetical positions (read-only simulation).
輸入結構描述
{
"type": "object",
"properties": {
"body": {
"description": "JSON body: UnifiedPortfolioInput with spot_balances, spot_orders, futures_positions, etc.",
"type": "string"
}
},
"required": [
"body"
]
}🟢cex_unified_get_history_loan_rate(currency, limit, page, tier)
Get historical loan rates for a currency.
輸入結構描述
{
"type": "object",
"properties": {
"currency": {
"description": "Currency name",
"type": "string"
},
"limit": {
"default": 100,
"description": "Max records, default 100",
"format": "int32",
"maximum": 100,
"minimum": 1,
"type": "integer"
},
"page": {
"default": 1,
"description": "Page number",
"format": "int32",
"minimum": 1,
"type": "integer"
},
"tier": {
"description": "VIP tier for floating rate",
"type": "string"
}
},
"required": [
"currency"
]
}🟢cex_unified_list_currency_discount_tiers
List currency discount tiers for unified account collateral
輸入結構描述
{
"type": "object"
}🟢cex_unified_list_loan_margin_tiers
List loan margin tiers for unified account
輸入結構描述
{
"type": "object"
}🟢cex_unified_list_unified_currencies(currency)
List currencies supported in unified account.
輸入結構描述
{
"type": "object",
"properties": {
"currency": {
"description": "Currency name to filter",
"type": "string"
}
}
}🟢cex_wallet_list_currency_chains(currency)
List chains supported for a currency
輸入結構描述
{
"type": "object",
"properties": {
"currency": {
"description": "Currency name, e.g. BTC, USDT",
"type": "string"
}
},
"required": [
"currency"
]
}社群
證據