Guide
BrokerMarket dataCrypto API key

Gemini API guide

Gemini is a New York trust company, which makes it a common choice for US traders who need a regulated venue with a real sandbox.

Last verified · Also known as Gemini API, Gemini exchange API

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/1hr
Hourly BTC/USD candles (keyless; newest first).

Save 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 nonce in 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. 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. 2

    Export the Python project

    Every project exports strategy.py, market_data.py, brokers.py and live.py. The strategy only sees bars, cash, positions and orders, never a vendor’s wire format.

  3. 3

    Plug in Gemini

    Implement the four adapter methods (account, positions, submit_market_order and 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

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.

Build a strategy