Type/to search
Built-in Functions
Structures
Built-in Variables and Constants
Conventions
Exchanges
Capability Matrix
Centralized Exchanges
AscendEx
Backpack
BigONE
Binance
Bitfinex
bitFlyer
Bitget
Bithumb
Bitstamp
Bybit
Coincheck
Coinone
CoinW
Crypto.com
DeepCoin
Deribit
DigiFinex
Gate
Gemini
HashKey
HitBTC
HTX
Korbit
Kraken
KuCoin
LBank
MEXC
OKX
Poloniex
Upbit
WEEX
WOO X
Zaif
Decentralized Exchanges (DEX)
Prediction Markets
Securities and Futures
On-chain & Custom

Spot trading on Gemini (API address https://api.gemini.com). It uses REST only, with no market-data or order push. Private endpoints are signed with a Gemini API key (Access Key and Secret Key). With a master API key (starting with master-), exchange.IO("subAccount", name) selects the sub-account to operate on. Market orders and conditional orders are not supported.

Names and Configuration

exchange.GetName(): Gemini (Spot).

FieldRequired
Access KeyYes
Secret KeyYes

Trading Pairs and Contract Codes

Pair examples: BTC_USD, ETH_BTC, BTC_USDT

Trading pairs are written BASE_QUOTE, matching the Gemini native code btcusd.

Exchange-specific IO Commands
CommandArgumentsDescriptionReturns
subAccountstringSet the sub-account name. Only takes effect with a master API key (an Access Key starting with master-), whose private requests then carry this sub-account; primary is used when not set.A null value.

For the common commands api, base and currency see exchange.IO.

Common Usage
Operate a sub-account with a master API key
javascript
function main() { // Only for a master key (Access Key starting with master-): later private requests // carry this sub-account exchange.IO("subAccount", "my-sub-account") Log(exchange.GetAccount()) // Back to the default, primary exchange.IO("subAccount", "primary") }

Function Support

Not supported (the call fails with an error and returns null): exchange.GetTickers, exchange.ModifyOrder, exchange.CreateConditionOrder, exchange.ModifyConditionOrder, exchange.CancelConditionOrder, exchange.GetConditionOrder, exchange.GetConditionOrders, exchange.GetHistoryConditionOrders.

Served through a fallback:

  • exchange.GetRecords: Native periods are 1m, 5m, 15m, 30m, 1h, 6h, 1d; other periods are synthesized by the docker.

Notes
  • Market orders are not supported, only limit orders; IOC, FOK and maker-only (postOnly) are supported.
  • exchange.GetHistoryOrders() does not support the since argument and fails when it is given; at most 500 orders are returned per call.
  • The K-line endpoint has no paging, so each period only gives the most recent batch the exchange returns (about the last day for 1-minute K-lines).
  • exchange.GetMarkets() returns only the spot pairs whose status is open, not Gemini's perpetual contracts; precision and similar details are queried from the exchange one pair at a time, so the call takes a while.
  • In exchange.GetTrades(), trades from auction matching have no taker side, so their Type is 2.