Skip to content
All library documents

Gemini Spot Connector and Emulated Market Orders

Article Hummingbot docs

Summary

This document describes Hummingbot’s Gemini spot connector, which connects to a centralized exchange order book through REST and WebSocket interfaces. It lists supported order types and gives basic steps for creating trading API credentials and connecting the client. The connector supports limit, limit-maker, and market order instructions; the key execution detail is that Gemini has no native market order type. Instead, the connector emulates one with an aggressively priced immediate-or-cancel limit order, seeking prompt execution while allowing unfilled quantity to be canceled.

This is integration documentation rather than a tested trading strategy or performance analysis. It provides no measurements of slippage, fill rates, fees, or market impact, so it cannot establish how closely the emulated order behaves like a true market order under different liquidity conditions. It also states that the connector covers spot trading and that a perpetual connector is unavailable. The practical lesson is to account for venue-specific order implementation when designing execution logic.

Key ideas

  • The connector supports limit, limit-maker, and market order instructions for Gemini spot markets.
  • Gemini market orders are emulated using aggressively priced immediate-or-cancel limit orders.
  • The document identifies REST and WebSocket connectivity but offers no execution-quality measurements.
  • The described integration does not include a perpetual-market connector.

Tags

Full text
# Gemini


# Gemini

## 🛠 Connector Info

- **Exchange Type**: Centralized Exchange (**CEX**)
- **Market Type**: Central Limit Order Book (**CLOB**)

| Component                            | Status | V2 Strategies | Notes |
|--------------------------------------|--------|---------------|-------|
| [🔀 Spot Connector](#spot-connector) | ✅      | Yes           |
| 🔀 Perp Connector                    | Not available |

## ℹ️ Exchange Info

- **Website**: <https://www.gemini.com>
- **CoinMarketCap**: <https://coinmarketcap.com/exchanges/gemini/>
- **CoinGecko**: <https://www.coingecko.com/en/exchanges/gemini>
- **API Docs**: <https://docs.gemini.com/>
- **Fees**: <https://www.gemini.com/fees>

## 🔑 How to Connect

### Generate API Keys

1. Log in to your account at <https://exchange.gemini.com>.
2. Go to **Settings** → **API** (<https://exchange.gemini.com/settings/api>).
3. Click **Create a new API Key** and select the **Primary** scope.
4. Enable the **Trading** permission for the key.
5. Copy the **API Key** and **API Secret** — the secret is only shown once, so save it securely.

### Connecting to Hummingbot

From inside the Hummingbot client, run `connect gemini`:

```
>>> connect gemini

Enter your Gemini API key >>>
Enter your Gemini API secret >>>
```

If connection is successful:

```
You are now connected to gemini
```

## 🔀 Spot Connector
*Integration to spot markets API endpoints*

- **ID**: `gemini`
- **Connection Type**: REST v1 + WebSocket (Gemini Fast API)
- **[Github Folder](https://github.com/hummingbot/hummingbot/tree/master/hummingbot/connector/exchange/gemini)**

### Order Types

This connector supports the following `OrderType` constants:

- `LIMIT`
- `LIMIT_MAKER`
- `MARKET`

!!! note
    Gemini has no native market order type, so `MARKET` orders are emulated as immediate-or-cancel limit orders priced aggressively through the book.

Shown in full with attribution under the source's licence. Licence: Apache-2.0

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.