Packages

Elixir client library for cryptocurrency exchanges — generated from CCXT specs via compile-time macros.

Current section

Files

Jump to
ccxt_client priv specs extracted gemini.exs
Raw

priv/specs/extracted/gemini.exs

# Gemini Exchange Specification
#
# Auto-generated by: mix ccxt.extract gemini
# CCXT version: 4.5.34
# Spec format version: 1
#
# Review before use:
# - signing: Detected from sign() method, verify with testnet
# - endpoints: Raw paths extracted, map to unified API as needed
# - exceptions: Extracted (exact, broad, HTTP status codes)
# - features/options: Extracted from describe()
# - classification: Set to :supported initially, promote after validation
#
%{
api_param_requirements: nil,
certified: false,
classification: :pro,
comment: nil,
countries: [
"US"
],
currencies: %{},
currency_aliases: %{
"BCHSV" => "BSV",
"XBT" => "BTC"
},
dex: false,
enable_rate_limit: true,
endpoint_extraction_stats: %{
"capturedMethods" => 21,
"coveragePercent" => 100,
"enabledMethods" => 23,
"excluded" => [
%{
"method" => "editOrder",
"reason" => "emulated (returns cached data, no HTTP call)"
},
%{
"method" => "fetchTransactions",
"reason" => "emulated (returns cached data, no HTTP call)"
}
],
"excludedMethods" => 2,
"extractableMethods" => 21,
"failures" => []
},
endpoints: [
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :cancel_order,
param_mappings: %{
"id" => "order_id"
},
params: [
:id,
:symbol
],
path: "/v1/order/cancel",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :create_deposit_address,
param_mappings: %{
"code" => "currency"
},
params: [
:code
],
path: "/v1/deposit/{currency}/newAddress",
response_transformer: {:extract_path, ["address"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"client_order_id" => "1771930433161",
"type" => "exchange limit"
},
market_type: :spot,
method: :post,
name: :create_limit_order,
param_mappings: %{},
params: [
:symbol,
:side,
:amount,
:price
],
path: "/v1/order/new",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"client_order_id" => "1771930433161",
"type" => "exchange limit"
},
market_type: :spot,
method: :post,
name: :create_order,
param_mappings: %{},
params: [
:symbol,
:type,
:side,
:amount,
:price
],
path: "/v1/order/new",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :fetch_balance,
param_mappings: %{},
params: [],
path: "/v1/balances",
source: :intercepted
},
%{
api_section: "webExchange",
auth: false,
base_url: "https://exchange.gemini.com",
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_currencies,
param_mappings: %{},
params: [],
path: "/",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"network" => "bitcoin"
},
market_type: :spot,
method: :post,
name: :fetch_deposit_address,
param_mappings: %{},
params: [
:code
],
path: "/v1/addresses/{network}",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"network" => "bitcoin"
},
market_type: :spot,
method: :post,
name: :fetch_deposit_addresses_by_network,
param_mappings: %{},
params: [
:code
],
path: "/v1/addresses/{network}",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :fetch_deposits_withdrawals,
param_mappings: %{},
params: [
:code,
:since,
:limit
],
path: "/v1/transfers",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 5,
market_type: :spot,
method: :get,
name: :fetch_l2_order_book,
param_mappings: %{},
params: [
:symbol,
:limit
],
path: "/v1/book/{symbol}",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 5,
market_type: :spot,
method: :get,
name: :fetch_markets,
param_mappings: %{},
params: [],
path: "/v1/symbols",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :fetch_my_trades,
param_mappings: %{},
params: [
:symbol,
:since,
:limit
],
path: "/v1/mytrades",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 5,
default_params: %{
"timeframe" => "1hr"
},
market_type: :spot,
method: :get,
name: :fetch_ohlcv,
param_mappings: %{},
params: [
:symbol,
:timeframe,
:since,
:limit
],
path: "/v2/candles/{symbol}/{timeframe}",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :fetch_open_orders,
param_mappings: %{},
params: [
:symbol,
:since,
:limit
],
path: "/v1/orders",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :fetch_order,
param_mappings: %{
"id" => "order_id"
},
params: [
:id,
:symbol
],
path: "/v1/order/status",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 5,
market_type: :spot,
method: :get,
name: :fetch_order_book,
param_mappings: %{},
params: [
:symbol,
:limit
],
path: "/v1/book/{symbol}",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 5,
market_type: :spot,
method: :get,
name: :fetch_ticker,
param_mappings: %{},
params: [
:symbol
],
path: "/v1/pubticker/{symbol}",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 5,
market_type: :spot,
method: :get,
name: :fetch_tickers,
param_mappings: %{},
params: [
:symbols
],
path: "/v1/pricefeed",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 5,
market_type: :spot,
method: :get,
name: :fetch_trades,
param_mappings: %{
"limit" => "limit_trades",
"since" => "timestamp"
},
params: [
:symbol,
:since,
:limit
],
path: "/v1/trades/{symbol}",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :fetch_trading_fees,
param_mappings: %{},
params: [],
path: "/v1/notionalvolume",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :withdraw,
param_mappings: %{
"code" => "currency"
},
params: [
:code,
:amount,
:address,
:tag
],
path: "/v1/withdraw/{currency}",
response_transformer: {:extract_path, ["result"]},
source: :intercepted
}
],
error_code_details: %{
"AuctionNotOpen" => %{
description: "Failed to place an auction-only order because there is no current auction open for this symbol",
type: :invalid_parameters
},
"ClientOrderIdMustBeString" => %{
description: "The Client Order ID must be a string",
type: :invalid_parameters
},
"ClientOrderIdTooLong" => %{
description: "The Client Order ID must be under 100 characters",
type: :invalid_parameters
},
"ConflictingOptions" => %{
description: "New orders using a combination of order execution options are not supported",
type: :invalid_parameters
},
"EndpointMismatch" => %{
description: "The request was submitted to an endpoint different than the one in the payload",
type: :invalid_parameters
},
"EndpointNotFound" => %{
description: "No endpoint was specified",
type: :invalid_parameters
},
"IneligibleTiming" => %{
description: "Failed to place an auction order for the current auction on this symbol because the timing is not eligible, new orders may only be placed before the auction begins.",
type: :invalid_parameters
},
"InsufficientFunds" => %{
description: "The order was rejected because of insufficient funds",
type: :insufficient_balance
},
"Internal Server Error" => %{
description: nil,
type: :network_error
},
"InvalidApiKey" => %{
description: "Invalid API key",
type: :invalid_credentials
},
"InvalidJson" => %{
description: "The JSON provided is invalid",
type: :invalid_parameters
},
"InvalidNonce" => %{
description: "The nonce was not greater than the previously used nonce, or was not present",
type: :invalid_credentials
},
"InvalidOrderType" => %{
description: "An unknown order type was provided",
type: :invalid_order
},
"InvalidPrice" => %{
description: "For new orders, the price was invalid",
type: :invalid_order
},
"InvalidQuantity" => %{
description: "A negative or otherwise invalid quantity was specified",
type: :invalid_order
},
"InvalidSide" => %{
description: "For new orders, and invalid side was specified",
type: :invalid_order
},
"InvalidSignature" => %{
description: "The signature did not match the expected signature",
type: :invalid_credentials
},
"InvalidSymbol" => %{
description: "An invalid symbol was specified",
type: :invalid_parameters
},
"InvalidTimestampInPayload" => %{
description: "The JSON payload contained a timestamp parameter with an unsupported value.",
type: :invalid_parameters
},
"Maintenance" => %{
description: "The system is down for maintenance",
type: :network_error
},
"MarketNotOpen" => %{
description: "The order was rejected because the market is not accepting new orders",
type: :invalid_order
},
"MissingApikeyHeader" => %{
description: "The X-GEMINI-APIKEY header was missing",
type: :invalid_credentials
},
"MissingOrderField" => %{
description: "A required order_id field was not specified",
type: :invalid_order
},
"MissingPayloadHeader" => %{
description: "The X-GEMINI-PAYLOAD header was missing",
type: :invalid_credentials
},
"MissingRole" => %{
description: "The API key used to access this endpoint does not have the required role assigned to it",
type: :invalid_credentials
},
"MissingSignatureHeader" => %{
description: "The X-GEMINI-SIGNATURE header was missing",
type: :invalid_credentials
},
"NoSSL" => %{
description: "You must use HTTPS to access the API",
type: :invalid_credentials
},
"OptionsMustBeArray" => %{
description: "The options parameter must be an array.",
type: :invalid_parameters
},
"OrderNotFound" => %{
description: "The order specified was not found",
type: :order_not_found
},
"RateLimit" => %{
description: "Requests were made too frequently. See Rate Limits below.",
type: :rate_limited
},
"System" => %{
description: "We are experiencing technical issues",
type: :exchange_error
},
"The Gemini Exchange is currently undergoing maintenance." => %{
description: "The Gemini Exchange is currently undergoing maintenance. Please check https://status.gemini.com/ for more information.",
type: :network_error
},
"UnsupportedOption" => %{
description: "This order execution option is not supported.",
type: :invalid_parameters
},
"We are investigating technical issues with the Gemini Exchange." => %{
description: "We are investigating technical issues with the Gemini Exchange. Please check https://status.gemini.com/ for more information.",
type: :network_error
}
},
error_codes: %{
"AuctionNotOpen" => :invalid_parameters,
"ClientOrderIdMustBeString" => :invalid_parameters,
"ClientOrderIdTooLong" => :invalid_parameters,
"ConflictingOptions" => :invalid_parameters,
"EndpointMismatch" => :invalid_parameters,
"EndpointNotFound" => :invalid_parameters,
"IneligibleTiming" => :invalid_parameters,
"InsufficientFunds" => :insufficient_balance,
"Internal Server Error" => :network_error,
"InvalidApiKey" => :invalid_credentials,
"InvalidJson" => :invalid_parameters,
"InvalidNonce" => :invalid_credentials,
"InvalidOrderType" => :invalid_order,
"InvalidPrice" => :invalid_order,
"InvalidQuantity" => :invalid_order,
"InvalidSide" => :invalid_order,
"InvalidSignature" => :invalid_credentials,
"InvalidSymbol" => :invalid_parameters,
"InvalidTimestampInPayload" => :invalid_parameters,
"Maintenance" => :network_error,
"MarketNotOpen" => :invalid_order,
"MissingApikeyHeader" => :invalid_credentials,
"MissingOrderField" => :invalid_order,
"MissingPayloadHeader" => :invalid_credentials,
"MissingRole" => :invalid_credentials,
"MissingSignatureHeader" => :invalid_credentials,
"NoSSL" => :invalid_credentials,
"OptionsMustBeArray" => :invalid_parameters,
"OrderNotFound" => :order_not_found,
"RateLimit" => :rate_limited,
"System" => :exchange_error,
"The Gemini Exchange is currently undergoing maintenance." => :network_error,
"UnsupportedOption" => :invalid_parameters,
"We are investigating technical issues with the Gemini Exchange." => :network_error
},
exceptions: %{
broad: %{
"Internal Server Error" => :exchange_not_available,
"The Gemini Exchange is currently undergoing maintenance." => :on_maintenance,
"We are investigating technical issues with the Gemini Exchange." => :exchange_not_available
},
exact: %{
"AuctionNotOpen" => :bad_request,
"ClientOrderIdMustBeString" => :bad_request,
"ClientOrderIdTooLong" => :bad_request,
"ConflictingOptions" => :bad_request,
"EndpointMismatch" => :bad_request,
"EndpointNotFound" => :bad_request,
"IneligibleTiming" => :bad_request,
"InsufficientFunds" => :insufficient_funds,
"InvalidApiKey" => :authentication_error,
"InvalidJson" => :bad_request,
"InvalidNonce" => :invalid_nonce,
"InvalidOrderType" => :invalid_order,
"InvalidPrice" => :invalid_order,
"InvalidQuantity" => :invalid_order,
"InvalidSide" => :invalid_order,
"InvalidSignature" => :authentication_error,
"InvalidSymbol" => :bad_request,
"InvalidTimestampInPayload" => :bad_request,
"Maintenance" => :on_maintenance,
"MarketNotOpen" => :invalid_order,
"MissingApikeyHeader" => :authentication_error,
"MissingOrderField" => :invalid_order,
"MissingPayloadHeader" => :authentication_error,
"MissingRole" => :authentication_error,
"MissingSignatureHeader" => :authentication_error,
"NoSSL" => :authentication_error,
"OptionsMustBeArray" => :bad_request,
"OrderNotFound" => :order_not_found,
"RateLimit" => :rate_limit_exceeded,
"System" => :exchange_error,
"UnsupportedOption" => :bad_request
}
},
exchange_options: %{
"brokenPairs" => [
"efilusd",
"maticrlusd",
"maticusdc",
"eurusdc",
"maticgusd",
"maticusd",
"efilfil",
"eurusd"
],
"conflictingMarkets" => %{
"paxgusd" => %{
"base" => "PAXG",
"quote" => "USD"
}
},
"defaultNetworkCodeReplacements" => %{
"BRC20" => %{
"BRC20" => "BTC"
},
"CRO" => %{
"CRC20" => "CRONOS"
},
"ETH" => %{
"ERC20" => "ETH"
},
"TRX" => %{
"TRC20" => "TRX"
}
},
"fetchCurrencies" => %{
"webApiEnable" => true,
"webApiMuteFailure" => true,
"webApiRetries" => 5
},
"fetchMarketFromWebRetries" => 10,
"fetchMarkets" => %{
"webApiEnable" => true,
"webApiRetries" => 10
},
"fetchMarketsFromAPI" => %{
"fetchDetailsForAllSymbols" => false,
"quoteCurrencies" => [
"USDT",
"GUSD",
"USD",
"DAI",
"EUR",
"GBP",
"SGD",
"BTC",
"ETH",
"LTC",
"BCH",
"SOL",
"USDC"
]
},
"fetchMarketsMethod" => "fetch_markets_from_api",
"fetchTickerMethod" => "fetchTickerV1",
"fetchUsdtMarkets" => [
"btcusdt",
"ethusdt"
],
"networks" => %{
"ATOM" => "cosmos",
"AVAXX" => "avalanche",
"BCH" => "bitcoincash",
"BTC" => "bitcoin",
"DOGE" => "dogecoin",
"DOT" => "polkadot",
"ERC20" => "ethereum",
"FIL" => "filecoin",
"LTC" => "litecoin",
"SOL" => "solana",
"XTZ" => "tezos",
"ZEC" => "zcash"
},
"networksById" => %{
"avalanche" => "AVAXX",
"bitcoin" => "BTC",
"bitcoincash" => "BCH",
"cosmos" => "ATOM",
"dogecoin" => "DOGE",
"ethereum" => "ERC20",
"filecoin" => "FIL",
"litecoin" => "LTC",
"polkadot" => "DOT",
"solana" => "SOL",
"tezos" => "XTZ",
"zcash" => "ZEC"
},
"nonce" => "milliseconds"
},
extended_metadata: %{
limits: %{
"amount" => %{},
"cost" => %{},
"leverage" => %{},
"price" => %{}
},
logo_url: "https://user-images.githubusercontent.com/1294454/27816857-ce7be644-6096-11e7-82d6-3c257263229c.jpg"
},
extracted_metadata: %{
ccxt_version: "4.5.34"
},
features: %{
default: %{
create_order: %{
hedged: false,
iceberg: false,
leverage: false,
margin_mode: false,
market_buy_by_cost: true,
market_buy_requires_price: false,
self_trade_prevention: false,
stop_loss_price: false,
take_profit_price: false,
time_in_force: %{
fok: true,
gtd: false,
ioc: true,
po: true
},
trailing: false,
trigger_direction: false,
trigger_price: true
},
fetch_my_trades: %{
limit: 500,
margin_mode: false,
symbol_required: true
},
fetch_ohlcv: %{},
fetch_open_orders: %{
margin_mode: false,
symbol_required: false,
trailing: false,
trigger: false
},
fetch_order: %{
margin_mode: false,
symbol_required: false,
trailing: false,
trigger: false
},
sandbox: true
},
future: %{},
spot: %{
extends: "default"
},
swap: %{
linear: %{
extends: "default"
}
}
},
fees: %{
trading: %{
maker: 0.002,
taker: 0.004
}
},
handle_content_type_application_zip: nil,
handle_errors_source: "handleErrors(httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody) {\n if (response === undefined) {\n if (typeof body === 'string') {\n const feedback = this.id + ' ' + body;\n this.throwBroadlyMatchedException(this.exceptions['broad'], body, feedback);\n }\n return undefined; // fallback to default error handler\n }\n //\n // {\n // \"result\": \"error\",\n // \"reason\": \"BadNonce\",\n // \"message\": \"Out-of-sequence nonce <1234> precedes previously used nonce <2345>\"\n // }\n //\n const result = this.safeString(response, 'result');\n if (result === 'error') {\n const reasonInner = this.safeString(response, 'reason');\n const message = this.safeString(response, 'message');\n const feedback = this.id + ' ' + message;\n this.throwExactlyMatchedException(this.exceptions['exact'], reasonInner, feedback);\n this.throwExactlyMatchedException(this.exceptions['exact'], message, feedback);\n this.throwBroadlyMatchedException(this.exceptions['broad'], message, feedback);\n throw new errors.ExchangeError(feedback); // unknown message\n }\n return undefined;\n }",
has: %{
add_margin: false,
borrow_cross_margin: false,
borrow_isolated_margin: false,
borrow_margin: false,
c_o_r_s: false,
cancel_all_orders: false,
cancel_all_orders_ws: false,
cancel_order: true,
cancel_order_with_client_order_id: false,
cancel_order_ws: false,
cancel_orders: false,
cancel_orders_with_client_order_id: false,
cancel_orders_ws: false,
close_all_positions: false,
close_position: false,
create_deposit_address: true,
create_limit_buy_order: false,
create_limit_buy_order_ws: false,
create_limit_order: true,
create_limit_order_ws: false,
create_limit_sell_order: false,
create_limit_sell_order_ws: false,
create_market_buy_order: false,
create_market_buy_order_with_cost: false,
create_market_buy_order_with_cost_ws: false,
create_market_buy_order_ws: false,
create_market_order: false,
create_market_order_with_cost: false,
create_market_order_with_cost_ws: false,
create_market_order_ws: true,
create_market_sell_order: false,
create_market_sell_order_with_cost: false,
create_market_sell_order_with_cost_ws: false,
create_market_sell_order_ws: false,
create_order: true,
create_order_with_take_profit_and_stop_loss: false,
create_order_with_take_profit_and_stop_loss_ws: false,
create_order_ws: false,
create_orders: false,
create_post_only_order: false,
create_post_only_order_ws: false,
create_reduce_only_order: false,
create_reduce_only_order_ws: false,
create_stop_limit_order: false,
create_stop_limit_order_ws: false,
create_stop_loss_order: false,
create_stop_loss_order_ws: false,
create_stop_market_order: false,
create_stop_market_order_ws: false,
create_stop_order: false,
create_stop_order_ws: false,
create_take_profit_order: false,
create_take_profit_order_ws: false,
create_trailing_amount_order: false,
create_trailing_amount_order_ws: false,
create_trailing_percent_order: false,
create_trailing_percent_order_ws: false,
create_trigger_order: false,
create_trigger_order_ws: false,
deposit: false,
edit_order: true,
edit_order_with_client_order_id: false,
edit_order_ws: false,
edit_orders: false,
fetch_accounts: false,
fetch_balance: true,
fetch_balance_ws: false,
fetch_bids_asks: false,
fetch_borrow_interest: false,
fetch_borrow_rate: false,
fetch_borrow_rate_histories: false,
fetch_borrow_rate_history: false,
fetch_borrow_rates: false,
fetch_borrow_rates_per_symbol: false,
fetch_canceled_and_closed_orders: false,
fetch_canceled_orders: false,
fetch_closed_order: false,
fetch_closed_orders: false,
fetch_closed_orders_ws: false,
fetch_convert_currencies: false,
fetch_convert_quote: false,
fetch_convert_trade: false,
fetch_convert_trade_history: false,
fetch_cross_borrow_rate: false,
fetch_cross_borrow_rates: false,
fetch_currencies: true,
fetch_currencies_ws: true,
fetch_deposit: false,
fetch_deposit_address: true,
fetch_deposit_addresses: false,
fetch_deposit_addresses_by_network: true,
fetch_deposit_withdraw_fee: false,
fetch_deposit_withdraw_fees: false,
fetch_deposits: false,
fetch_deposits_withdrawals: true,
fetch_deposits_ws: false,
fetch_funding_history: false,
fetch_funding_interval: false,
fetch_funding_intervals: false,
fetch_funding_rate: false,
fetch_funding_rate_history: false,
fetch_funding_rates: false,
fetch_greeks: false,
fetch_index_ohlcv: false,
fetch_isolated_borrow_rate: false,
fetch_isolated_borrow_rates: false,
fetch_isolated_positions: false,
fetch_l2_order_book: true,
fetch_l3_order_book: false,
fetch_last_prices: false,
fetch_ledger: false,
fetch_ledger_entry: false,
fetch_leverage: false,
fetch_leverage_tiers: false,
fetch_leverages: false,
fetch_liquidations: false,
fetch_long_short_ratio: false,
fetch_long_short_ratio_history: false,
fetch_margin_adjustment_history: false,
fetch_margin_mode: false,
fetch_margin_modes: false,
fetch_mark_ohlcv: false,
fetch_mark_prices: false,
fetch_market_leverage_tiers: false,
fetch_markets: true,
fetch_markets_ws: false,
fetch_my_liquidations: false,
fetch_my_settlement_history: false,
fetch_my_trades: true,
fetch_my_trades_ws: false,
fetch_ohlcv: true,
fetch_ohlcv_ws: false,
fetch_open_interest: false,
fetch_open_interest_history: false,
fetch_open_interests: false,
fetch_open_order: false,
fetch_open_orders: true,
fetch_open_orders_ws: false,
fetch_option: false,
fetch_option_chain: false,
fetch_order: true,
fetch_order_book: true,
fetch_order_book_ws: false,
fetch_order_books: false,
fetch_order_trades: false,
fetch_order_with_client_order_id: false,
fetch_order_ws: false,
fetch_orders: false,
fetch_orders_by_status: false,
fetch_orders_ws: false,
fetch_position: false,
fetch_position_history: false,
fetch_position_mode: false,
fetch_position_ws: false,
fetch_positions: false,
fetch_positions_for_symbol: false,
fetch_positions_for_symbol_ws: false,
fetch_positions_history: false,
fetch_positions_risk: false,
fetch_positions_ws: false,
fetch_premium_index_ohlcv: false,
fetch_settlement_history: false,
fetch_status: false,
fetch_ticker: true,
fetch_ticker_ws: false,
fetch_tickers: true,
fetch_tickers_ws: false,
fetch_time: false,
fetch_trades: true,
fetch_trades_ws: false,
fetch_trading_fee: false,
fetch_trading_fees: true,
fetch_trading_fees_ws: false,
fetch_trading_limits: false,
fetch_transaction_fee: false,
fetch_transaction_fees: false,
fetch_transactions: true,
fetch_transfer: false,
fetch_transfers: false,
fetch_underlying_assets: false,
fetch_volatility_history: false,
fetch_withdraw_addresses: false,
fetch_withdrawal: false,
fetch_withdrawal_whitelist: false,
fetch_withdrawals: false,
fetch_withdrawals_ws: false,
future: false,
margin: false,
option: false,
post_only: true,
private_api: true,
public_api: true,
reduce_margin: false,
repay_cross_margin: false,
repay_isolated_margin: false,
sandbox: true,
set_leverage: false,
set_margin: false,
set_margin_mode: false,
set_position_mode: false,
sign_in: false,
spot: true,
swap: true,
transfer: false,
un_watch_my_trades: false,
un_watch_ohlcv: false,
un_watch_ohlcv_for_symbols: false,
un_watch_order_book: false,
un_watch_order_book_for_symbols: false,
un_watch_orders: false,
un_watch_positions: false,
un_watch_ticker: false,
un_watch_tickers: false,
un_watch_trades: false,
un_watch_trades_for_symbols: false,
watch_balance: false,
watch_bids_asks: true,
watch_liquidations: false,
watch_liquidations_for_symbols: false,
watch_my_liquidations: false,
watch_my_liquidations_for_symbols: false,
watch_my_trades: false,
watch_ohlcv: true,
watch_ohlcv_for_symbols: false,
watch_order_book: true,
watch_order_book_for_symbols: true,
watch_orders: true,
watch_orders_for_symbols: false,
watch_position: false,
watch_positions: false,
watch_status: false,
watch_ticker: false,
watch_tickers: false,
watch_trades: true,
watch_trades_for_symbols: true,
withdraw: true,
ws: false
},
http_config: nil,
id: "gemini",
markets: nil,
name: "Gemini",
ohlcv_timestamp_resolution: :unknown,
options: %{
"broken_pairs" => [
"efilusd",
"maticrlusd",
"maticusdc",
"eurusdc",
"maticgusd",
"maticusd",
"efilfil",
"eurusd"
],
"conflicting_markets" => %{
"paxgusd" => %{
"base" => "PAXG",
"quote" => "USD"
}
},
:fetch_currencies => %{
"webApiEnable" => true,
"webApiMuteFailure" => true,
"webApiRetries" => 5
},
"fetch_market_from_web_retries" => 10,
:fetch_markets => %{
"webApiEnable" => true,
"webApiRetries" => 10
},
"fetch_markets_from_a_p_i" => %{
"fetchDetailsForAllSymbols" => false,
"quoteCurrencies" => [
"USDT",
"GUSD",
"USD",
"DAI",
"EUR",
"GBP",
"SGD",
"BTC",
"ETH",
"LTC",
"BCH",
"SOL",
"USDC"
]
},
"fetch_markets_method" => "fetch_markets_from_api",
"fetch_ticker_method" => "fetchTickerV1",
"fetch_usdt_markets" => [
"btcusdt",
"ethusdt"
],
:networks => %{
"ATOM" => "cosmos",
"AVAXX" => "avalanche",
"BCH" => "bitcoincash",
"BTC" => "bitcoin",
"DOGE" => "dogecoin",
"DOT" => "polkadot",
"ERC20" => "ethereum",
"FIL" => "filecoin",
"LTC" => "litecoin",
"SOL" => "solana",
"XTZ" => "tezos",
"ZEC" => "zcash"
},
"nonce" => "milliseconds"
},
order_mappings: %{
side_format: :lowercase,
side_key: "side",
type_format: nil,
type_key: "type"
},
param_mappings: %{
"code" => "currency",
"id" => "order_id",
"limit" => "limit_trades",
"since" => "timestamp"
},
parse_methods: [
%{
"comment" => nil,
"examples" => [],
"line_end" => 1199,
"line_start" => 1187,
"mappings" => [],
"name" => "parseBalance",
"signature" => "parseBalance (response): Balances",
"source" => "parseBalance (response): Balances {\n const result: Dict = { 'info': response };\n for (let i = 0; i < response.length; i++) {\n const balance = response[i];\n const currencyId = this.safeString (balance, 'currency');\n const code = this.safeCurrencyCode (currencyId);\n const account = this.account ();\n account['free'] = this.safeString (balance, 'available');\n account['total'] = this.safeString (balance, 'amount');\n result[code] = account;\n }\n return this.safeBalance (result);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"address\": \"0xed6494Fe7c1E56d1bd6136e89268C51E32d9708B\",\n \"timestamp\": \"1636813923098\",\n \"addressVersion\": \"eV1\" }"
],
"line_end" => 1865,
"line_start" => 1848,
"mappings" => [
%{
"comment" => nil,
"key" => "currency",
"value" => "code"
},
%{
"comment" => nil,
"key" => "network",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "address",
"value" => "address"
},
%{
"comment" => nil,
"key" => "tag",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "info",
"value" => "depositAddress"
}
],
"name" => "parseDepositAddress",
"signature" => "parseDepositAddress (depositAddress, currency: Currency = undefined)",
"source" => "parseDepositAddress (depositAddress, currency: Currency = undefined) {\n //\n // {\n // \"address\": \"0xed6494Fe7c1E56d1bd6136e89268C51E32d9708B\",\n // \"timestamp\": \"1636813923098\",\n // \"addressVersion\": \"eV1\" }\n // }\n //\n const address = this.safeString (depositAddress, 'address');\n const code = this.safeCurrencyCode (undefined, currency);\n return {\n 'currency': code,\n 'network': undefined,\n 'address': address,\n 'tag': undefined,\n 'info': depositAddress,\n };\n }"
},
%{
"comment" => nil,
"examples" => [
"[\n 'BTCUSD', // symbol\n 2, // tick precision (priceTickDecimalPlaces)\n 8, // amount precision (quantityTickDecimalPlaces)\n '0.00001', // quantityMinimum\n 10, // quantityRoundDecimalPlaces\n true // minimumsAreInclusive\n ],",
"{\n \"symbol\": \"BTCUSD\", // perpetuals have 'PERP' suffix, i.e. DOGEUSDPERP\n \"base_currency\": \"BTC\",\n \"quote_currency\": \"USD\",\n \"tick_size\": 1E-8,\n \"quote_increment\": 0.01,\n \"min_order_size\": \"0.00001\",\n \"status\": \"open\",\n \"wrap_enabled\": false\n \"product_type\": \"swap\", // only in perps\n \"contract_type\": \"linear\", // only in perps\n \"contract_price_currency\": \"GUSD\"\n }"
],
"line_end" => 850,
"line_start" => 695,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "marketId"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "symbol"
},
%{
"comment" => nil,
"key" => "base",
"value" => "base"
},
%{
"comment" => nil,
"key" => "quote",
"value" => "quote"
},
%{
"comment" => nil,
"key" => "settle",
"value" => "settle"
},
%{
"comment" => nil,
"key" => "baseId",
"value" => "baseId"
},
%{
"comment" => nil,
"key" => "quoteId",
"value" => "quoteId"
},
%{
"comment" => nil,
"key" => "settleId",
"value" => "settleId"
},
%{
"comment" => nil,
"key" => "type",
"value" => "type"
},
%{
"comment" => nil,
"key" => "spot",
"value" => "!swap"
},
%{
"comment" => nil,
"key" => "margin",
"value" => "false"
},
%{
"comment" => nil,
"key" => "swap",
"value" => "swap"
},
%{
"comment" => nil,
"key" => "future",
"value" => "false"
},
%{
"comment" => nil,
"key" => "option",
"value" => "false"
},
%{
"comment" => nil,
"key" => "active",
"value" => "status"
},
%{
"comment" => nil,
"key" => "contract",
"value" => "swap"
},
%{
"comment" => nil,
"key" => "linear",
"value" => "linear"
},
%{
"comment" => nil,
"key" => "inverse",
"value" => "inverse"
},
%{
"comment" => nil,
"key" => "contractSize",
"value" => "contractSize"
},
%{
"comment" => nil,
"key" => "expiry",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "expiryDatetime",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "strike",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "optionType",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "precision",
"value" => "{\n 'price': tickSize,\n 'amount': amountPrecision,\n }"
},
%{
"comment" => nil,
"key" => "limits",
"value" => "{\n 'leverage': {\n 'min': undefined,\n 'max': undefined,\n },\n 'amount': {\n 'min': minSize,\n 'max': undefined,\n },\n 'price': {\n 'min': undefined,\n 'max': undefined,\n },\n 'cost': {\n 'min': undefined,\n 'max': undefined,\n },\n }"
},
%{
"comment" => nil,
"key" => "created",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "info",
"value" => "response"
}
],
"name" => "parseMarket",
"signature" => "parseMarket (response): Market",
"source" => "parseMarket (response): Market {\n //\n // response might be:\n //\n // btcusd\n //\n // or\n //\n // [\n // 'BTCUSD', // symbol\n // 2, // tick precision (priceTickDecimalPlaces)\n // 8, // amount precision (quantityTickDecimalPlaces)\n // '0.00001', // quantityMinimum\n // 10, // quantityRoundDecimalPlaces\n // true // minimumsAreInclusive\n // ],\n //\n // or\n //\n // {\n // \"symbol\": \"BTCUSD\", // perpetuals have 'PERP' suffix, i.e. DOGEUSDPERP\n // \"base_currency\": \"BTC\",\n // \"quote_currency\": \"USD\",\n // \"tick_size\": 1E-8,\n // \"quote_increment\": 0.01,\n // \"min_order_size\": \"0.00001\",\n // \"status\": \"open\",\n // \"wrap_enabled\": false\n // \"product_type\": \"swap\", // only in perps\n // \"contract_type\": \"linear\", // only in perps\n // \"contract_price_currency\": \"GUSD\"\n // }\n //\n let marketId = undefined;\n let baseId = undefined;\n let quoteId = undefined;\n let settleId = undefined;\n let tickSize = undefined;\n let amountPrecision = undefined;\n let minSize = undefined;\n let status = undefined;\n let swap = false;\n let contractSize = undefined;\n let linear = undefined;\n let inverse = undefined;\n const isString = (typeof response === 'string');\n const isArray = (Array.isArray (response));\n if (!isString && !isArray) {\n marketId = this.safeStringLower (response, 'symbol');\n amountPrecision = this.safeNumber (response, 'tick_size'); // right, exchange has an imperfect naming and this turns out to be an amount-precision\n tickSize = this.safeNumber (response, 'quote_increment'); // this is tick-size actually\n minSize = this.safeNumber (response, 'min_order_size');\n status = this.parseMarketActive (this.safeString (response, 'status'));\n baseId = this.safeString (response, 'base_currency');\n quoteId = this.safeString (response, 'quote_currency');\n settleId = this.safeString (response, 'contract_price_currency');\n } else {\n // if no detailed API was called, then parse either string or array\n if (isString) {\n marketId = response;\n } else {\n marketId = this.safeStringLower (response, 0);\n tickSize = this.parseNumber (this.parsePrecision (this.safeString (response, 1))); // priceTickDecimalPlaces\n amountPrecision = this.parseNumber (this.parsePrecision (this.safeString (response, 2))); // quantityTickDecimalPlaces\n minSize = this.safeNumber (response, 3); // quantityMinimum\n }\n const marketIdUpper = marketId.toUpperCase ();\n const isPerp = (marketIdUpper.indexOf ('PERP') >= 0);\n const marketIdWithoutPerp = marketIdUpper.replace ('PERP', '');\n const conflictingMarkets = this.safeDict (this.options, 'conflictingMarkets', {});\n const lowerCaseId = marketIdWithoutPerp.toLowerCase ();\n if (lowerCaseId in conflictingMarkets) {\n const conflictingMarket = conflictingMarkets[lowerCaseId];\n baseId = conflictingMarket['base'];\n quoteId = conflictingMarket['quote'];\n if (isPerp) {\n settleId = conflictingMarket['quote'];\n }\n } else {\n const quoteCurrencies = this.handleOption ('fetchMarketsFromAPI', 'quoteCurrencies', []);\n for (let i = 0; i < quoteCurrencies.length; i++) {\n const quoteCurrency = quoteCurrencies[i];\n if (marketIdWithoutPerp.endsWith (quoteCurrency)) {\n const quoteLength = this.parseToInt (-1 * quoteCurrency.length);\n baseId = marketIdWithoutPerp.slice (0, quoteLength);\n quoteId = quoteCurrency;\n if (isPerp) {\n settleId = quoteCurrency; // always same\n }\n break;\n }\n }\n }\n }\n const base = this.safeCurrencyCode (baseId);\n const quote = this.safeCurrencyCode (quoteId);\n const settle = this.safeCurrencyCode (settleId);\n let symbol = base + '/' + quote;\n if (settleId !== undefined) {\n symbol = symbol + ':' + settle;\n swap = true;\n contractSize = tickSize; // always same\n linear = true; // always linear\n inverse = false;\n }\n const type = swap ? 'swap' : 'spot';\n return {\n 'id': marketId,\n 'symbol': symbol,\n 'base': base,\n 'quote': quote,\n 'settle': settle,\n 'baseId': baseId,\n 'quoteId': quoteId,\n 'settleId': settleId,\n 'type': type,\n 'spot': !swap,\n 'margin': false,\n 'swap': swap,\n 'future': false,\n 'option': false,\n 'active': status,\n 'contract': swap,\n 'linear': linear,\n 'inverse': inverse,\n 'contractSize': contractSize,\n 'expiry': undefined,\n 'expiryDatetime': undefined,\n 'strike': undefined,\n 'optionType': undefined,\n 'precision': {\n 'price': tickSize,\n 'amount': amountPrecision,\n },\n 'limits': {\n 'leverage': {\n 'min': undefined,\n 'max': undefined,\n },\n 'amount': {\n 'min': minSize,\n 'max': undefined,\n },\n 'price': {\n 'min': undefined,\n 'max': undefined,\n },\n 'cost': {\n 'min': undefined,\n 'max': undefined,\n },\n },\n 'created': undefined,\n 'info': response,\n };\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 607,
"line_start" => 595,
"mappings" => [],
"name" => "parseMarketActive",
"signature" => "parseMarketActive (status)",
"source" => "parseMarketActive (status) {\n const statuses: Dict = {\n 'open': true,\n 'closed': false,\n 'cancel_only': true,\n 'post_only': true,\n 'limit_only': true,\n };\n if (status === undefined) {\n return true; // as defaulted below\n }\n return this.safeBool (statuses, status, true);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"order_id\":\"106027397702\",\n \"id\":\"106027397702\",\n \"symbol\":\"etheur\",\n \"exchange\":\"gemini\",\n \"avg_execution_price\":\"2877.48\",\n \"side\":\"sell\",\n \"type\":\"exchange limit\",\n \"timestamp\":\"1650398122\",\n \"timestampms\":1650398122308,\n \"is_live\":false,\n \"is_cancelled\":false,\n \"is_hidden\":false,\n \"was_forced\":false,\n \"executed_amount\":\"0.014434\",\n \"client_order_id\":\"1650398121695\",\n \"options\":[],\n \"price\":\"2800.00\",\n \"original_amount\":\"0.014434\",\n \"remaining_amount\":\"0\"\n }",
"{\n \"order_id\":\"106028543717\",\n \"id\":\"106028543717\",\n \"symbol\":\"etheur\",\n \"exchange\":\"gemini\",\n \"avg_execution_price\":\"0.00\",\n \"side\":\"buy\",\n \"type\":\"exchange limit\",\n \"timestamp\":\"1650398446\",\n \"timestampms\":1650398446375,\n \"is_live\":true,\n \"is_cancelled\":false,\n \"is_hidden\":false,\n \"was_forced\":false,\n \"executed_amount\":\"0\",\n \"client_order_id\":\"1650398445709\",\n \"options\":[],\n \"price\":\"2000.00\",\n \"original_amount\":\"0.01\",\n \"remaining_amount\":\"0.01\"\n }",
"{\n \"order_id\":\"106028543717\",\n \"id\":\"106028543717\",\n \"symbol\":\"etheur\",\n \"exchange\":\"gemini\",\n \"avg_execution_price\":\"0.00\",\n \"side\":\"buy\",\n \"type\":\"exchange limit\",\n \"timestamp\":\"1650398446\",\n \"timestampms\":1650398446375,\n \"is_live\":false,\n \"is_cancelled\":true,\n \"is_hidden\":false,\n \"was_forced\":false,\n \"executed_amount\":\"0\",\n \"client_order_id\":\"1650398445709\",\n \"reason\":\"Requested\",\n \"options\":[],\n \"price\":\"2000.00\",\n \"original_amount\":\"0.01\",\n \"remaining_amount\":\"0.01\"\n }"
],
"line_end" => 1438,
"line_start" => 1275,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "id"
},
%{
"comment" => nil,
"key" => "clientOrderId",
"value" => "clientOrderId"
},
%{
"comment" => nil,
"key" => "info",
"value" => "order"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "lastTradeTimestamp",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "status",
"value" => "status"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "symbol"
},
%{
"comment" => nil,
"key" => "type",
"value" => "type"
},
%{
"comment" => nil,
"key" => "timeInForce",
"value" => "timeInForce"
},
%{
"comment" => nil,
"key" => "side",
"value" => "side"
},
%{
"comment" => nil,
"key" => "price",
"value" => "price"
},
%{
"comment" => nil,
"key" => "triggerPrice",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "average",
"value" => "average"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "amount"
},
%{
"comment" => nil,
"key" => "filled",
"value" => "filled"
},
%{
"comment" => nil,
"key" => "remaining",
"value" => "remaining"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "fee"
},
%{
"comment" => nil,
"key" => "trades",
"value" => "undefined"
}
],
"name" => "parseOrder",
"signature" => "parseOrder (order: Dict, market: Market = undefined): Order",
"source" => "parseOrder (order: Dict, market: Market = undefined): Order {\n //\n // createOrder (private)\n //\n // {\n // \"order_id\":\"106027397702\",\n // \"id\":\"106027397702\",\n // \"symbol\":\"etheur\",\n // \"exchange\":\"gemini\",\n // \"avg_execution_price\":\"2877.48\",\n // \"side\":\"sell\",\n // \"type\":\"exchange limit\",\n // \"timestamp\":\"1650398122\",\n // \"timestampms\":1650398122308,\n // \"is_live\":false,\n // \"is_cancelled\":false,\n // \"is_hidden\":false,\n // \"was_forced\":false,\n // \"executed_amount\":\"0.014434\",\n // \"client_order_id\":\"1650398121695\",\n // \"options\":[],\n // \"price\":\"2800.00\",\n // \"original_amount\":\"0.014434\",\n // \"remaining_amount\":\"0\"\n // }\n //\n // fetchOrder (private)\n //\n // {\n // \"order_id\":\"106028543717\",\n // \"id\":\"106028543717\",\n // \"symbol\":\"etheur\",\n // \"exchange\":\"gemini\",\n // \"avg_execution_price\":\"0.00\",\n // \"side\":\"buy\",\n // \"type\":\"exchange limit\",\n // \"timestamp\":\"1650398446\",\n // \"timestampms\":1650398446375,\n // \"is_live\":true,\n // \"is_cancelled\":false,\n // \"is_hidden\":false,\n // \"was_forced\":false,\n // \"executed_amount\":\"0\",\n // \"client_order_id\":\"1650398445709\",\n // \"options\":[],\n // \"price\":\"2000.00\",\n // \"original_amount\":\"0.01\",\n // \"remaining_amount\":\"0.01\"\n // }\n //\n // fetchOpenOrders (private)\n //\n // {\n // \"order_id\":\"106028543717\",\n // \"id\":\"106028543717\",\n // \"symbol\":\"etheur\",\n // \"exchange\":\"gemini\",\n // \"avg_execution_price\":\"0.00\",\n // \"side\":\"buy\",\n // \"type\":\"exchange limit\",\n // \"timestamp\":\"1650398446\",\n // \"timestampms\":1650398446375,\n // \"is_live\":true,\n // \"is_cancelled\":false,\n // \"is_hidden\":false,\n // \"was_forced\":false,\n // \"executed_amount\":\"0\",\n // \"client_order_id\":\"1650398445709\",\n // \"options\":[],\n // \"price\":\"2000.00\",\n // \"original_amount\":\"0.01\",\n // \"remaining_amount\":\"0.01\"\n // }\n //\n // cancelOrder (private)\n //\n // {\n // \"order_id\":\"106028543717\",\n // \"id\":\"106028543717\",\n // \"symbol\":\"etheur\",\n // \"exchange\":\"gemini\",\n // \"avg_execution_price\":\"0.00\",\n // \"side\":\"buy\",\n // \"type\":\"exchange limit\",\n // \"timestamp\":\"1650398446\",\n // \"timestampms\":1650398446375,\n // \"is_live\":false,\n // \"is_cancelled\":true,\n // \"is_hidden\":false,\n // \"was_forced\":false,\n // \"executed_amount\":\"0\",\n // \"client_order_id\":\"1650398445709\",\n // \"reason\":\"Requested\",\n // \"options\":[],\n // \"price\":\"2000.00\",\n // \"original_amount\":\"0.01\",\n // \"remaining_amount\":\"0.01\"\n // }\n //\n const timestamp = this.safeInteger (order, 'timestampms');\n const amount = this.safeString (order, 'original_amount');\n const remaining = this.safeString (order, 'remaining_amount');\n const filled = this.safeString (order, 'executed_amount');\n let status = 'closed';\n if (order['is_live']) {\n status = 'open';\n }\n if (order['is_cancelled']) {\n status = 'canceled';\n }\n const price = this.safeString (order, 'price');\n const average = this.safeString (order, 'avg_execution_price');\n let type = this.safeString (order, 'type');\n if (type === 'exchange limit') {\n type = 'limit';\n } else if (type === 'market buy' || type === 'market sell') {\n type = 'market';\n } else {\n type = order['type'];\n }\n const fee = undefined;\n const marketId = this.safeString (order, 'symbol');\n const symbol = this.safeSymbol (marketId, market);\n const id = this.safeString (order, 'order_id');\n const side = this.safeStringLower (order, 'side');\n const clientOrderId = this.safeString (order, 'client_order_id');\n const optionsArray = this.safeValue (order, 'options', []);\n const option = this.safeString (optionsArray, 0);\n let timeInForce = 'GTC';\n let postOnly = false;\n if (option !== undefined) {\n if (option === 'immediate-or-cancel') {\n timeInForce = 'IOC';\n } else if (option === 'fill-or-kill') {\n timeInForce = 'FOK';\n } else if (option === 'maker-or-cancel') {\n timeInForce = 'PO';\n postOnly = true;\n }\n }\n return this.safeOrder ({\n 'id': id,\n 'clientOrderId': clientOrderId,\n 'info': order,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'lastTradeTimestamp': undefined,\n 'status': status,\n 'symbol': symbol,\n 'type': type,\n 'timeInForce': timeInForce, // default set to GTC\n 'postOnly': postOnly,\n 'side': side,\n 'price': price,\n 'triggerPrice': undefined,\n 'average': average,\n 'cost': undefined,\n 'amount': amount,\n 'filled': filled,\n 'remaining': remaining,\n 'fee': fee,\n 'trades': undefined,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"pair\": \"BATUSD\",\n \"price\": \"0.20687\",\n \"percentChange24h\": \"0.0146\"\n }",
"{\n \"bid\":\"9117.95\",\n \"ask\":\"9117.96\",\n \"volume\":{\n \"BTC\":\"1615.46861748\",\n \"USD\":\"14727307.57545006088\",\n \"timestamp\":1594982700000\n },\n \"last\":\"9115.23\"\n }",
"{\n \"symbol\":\"BTCUSD\",\n \"open\":\"9080.58\",\n \"high\":\"9184.53\",\n \"low\":\"9063.56\",\n \"close\":\"9116.08\",\n // Hourly prices descending for past 24 hours\n \"changes\":[\"9117.33\",\"9105.69\",\"9106.23\",\"9120.35\",\"9098.57\",\"9114.53\",\"9113.55\",\"9128.01\",\"9113.63\",\"9133.49\",\"9133.49\",\"9137.75\",\"9126.73\",\"9103.91\",\"9119.33\",\"9123.04\",\"9124.44\",\"9117.57\",\"9114.22\",\"9102.33\",\"9076.67\",\"9074.72\",\"9074.97\",\"9092.05\"],\n \"bid\":\"9115.86\",\n \"ask\":\"9115.87\"\n }"
],
"line_end" => 1050,
"line_start" => 958,
"mappings" => [
%{
"comment" => nil,
"key" => "symbol",
"value" => "symbol"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "high",
"value" => "this.safeString (ticker, 'high')"
},
%{
"comment" => nil,
"key" => "low",
"value" => "this.safeString (ticker, 'low')"
},
%{
"comment" => nil,
"key" => "bid",
"value" => "this.safeString (ticker, 'bid')"
},
%{
"comment" => nil,
"key" => "bidVolume",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "ask",
"value" => "this.safeString (ticker, 'ask')"
},
%{
"comment" => nil,
"key" => "askVolume",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "vwap",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "open",
"value" => "open"
},
%{
"comment" => nil,
"key" => "close",
"value" => "last"
},
%{
"comment" => nil,
"key" => "last",
"value" => "last"
},
%{
"comment" => nil,
"key" => "previousClose",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "percentage",
"value" => "percentage"
},
%{
"comment" => nil,
"key" => "average",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "baseVolume",
"value" => "baseVolume"
},
%{
"comment" => nil,
"key" => "quoteVolume",
"value" => "quoteVolume"
},
%{
"comment" => nil,
"key" => "info",
"value" => "ticker"
}
],
"name" => "parseTicker",
"signature" => "parseTicker (ticker: Dict, market: Market = undefined): Ticker",
"source" => "parseTicker (ticker: Dict, market: Market = undefined): Ticker {\n //\n // fetchTickers\n //\n // {\n // \"pair\": \"BATUSD\",\n // \"price\": \"0.20687\",\n // \"percentChange24h\": \"0.0146\"\n // }\n //\n // fetchTickerV1\n //\n // {\n // \"bid\":\"9117.95\",\n // \"ask\":\"9117.96\",\n // \"volume\":{\n // \"BTC\":\"1615.46861748\",\n // \"USD\":\"14727307.57545006088\",\n // \"timestamp\":1594982700000\n // },\n // \"last\":\"9115.23\"\n // }\n //\n // fetchTickerV2\n //\n // {\n // \"symbol\":\"BTCUSD\",\n // \"open\":\"9080.58\",\n // \"high\":\"9184.53\",\n // \"low\":\"9063.56\",\n // \"close\":\"9116.08\",\n // // Hourly prices descending for past 24 hours\n // \"changes\":[\"9117.33\",\"9105.69\",\"9106.23\",\"9120.35\",\"9098.57\",\"9114.53\",\"9113.55\",\"9128.01\",\"9113.63\",\"9133.49\",\"9133.49\",\"9137.75\",\"9126.73\",\"9103.91\",\"9119.33\",\"9123.04\",\"9124.44\",\"9117.57\",\"9114.22\",\"9102.33\",\"9076.67\",\"9074.72\",\"9074.97\",\"9092.05\"],\n // \"bid\":\"9115.86\",\n // \"ask\":\"9115.87\"\n // }\n //\n const volume = this.safeValue (ticker, 'volume', {});\n const timestamp = this.safeInteger (volume, 'timestamp');\n let symbol = undefined;\n const marketId = this.safeStringLower (ticker, 'pair');\n market = this.safeMarket (marketId, market);\n let baseId = undefined;\n let quoteId = undefined;\n let base = undefined;\n let quote = undefined;\n if ((marketId !== undefined) && (market === undefined)) {\n const idLength = marketId.length - 0;\n if (idLength === 7) {\n baseId = marketId.slice (0, 4);\n quoteId = marketId.slice (4, 7);\n } else {\n baseId = marketId.slice (0, 3);\n quoteId = marketId.slice (3, 6);\n }\n base = this.safeCurrencyCode (baseId);\n quote = this.safeCurrencyCode (quoteId);\n symbol = base + '/' + quote;\n }\n if ((symbol === undefined) && (market !== undefined)) {\n symbol = market['symbol'];\n baseId = this.safeStringUpper (market, 'baseId');\n quoteId = this.safeStringUpper (market, 'quoteId');\n }\n const price = this.safeString (ticker, 'price');\n const last = this.safeString2 (ticker, 'last', 'close', price);\n const percentage = this.safeString (ticker, 'percentChange24h');\n const open = this.safeString (ticker, 'open');\n const baseVolume = this.safeString (volume, baseId);\n const quoteVolume = this.safeString (volume, quoteId);\n return this.safeTicker ({\n 'symbol': symbol,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'high': this.safeString (ticker, 'high'),\n 'low': this.safeString (ticker, 'low'),\n 'bid': this.safeString (ticker, 'bid'),\n 'bidVolume': undefined,\n 'ask': this.safeString (ticker, 'ask'),\n 'askVolume': undefined,\n 'vwap': undefined,\n 'open': open,\n 'close': last,\n 'last': last,\n 'previousClose': undefined, // previous day close\n 'change': undefined,\n 'percentage': percentage,\n 'average': undefined,\n 'baseVolume': baseVolume,\n 'quoteVolume': quoteVolume,\n 'info': ticker,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"timestamp\":1601617445,\n \"timestampms\":1601617445144,\n \"tid\":14122489752,\n \"price\":\"0.46476\",\n \"amount\":\"28.407209\",\n \"exchange\":\"gemini\",\n \"type\":\"buy\"\n }",
"{\n \"price\":\"3900.00\",\n \"amount\":\"0.00996\",\n \"timestamp\":1638891173,\n \"timestampms\":1638891173518,\n \"type\":\"Sell\",\n \"aggressor\":false,\n \"fee_currency\":\"EUR\",\n \"fee_amount\":\"0.00\",\n \"tid\":73621746145,\n \"order_id\":\"73621746059\",\n \"exchange\":\"gemini\",\n \"is_auction_fill\":false,\n \"is_clearing_fill\":false,\n \"symbol\":\"ETHEUR\",\n \"client_order_id\":\"1638891171610\"\n }"
],
"line_end" => 1145,
"line_start" => 1083,
"mappings" => [
%{
"comment" => nil,
"key" => "cost",
"value" => "this.safeString (trade, 'fee_amount')"
},
%{
"comment" => nil,
"key" => "currency",
"value" => "feeCurrencyCode"
},
%{
"comment" => nil,
"key" => "id",
"value" => "id"
},
%{
"comment" => nil,
"key" => "order",
"value" => "orderId"
},
%{
"comment" => nil,
"key" => "info",
"value" => "trade"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "symbol"
},
%{
"comment" => nil,
"key" => "type",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "side",
"value" => "side"
},
%{
"comment" => nil,
"key" => "takerOrMaker",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "price",
"value" => "priceString"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "amountString"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "fee"
}
],
"name" => "parseTrade",
"signature" => "parseTrade (trade: Dict, market: Market = undefined): Trade",
"source" => "parseTrade (trade: Dict, market: Market = undefined): Trade {\n //\n // public fetchTrades\n //\n // {\n // \"timestamp\":1601617445,\n // \"timestampms\":1601617445144,\n // \"tid\":14122489752,\n // \"price\":\"0.46476\",\n // \"amount\":\"28.407209\",\n // \"exchange\":\"gemini\",\n // \"type\":\"buy\"\n // }\n //\n // private fetchTrades\n //\n // {\n // \"price\":\"3900.00\",\n // \"amount\":\"0.00996\",\n // \"timestamp\":1638891173,\n // \"timestampms\":1638891173518,\n // \"type\":\"Sell\",\n // \"aggressor\":false,\n // \"fee_currency\":\"EUR\",\n // \"fee_amount\":\"0.00\",\n // \"tid\":73621746145,\n // \"order_id\":\"73621746059\",\n // \"exchange\":\"gemini\",\n // \"is_auction_fill\":false,\n // \"is_clearing_fill\":false,\n // \"symbol\":\"ETHEUR\",\n // \"client_order_id\":\"1638891171610\"\n // }\n //\n const timestamp = this.safeInteger (trade, 'timestampms');\n const id = this.safeString (trade, 'tid');\n const orderId = this.safeString (trade, 'order_id');\n const feeCurrencyId = this.safeString (trade, 'fee_currency');\n const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId);\n const fee = {\n 'cost': this.safeString (trade, 'fee_amount'),\n 'currency': feeCurrencyCode,\n };\n const priceString = this.safeString (trade, 'price');\n const amountString = this.safeString (trade, 'amount');\n const side = this.safeStringLower (trade, 'type');\n const symbol = this.safeSymbol (undefined, market);\n return this.safeTrade ({\n 'id': id,\n 'order': orderId,\n 'info': trade,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'symbol': symbol,\n 'type': undefined,\n 'side': side,\n 'takerOrMaker': undefined,\n 'price': priceString,\n 'cost': undefined,\n 'amount': amountString,\n 'fee': fee,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"address\":\"mi98Z9brJ3TgaKsmvXatuRahbFRUFKRUdR\",\n \"amount\":\"1\",\n \"withdrawalId\":\"02176a83-a6b1-4202-9b85-1c1c92dd25c4\",\n \"message\":\"You have requested a transfer of 1 BTC to mi98Z9brJ3TgaKsmvXatuRahbFRUFKRUdR. This withdrawal will be sent to the blockchain within the next 60 seconds.\"\n }",
"{\n \"address\":\"0xA63123350Acc8F5ee1b1fBd1A6717135e82dBd28\",\n \"amount\":\"2.34567\",\n \"txHash\":\"0x28267179f92926d85c5516bqc063b2631935573d8915258e95d9572eedcc8cc\"\n }"
],
"line_end" => 1838,
"line_start" => 1782,
"mappings" => [
%{
"comment" => nil,
"key" => "info",
"value" => "transaction"
},
%{
"comment" => nil,
"key" => "id",
"value" => "this.safeString2 (transaction, 'eid', 'withdrawalId')"
},
%{
"comment" => nil,
"key" => "txid",
"value" => "this.safeString (transaction, 'txHash')"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "network",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "address",
"value" => "address"
},
%{
"comment" => nil,
"key" => "addressTo",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "addressFrom",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "tag",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "tagFrom",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "type",
"value" => "type"
},
%{
"comment" => nil,
"key" => "currency",
"value" => "code"
},
%{
"comment" => nil,
"key" => "status",
"value" => "this.parseTransactionStatus (statusRaw)"
},
%{
"comment" => nil,
"key" => "updated",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "internal",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "comment",
"value" => "this.safeString (transaction, 'message')"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "fee"
}
],
"name" => "parseTransaction",
"signature" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction",
"source" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction {\n //\n // withdraw\n //\n // for BTC\n // {\n // \"address\":\"mi98Z9brJ3TgaKsmvXatuRahbFRUFKRUdR\",\n // \"amount\":\"1\",\n // \"withdrawalId\":\"02176a83-a6b1-4202-9b85-1c1c92dd25c4\",\n // \"message\":\"You have requested a transfer of 1 BTC to mi98Z9brJ3TgaKsmvXatuRahbFRUFKRUdR. This withdrawal will be sent to the blockchain within the next 60 seconds.\"\n // }\n //\n // for ETH\n // {\n // \"address\":\"0xA63123350Acc8F5ee1b1fBd1A6717135e82dBd28\",\n // \"amount\":\"2.34567\",\n // \"txHash\":\"0x28267179f92926d85c5516bqc063b2631935573d8915258e95d9572eedcc8cc\"\n // }\n //\n const timestamp = this.safeInteger (transaction, 'timestampms');\n const currencyId = this.safeString (transaction, 'currency');\n const code = this.safeCurrencyCode (currencyId, currency);\n const address = this.safeString (transaction, 'destination');\n const type = this.safeStringLower (transaction, 'type');\n // if status field is available, then it's complete\n const statusRaw = this.safeString (transaction, 'status');\n let fee = undefined;\n const feeAmount = this.safeNumber (transaction, 'feeAmount');\n if (feeAmount !== undefined) {\n fee = {\n 'cost': feeAmount,\n 'currency': code,\n };\n }\n return {\n 'info': transaction,\n 'id': this.safeString2 (transaction, 'eid', 'withdrawalId'),\n 'txid': this.safeString (transaction, 'txHash'),\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'network': undefined,\n 'address': address,\n 'addressTo': undefined,\n 'addressFrom': undefined,\n 'tag': undefined, // or is it defined?\n 'tagTo': undefined,\n 'tagFrom': undefined,\n 'type': type, // direction of the transaction, ('deposit' | 'withdraw')\n 'amount': this.safeNumber (transaction, 'amount'),\n 'currency': code,\n 'status': this.parseTransactionStatus (statusRaw),\n 'updated': undefined,\n 'internal': undefined,\n 'comment': this.safeString (transaction, 'message'),\n 'fee': fee,\n } as Transaction;\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1846,
"line_start" => 1840,
"mappings" => [],
"name" => "parseTransactionStatus",
"signature" => "parseTransactionStatus (status: Str)",
"source" => "parseTransactionStatus (status: Str) {\n const statuses: Dict = {\n 'Advanced': 'ok',\n 'Complete': 'ok',\n };\n return this.safeString (statuses, status, status);\n }"
}
],
path_prefix: "",
pro: true,
quote_json_numbers: nil,
rate_limits: %{
interval_ms: 100,
period: 1000,
requests: 10,
rolling_window_size: 60000
},
raw_endpoints: %{
private: [
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/notionalbalances/{currency}"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/order/status"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/clearing/new"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/earn/interest"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/account/create"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/balances/staking"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/staking/rewards"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/payments/addbank"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/account/transfer/{currency}"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/deposit/{currency}/newAddress"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/clearing/status"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/approvedAddresses/{network}/request"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/payments/methods"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/account/list"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/order/cancel"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/addresses/{network}"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/staking/unstake"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/notionalvolume"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/earn/history"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/balances/earn"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/staking/history"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/tradevolume"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/wrap/{symbol}"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/balances"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/orders"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/approvedAddresses/{network}/remove"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/order/new"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/deposit/{network}/newAddress"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/transfers"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/account"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/roles"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/order/cancel/all"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/payments/sen/withdraw"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/withdraw/{currency}"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/mytrades"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/staking/stake"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/approvedAddresses/account/{network}"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/order/cancel/session"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/clearing/confirm"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/clearing/cancel"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v1/heartbeat"
}
],
public: [
%{
auth: false,
cost: 5,
method: :get,
path: "/v1/auction/{symbol}"
},
%{
auth: false,
cost: 5,
method: :get,
path: "/v1/auction/{symbol}/history"
},
%{
auth: false,
cost: 5,
method: :get,
path: "/v1/book/{symbol}"
},
%{
auth: false,
cost: 5,
method: :get,
path: "/v1/earn/rates"
},
%{
auth: false,
cost: 5,
method: :get,
path: "/v1/pricefeed"
},
%{
auth: false,
cost: 5,
method: :get,
path: "/v1/pubticker/{symbol}"
},
%{
auth: false,
cost: 5,
method: :get,
path: "/v1/staking/rates"
},
%{
auth: false,
cost: 5,
method: :get,
path: "/v1/symbols"
},
%{
auth: false,
cost: 5,
method: :get,
path: "/v1/symbols/details/{symbol}"
},
%{
auth: false,
cost: 5,
method: :get,
path: "/v1/trades/{symbol}"
},
%{
auth: false,
cost: 5,
method: :get,
path: "/v2/candles/{symbol}/{timeframe}"
},
%{
auth: false,
cost: 5,
method: :get,
path: "/v2/ticker/{symbol}"
}
]
},
required_credentials: %{
api_key: true,
password: false,
secret: true,
uid: false
},
requires_eddsa: false,
response_error: nil,
signing: %{
api_key_header: "X-GEMINI-APIKEY",
confidence: :high,
pattern: :hmac_sha384_payload,
signature_header: "X-GEMINI-SIGNATURE"
},
spec_format_version: 1,
status: %{
"eta" => nil,
"status" => "ok",
"updated" => nil,
"url" => nil
},
symbol_format: nil,
symbol_formats: %{
precision_mode: 4,
sample_limits: %{
"amount" => %{
"min" => 0.2
},
"cost" => %{},
"price" => %{}
},
sample_precision: %{
"amount" => 1.0e-6,
"price" => 1.0e-6
},
spot: %{
base: "2Z",
base_id: "2Z",
case: :lower,
contract: false,
id: "2zgusd",
limits: %{
"amount" => %{
"min" => 0.2
},
"cost" => %{},
"leverage" => %{},
"price" => %{}
},
maker: 0.002,
precision: %{
"amount" => 1.0e-6,
"price" => 1.0e-6
},
quote: "GUSD",
quote_id: "GUSD",
separator: "",
symbol: "2Z/GUSD",
taker: 0.004
}
},
symbol_patterns: %{
spot: %{
case: :lower,
component_order: nil,
date_format: nil,
pattern: :no_separator_lower,
separator: "",
suffix: nil
}
},
timeframes: %{
"15m" => "15m",
"1d" => "1day",
"1h" => "1hr",
"1m" => "1m",
"30m" => "30m",
"5m" => "5m",
"6h" => "6hr"
},
url_strategy: %{
detected_from: "api_structure",
note: "paths_already_versioned",
pattern: :version_in_path,
prefix: nil
},
urls: %{
api: "https://api.gemini.com",
api_sections: %{
"private" => "https://api.gemini.com",
"public" => "https://api.gemini.com",
"web" => "https://docs.gemini.com",
"webExchange" => "https://exchange.gemini.com"
},
doc: [
"https://docs.gemini.com/rest-api",
"https://docs.sandbox.gemini.com"
],
other: nil,
sandbox: %{
"private" => "https://api.sandbox.gemini.com",
"public" => "https://api.sandbox.gemini.com",
"web" => "https://docs.gemini.com",
"webExchange" => "https://exchange.gemini.com"
},
www: "https://gemini.com/"
},
version: "v1",
ws: %{
auth: %{
algorithm: :sha384,
encoding: :base64,
market_specific: false,
message_format: :op_args,
op_field: "op",
op_value: "auth",
pattern: :generic_hmac,
payload_format: "custom",
requires_passphrase: false,
timestamp_unit: :milliseconds
},
channel_templates: %{
watch_bids_asks: %{
market_id_format: :native,
params: [],
pattern: :type_topic,
separator: ":"
},
watch_ohlcv: %{
market_id_format: :native,
params: [
%{
"default" => nil,
"name" => "limit"
}
],
pattern: :type_topic,
separator: ":"
},
watch_order_book: %{
market_id_format: :native,
params: [
%{
"default" => nil,
"name" => "limit"
}
],
pattern: :type_topic,
separator: ":"
},
watch_order_book_for_symbols: %{
market_id_format: :native,
params: [
%{
"default" => nil,
"name" => "limit"
}
],
pattern: :type_topic,
separator: ":"
},
watch_orders: %{
auth_required: true,
market_id_format: :native,
params: [
%{
"default" => nil,
"name" => "limit"
}
],
pattern: :type_topic,
separator: ":"
},
watch_trades: %{
market_id_format: :native,
params: [
%{
"default" => nil,
"name" => "limit"
}
],
pattern: :type_topic,
separator: ":"
},
watch_trades_for_symbols: %{
market_id_format: :native,
params: [
%{
"default" => nil,
"name" => "limit"
}
],
pattern: :type_topic,
separator: ":"
}
},
has: %{
watch_balance: false,
watch_bids_asks: true,
watch_liquidations: nil,
watch_liquidations_for_symbols: nil,
watch_my_liquidations: nil,
watch_my_liquidations_for_symbols: nil,
watch_my_trades: false,
watch_ohlcv: true,
watch_ohlcv_for_symbols: nil,
watch_order_book: true,
watch_order_book_for_symbols: true,
watch_orders: true,
watch_orders_for_symbols: nil,
watch_position: nil,
watch_positions: nil,
watch_status: nil,
watch_ticker: false,
watch_tickers: false,
watch_trades: true,
watch_trades_for_symbols: true
},
message_patterns: [
%{
args_field: "subscriptions",
format: :type,
keys: [
"subscriptions",
"type"
],
kind_field: "type",
kind_value: "subscribe",
sources: [
:send,
:watch
]
}
],
subscription_config: %{
args_field: "topic",
args_format: :string,
market_id_format: :native,
op_field: "type",
separator: ":"
},
subscription_pattern: :type_subscribe,
test_urls: "wss://api.sandbox.gemini.com",
urls: "wss://api.gemini.com",
watch_methods: [
"watchBidsAsks",
"watchOHLCV",
"watchOrderBook",
"watchOrderBookForSymbols",
"watchOrders",
"watchTrades",
"watchTradesForSymbols"
]
}
}