Quick answer
Gemini’s API offers public REST candles and order books, private REST trading signed by base64-encoding a JSON payload and HMAC-SHA384-signing it, and WebSocket market data and order events. A full sandbox at api.sandbox.gemini.com mirrors production, and Gemini is available in all US states.
Gemini API at a glance
- Pricing
- Free API; trading fees apply
- Availability
- US (all states), UK, EU, Singapore and more
- Paper trading
- Sandbox exchange at exchange.sandbox.gemini.com
- Integration type
- REST + API key
- In AlgoGP
- Design and backtest in AlgoGP, connect the exported code
- Auth
- Base64 JSON payload + HMAC-SHA384 signature
- Host
https://api.gemini.com- Sandbox
https://api.sandbox.gemini.com
Public market data from Gemini
curl -s https://api.gemini.com/v2/candles/btcusd/1hrSave the bars as CSV and replay them with the exported python backtest.py --csv bars.csv, or use CCXT to read the same candles in one line of Python.
What to know before automating Gemini
- Each private request needs a strictly increasing
noncein the payload. - Keys are scoped to a single account (or the master account) with roles such as Trader or Auditor.
Build a Gemini strategy with AlgoGP
AlgoGP does not connect to Gemini natively yet. Gemini uses plain HTTPS with an API key, so it is a good candidate for a native adapter; it is not built in yet.
- 1
Design and backtest in AlgoGP
Describe the strategy to the copilot and backtest it on years of normalized history. The result does not depend on any vendor.
- 2
Export the Python project
Every project exports
strategy.py,market_data.py,brokers.pyandlive.py. The strategy only sees bars, cash, positions and orders, never a vendor’s wire format. - 3
Plug in Gemini
Implement the four adapter methods (
account,positions,submit_market_orderand a candle fetcher) with Gemini’s SDK, or keep a built-in platform for paper trading and add Gemini when you go live.
Built-in brokers for the same markets: Alpaca, Binance, Kraken, Bybit.
Gemini API: frequently asked questions
Does Gemini have a sandbox?
Yes; create a separate account at exchange.sandbox.gemini.com and generate sandbox keys.
Design and backtest your Gemini strategy first
AlgoGP turns an idea into Python and tests it on years of history before you connect it to Gemini. The exported code keeps the broker behind four small adapter methods.
- AI copilot writes and revises the rules
- Backtests with realistic costs
- Exported Python ready to wire to Gemini
Free plan, no card required.
Gemini alternatives
- Coinbase Advanced Trade API GuideCoinbase’s trading API for spot and eligible derivatives, authenticated with CDP keys that sign a JWT per request.
- Kraken API Built into AlgoGPLong-running, US-available crypto exchange with granular API key permissions and public OHLC data.
- Bitstamp API GuideOne of the oldest regulated crypto exchanges (now part of Robinhood), with a v2 REST API, public OHLC and HMAC-signed trading.
- Alpaca API Built into AlgoGPCommission-free API-first broker for US stocks, ETFs and crypto, with a free paper-trading account.
Frameworks that connect to Gemini
Independent guide. AlgoGP is not affiliated with Gemini. Limits, prices and availability change; confirm them in the official documentation. Nothing here is investment advice.