Gate.io API
v4 REST + WebSocket · spot, futures and the only public CFD/TradFi API of the three
Create a key safely
- Profile → API Management → Create API key.
- 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.
Permissions: what to grant
- 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.
- Withdrawal scope: never. We refuse keys that have it enabled.
Worth knowing before you code
- 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.
Never grant withdrawal permission to anyone. Not to us, not to any service. Our connect flow refuses keys that have it. A trading key can lose a trade; a withdrawal key can lose the account.
Connect this key to our engine → Official API docs Connect via our Gate funnel
Other guides: OKX API · Bybit API · MEXC API · Compare their fees