canonical: https://jentic.com/apis/gemini.com/gemini

# Gemini REST API

The Gemini REST API is the trading and account interface for Gemini, the regulated cryptocurrency exchange. It exposes 28 endpoints for public market data (order books, ticker, price feeds, trading symbols), authenticated trading (place new order, cancel single, cancel all, status), account state (balances, notional balances, transfers, deposit address creation), and historical activity (my trades, order history, fee promotions). Authentication uses HMAC-SHA384 with three headers - X-GEMINI-APIKEY, X-GEMINI-PAYLOAD, and X-GEMINI-SIGNATURE - over a base64-encoded JSON request payload.

## For AI agents

Place and cancel cryptocurrency orders, read live order books, and pull account balances and trade history on Gemini.

## Scope

Does not handle fiat banking, custody, or staking - use for cryptocurrency trading, market data, and account operations on Gemini only.

## Capabilities

- Read real-time order book depth for any trading symbol via /v1/book/{symbol}
- Place buy and sell orders, including limit, market, and stop variants, through /v1/order/new
- Cancel a specific order with /v1/order/cancel or every open order at once with /v1/order/cancel/all
- Pull account balances in native units and notional USD via /v1/balances and /v1/notionalbalances/{currency}
- Generate a new deposit address for a supported currency through /v1/deposit/{currency}/newAddress
- Retrieve historical fills with /v1/mytrades and order history with /v1/orders/history

## Use cases

### Algorithmic Trading Bot

Run a strategy that places, cancels, and manages orders on Gemini. The agent watches /v1/book/{symbol} for liquidity, posts orders to /v1/order/new, and reconciles fills via /v1/order/status. Replaces a UI trader for high-frequency or systematic strategies.

Example prompt: Watch /v1/book/BTCUSD for the best bid, POST /v1/order/new with type=exchange limit, side=buy, and the calculated price; on fill, refresh balances via /v1/balances

### Portfolio Reporting Across Crypto Holdings

Pull account-wide balances and notional USD values into a portfolio dashboard. The agent calls /v1/balances and /v1/notionalbalances/USD on a schedule and posts the aggregate to a finance dashboard. Eliminates manual exchange-by-exchange exports.

Example prompt: GET /v1/balances and /v1/notionalbalances/USD on an hourly cron, store the snapshot, and surface the totals on a portfolio page

### Tax And Audit Trade History Export

Export complete trade history for tax season or an audit. The agent walks /v1/mytrades and /v1/orders/history paginated by timestamp, normalises the records, and writes them to a spreadsheet or accounting tool. Spares the team from manual CSV downloads.

Example prompt: POST /v1/mytrades with a symbol and timestamp range, paginate until empty, and write each fill to the destination ledger

### Agent-Led Crypto Operations Through Jentic

AI agents discover Gemini through Jentic's intent search and execute trading or balance reads without implementing the HMAC-SHA384 signing flow themselves. Jentic isolates the API key and secret in its vault and produces the X-GEMINI-SIGNATURE header at execution time. Critical for an API where credential leakage is financially material.

Example prompt: Use Jentic search query 'place a crypto order on Gemini' to load the gemini_place_order tool and execute with symbol, side, type, and amount

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /v1/order/new | Place a new trading order |
| POST | /v1/order/cancel | Cancel a specific order |
| POST | /v1/order/cancel/all | Cancel all open orders |
| POST | /v1/order/status | Get the status of an order |
| GET | /v1/book/{symbol} | Read the order book for a symbol |
| POST | /v1/balances | Retrieve account balances |
| POST | /v1/mytrades | Retrieve my trade history |

## Key resources

- **Public Market Data** — Read order books, tickers, price feeds, and symbol details
- **Orders** — Place, cancel, and check status of trading orders
- **Account** — Balances, notional balances, fee promotions, and transfers
- **Deposits** — Generate deposit addresses per supported currency
- **History** — My trades and order history for reporting

## Why Jentic

- **Setup:** Wiring the Gemini REST API by hand means implementing its X-GEMINI-APIKEY header, computing the X-GEMINI-SIGNATURE HMAC on every private request from your secret, and choosing between the live and sandbox hosts yourself. Through Jentic you install once, import Gemini from the API Directory, store the key and secret once, and your agent calls it.
- **Permission scoping:** Gemini's trading actions like /v1/order/new and /v1/order/cancel take their target in the request body rather than the URL path, so scope the agent to the operations it needs, such as reading a book and placing an order. You choose the operations it may call, so fund-moving ones like canceling all orders or reading balances are not included unless you add them.
- **Credential handling:** Your Gemini API key and secret are stored once, encrypted, by your own Jentic One instance, and the signing HMAC is computed at execution time. The raw secret never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'place a crypto order on Gemini' or 'get the order book for a symbol', and Jentic returns the matching Gemini operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Kraken API** — Kraken offers a comparable cryptocurrency trading API; Gemini is US-regulated and emphasises compliance-first trading.
- **Binance API** — Binance has the deepest liquidity and broadest pair coverage; Gemini is smaller but US-regulated and integrates with traditional finance flows.
- **Bitstamp API** — Bitstamp is a long-running European exchange with similar order and account endpoints; Gemini is US-based and uses HMAC-SHA384 over base64 payloads.

## FAQ

### What authentication does the Gemini REST API use?

Gemini uses HMAC-SHA384 signing. Each authenticated request needs three headers - X-GEMINI-APIKEY, X-GEMINI-PAYLOAD (base64-encoded JSON request body), and X-GEMINI-SIGNATURE. Through Jentic the key and secret are stored encrypted in the vault and the signature is computed at execution time.

### Can I place a limit order with the Gemini API?

Yes. POST /v1/order/new with type=exchange limit and the symbol, side, amount, and price fields. The response includes the assigned order_id which you can later pass to /v1/order/status or /v1/order/cancel.

### How do I cancel all open orders at once?

Call POST /v1/order/cancel/all. Gemini cancels every open order under the API key's scope and returns a result list. Use /v1/order/cancel for cancelling a single order id instead.

### What are the rate limits for the Gemini REST API?

Gemini's documented limits are 600 public requests per minute and 600 private requests per minute, with stricter caps on order placement bursts. Back off on HTTP 429 and consult docs.gemini.com for the current ceilings before scaling.

### Can I generate a deposit address through the API?

Yes. POST /v1/deposit/{currency}/newAddress generates a new deposit address for that currency and returns the address string. Suitable for systems that rotate addresses per deposit for audit reasons.

### How do I trade on Gemini through Jentic?

Install with pip install jentic, search 'place a crypto order on Gemini', load the gemini_place_order operation schema, and execute with symbol, side, type, amount, and price. Jentic computes the X-GEMINI-SIGNATURE header from the vaulted secret.

### Can I limit what my agent is allowed to do with the Gemini REST API?

Yes. Because you run Jentic One yourself, you decide which Gemini operations the agent may call and which stored key and secret it may use, so you can grant read-only access to public market data like the order book at /v1/book/{symbol} while withholding trading operations. Gemini's trading calls such as /v1/order/new and /v1/order/cancel pass their target in the request body rather than the URL, so you scope by whitelisting the specific operations the agent needs. Fund-moving operations like canceling all open orders at /v1/order/cancel/all or reading account balances at /v1/balances stay off limits unless you explicitly add them.
