Gate.io API
v4 REST + WebSocket · spot, futures and the only public CFD/TradFi API of the three
安全创建密钥
- 个人中心 → API管理 → 创建API密钥。
- Choose v4 key; name it after the app that will use it, one key per app.
- Permissions: tick Read Only for every scope first — wallet, spot, futures.
- Bind your server IP in the whitelist; keys without an IP bind expire faster and carry more risk.
- Store the secret once — Gate never shows it again.
权限:授予哪些
- Read-only: balances, order history, positions — all our portfolio views need.
- Trade scope: only after our referral gate (UID check) if you run our engine live.
- 提现范围:永不启用。我们拒绝启用此权限的密钥。
编码前值得了解
- Public market data needs no key at all — candles, tickers, order books.
- Futures and spot are separate API namespaces with separate rate budgets.
- CFD/TradFi instruments (gold, indices, oil) are served through the same futures-style API — unique among the three exchanges.
切勿授予任何人提现权限。 不要给我们,也不要给任何服务。我们的连接流程会拒绝具有提现权限的密钥。交易密钥可能亏损交易;提现密钥可能丢失账户。