Method: CoingeckoRuby::Client::Derivatives#derivative_exchanges

Defined in:
lib/coingecko_ruby/client/derivatives.rb

#derivative_exchanges(**options) ⇒ Array<Hash>

Fetches the list of derivative exchanges listed in CoinGecko.

Examples:

Get one derivative exchange.

client.derivative_exchanges(per_page: 1)

Sample response object

[{
  "name" => "Binance (Futures)",
  "id" => "binance_futures",
  "open_interest_btc" => 237845.78,
  "trade_volume_24h_btc" => "2209372.18",
  "number_of_perpetual_pairs" => 132,
  "number_of_futures_pairs" => 32,
  "image" =>
  "https://assets.coingecko.com/markets/images/466/small/binance_futures.jpg?1568609512",
  "year_established" => 2019,
  "country" => nil,
  "description" => "",
  "url" => "https://www.binance.com/"
}]

Parameters:

  • options (Hash)

    a customizable set of options

Options Hash (**options):

  • :per_page (Integer)

    sets the number of results to return per page.

  • :page (Integer)

    sets the page for results.

  • :order (String)

    sets the sort order for results. Valid values: name_asc, name_desc, open_interest_btc_asc, open_interest_btc_desc, trade_volume_24h_btc_asc, trade_volume_24h_btc_desc.

Returns:

  • (Array<Hash>)

    each derivative exchange’s information.



81
82
83
# File 'lib/coingecko_ruby/client/derivatives.rb', line 81

def derivative_exchanges(**options)
  get 'derivatives/exchanges', **options
end