Geminex.API.Public (geminex v0.0.3)
Public API endpoints for Gemini.
Summary
Functions
Retrieves time-intervaled data for the provided symbol.
Retrieves the current order book for the specified trading pair symbol.
Retrieves time-intervaled data for the provided perpetual swap symbol.
Retrieves symbols that currently have fee promos.
Retrieves the funding amount details for the specified symbol.
Retrieves the funding amount report file.
Retrieves the associated network for a requested token.
Retrieves the price feed for all trading pairs.
Retrieves extra detail on a supported symbol.
Retrieves all available symbols for trading.
Retrieves information about recent trading activity for the symbol.
Retrieves information about recent trading activity for the provided symbol (V2).
Retrieves the trade history for the specified trading pair symbol.
Functions
candles(symbol, time_frame)
Retrieves time-intervaled data for the provided symbol.
Parameters
- symbol: Trading pair symbol (e.g., "btcusd").
- time_frame: Time range for each candle (e.g., "1m", "5m").
current_order_book(symbol, opts \\ [])
@spec current_order_book( symbol :: String.t(), opts :: [limit_bids: non_neg_integer(), limit_asks: non_neg_integer()] ) :: {:ok, map()} | {:error, any()}
Retrieves the current order book for the specified trading pair symbol.
Parameters
- symbol (String.t()): The trading pair symbol (e.g., "btcusd").
- opts (keyword list, optional): A list of query parameters to customize the order book data.
- :limit_bids (non_neg_integer()): The maximum number of bid orders to retrieve.
- :limit_asks (non_neg_integer()): The maximum number of ask orders to retrieve.
Returns
- on success, containing the order book data as a map.
- on failure, with an error reason.
derivatives_candles(symbol, time_frame)
@spec derivatives_candles(symbol :: String.t(), time_frame :: String.t()) :: {:ok, [[any()]]} | {:error, any()}
Retrieves time-intervaled data for the provided perpetual swap symbol.
Parameters
- symbol: Perpetual swap symbol (e.g., "BTCGUSDPERP").
- time_frame: Time range for each candle (e.g., "1m").
fee_promos()
Retrieves symbols that currently have fee promos.
funding_amount(symbol)
Retrieves the funding amount details for the specified symbol.
Parameters
- symbol: Trading pair symbol (e.g., "btcgusdperp").
funding_amount_report(opts \\ [])
@spec funding_amount_report( opts :: [ fromDate: non_neg_integer(), toDate: non_neg_integer(), numRows: non_neg_integer() ] ) :: {:ok, binary()} | {:error, any()}
Retrieves the funding amount report file.
Parameters
- opts (keyword list, optional): A list of query parameters to customize the report.
- :fromDate (non_neg_integer()): The start date for the report, represented as a Unix timestamp.
- :toDate (non_neg_integer()): The end date for the report, represented as a Unix timestamp.
- :numRows (non_neg_integer()): The maximum number of rows to retrieve in the report.
Returns
- on success, containing the binary content of the report file.
- on failure, with an error reason.
network(token)
Retrieves the associated network for a requested token.
Parameters
- token: Token identifier (e.g., "eth").
price_feed()
Retrieves the price feed for all trading pairs.
symbol_details(symbol)
Retrieves extra detail on a supported symbol.
Parameters
- symbol: Trading pair symbol (e.g., "btcusd").
symbols()
Retrieves all available symbols for trading.
ticker(symbol)
Retrieves information about recent trading activity for the symbol.
Parameters
- symbol: Trading pair symbol (e.g., "btcusd").
ticker_v2(symbol)
Retrieves information about recent trading activity for the provided symbol (V2).
Parameters
- symbol: Trading pair symbol (e.g., "btcusd").
trade_history(symbol, opts \\ [])
@spec trade_history( symbol :: String.t(), opts :: [ timestamp: non_neg_integer(), since_tid: non_neg_integer(), limit_trades: non_neg_integer(), include_breaks: boolean() ] ) :: {:ok, [map()]} | {:error, any()}
Retrieves the trade history for the specified trading pair symbol.
Parameters
- symbol (String.t()): The trading pair symbol (e.g., "btcusd").
- opts (keyword list, optional): A list of options to customize the query.
- :timestamp (non_neg_integer()): The starting timestamp for the trade history.
- :since_tid (non_neg_integer()): The trade ID from which to start fetching trades.
- :limit_trades (non_neg_integer()): The maximum number of trades to retrieve.
- :include_breaks (boolean()): Whether to include breaks between trades. Defaults to false.
Returns
- on success, containing the trade history as a list of maps.
- on failure, with an error reason.