Gate MCP

一个 Gate MCP(模型上下文协议)服务器,使 AI 代理能够与 Gate 加密货币交易所交互,获取实时市场数据。

Gate MCP

Gate MCP能力介绍

2025年2月,Gate MCP首发,一期为开发者提供基于中心化交易所的现货和合约市场的工具,为开发者提供真实可靠的市场数据。

MCP说明

Anthropic 推出的开源标准协议,连接 AI 与外部服务

MCP 核心概念

AI 可调用的函数,执行查询、API 调用等任务

现货市场数据

查询现货行情、订单簿、成交记录和 K 线数据

合约市场数据

获取合约信息、资金费率、溢价指数和强平历史

实时价格

获取 1,700+ 交易对的实时加密货币价格

技术分析

获取多种时间周期的 K 线/蜡烛图数据

现货市场工具

工具描述参数返回结果说明
list_currencies获取所有支持的币种及详情列出货币名称、精度、充值/取款状态
get_currency获取单个币种信息
  • currency (string, required): Currency name, e.g., BTC, ETH
单个币种信息
list_currency_pairs获取所有支持的交易对所有支持的交易对信息
get_currency_pair获取单个交易对详情
  • currency_pair (string, required): Trading pair name, e.g., BTC_USDT
单个交易对详情
get_spot_tickers获取现货市场行情(价格、成交量、涨跌幅)
  • currency_pair (string, optional): Trading pair name. Returns all pairs if not specified
  • timezone (string, optional): Timezone for statistics, e.g., Asia/Shanghai
现货市场行情(价格、成交量、涨跌幅)
get_spot_order_book获取交易对订单簿深度
  • currency_pair (string, required): Trading pair name
  • interval (string, optional): Price precision merge level, 0 for no merge
  • limit (number, optional): Number of levels to return, default 10, max 100
  • with_id (boolean, optional): Whether to return depth update ID
交易对订单簿深度
get_spot_trades获取最近成交记录
  • currency_pair (string, required): Trading pair name
  • limit (number, optional): Number of records, default 100
  • last_id (string, optional): Pagination cursor
  • reverse (boolean, optional): Reverse order
  • from (number, optional): Start timestamp (seconds)
  • to (number, optional): End timestamp (seconds)
  • page (number, optional): Page number
最近成交记录
get_spot_candlesticks获取 K 线/蜡烛图数据
  • currency_pair (string, required): Trading pair name
  • interval (string, optional): K-line period: 1m, 5m, 15m, 30m, 1h, 4h, 8h, 1d, 7d, 30d
  • limit (number, optional): Number of data points (mutually exclusive with from/to)
  • from (number, optional): Start timestamp (seconds)
  • to (number, optional): End timestamp (seconds)
K 线/蜡烛图数据

合约市场工具

工具描述参数返回结果说明
list_futures_contracts获取所有永续合约
  • settle (string, optional): Settlement currency, usdt or btc
  • limit (number, optional): Maximum number to return
  • offset (number, optional): Offset for pagination
所有永续合约列表
get_futures_contract获取单个合约详情
  • contract (string, required): Contract identifier, e.g., BTC_USDT
  • settle (string, optional): Settlement currency, default usdt
单个合约详情
get_futures_tickers获取合约市场行情
  • settle (string, optional): Settlement currency, default usdt
  • contract (string, optional): Contract identifier. Returns all if not specified
合约市场行情
get_futures_order_book获取合约订单簿深度
  • contract (string, required): Contract identifier
  • settle (string, optional): Settlement currency, default usdt
  • interval (string, optional): Price precision merge level
  • limit (number, optional): Number of levels
  • with_id (boolean, optional): Whether to return depth update ID
合约订单簿深度,包括价格和质量
get_futures_trades获取合约成交记录
  • contract (string, required): Contract identifier
  • settle (string, optional): Settlement currency, default usdt
  • limit (number, optional): Number of records
  • offset (number, optional): Offset for pagination
  • last_id (string, optional): Pagination cursor
  • from (number, optional): Start timestamp (seconds)
  • to (number, optional): End timestamp (seconds)
合约成交记录,包括价格、时间戳等
get_futures_candlesticks获取合约 K 线数据
  • contract (string, required): Contract identifier
  • settle (string, optional): Settlement currency, default usdt
  • interval (string, optional): K-line period
  • limit (number, optional): Number of data points
  • from (number, optional): Start timestamp (seconds)
  • to (number, optional): End timestamp (seconds)
  • timezone (string, optional): Timezone: all, utc0, utc8
合约 K 线数据
get_futures_funding_rate获取资金费率历史
  • contract (string, required): Contract identifier
  • settle (string, optional): Settlement currency, default usdt
  • limit (number, optional): Number of records
  • from (number, optional): Start timestamp
  • to (number, optional): End timestamp
资金费率历史信息
get_futures_premium_index获取溢价指数 K 线
  • contract (string, required): Contract identifier
  • settle (string, optional): Settlement currency, default usdt
  • interval (string, optional): Data point interval
  • limit (number, optional): Number of data points
  • from (number, optional): Start timestamp (seconds)
  • to (number, optional): End timestamp (seconds)
溢价指数 K 线数据
list_futures_liq_orders获取强平订单历史
  • settle (string, optional): Settlement currency, default usdt
  • contract (string, optional): Contract identifier. Returns all if not specified
  • limit (number, optional): Number of records
  • from (number, optional): Start timestamp
  • to (number, optional): End timestamp
强平订单历史记录

产品对接

使用 MCP 主要分为两种场景:Claude Desktop(桌面端) 和 Claude AI(网页端)。

在 Claude Desktop 中使用

添加Claude Connectors

网页版 claude.ai

进入 Settings -> Connectors,直接添加官方提供的Gate MCP集成(添加步骤和上述截图类似)。

应用示例

启用后,您可以通过自然语言与 Gate 市场数据交互:

查询 BTC 价格

BTC/USDT 现在什么价格?

U
AI

BTC/USDT 当前价格为 $83,742.9,24小时涨幅 +1.17%

获取市场深度

查看 ETH/USDT 的订单簿

U
AI

[显示买卖盘前 10 档价格和数量]

分析 K 线数据

获取 BTC 最近 7 天的日 K 线数据

U
AI

[返回 K 线数据并提供趋势分析]

OpenAI 在 ChatGPT 网页端集成 MCP 支持。

隐私与安全

  • 本服务仅查询公开的市场数据
  • 不收集任何个人信息
  • 所有 API 调用均通过 HTTPS 加密传输
  • 详情请参阅 Gate 隐私政策

支持与反馈

常见问题

交易,随时随地
qrCode
扫码下载 Gate App
社群列表
简体中文
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)