Module: Coincap::Markets
- Defined in:
- lib/coincap/markets.rb
Overview
Take a closer look into exchanges with the /markets endpoint. Similar to the /exchanges endpoint, we strive to offer transparency into how real-time our data is with a key identifying when the market was last updated. For a historical view on how a market has performed, see the /candles endpoint. All market data represents actual trades processed, orders on an exchange are not represented. Data received from individual markets is used to calculate the current price of an asset.
Constant Summary collapse
- URI_API =
"#{BASE_URI}#{VERSION_API}/markets"
Class Method Summary collapse
-
.list(**options) ⇒ Hash
Returns a list of all markets.
Class Method Details
.list(**options) ⇒ Hash
Returns a list of all markets.
{
"data": [
{
"exchangeId": "bitstamp",
"rank": "1",
"baseSymbol": "BTC",
"baseId": "bitcoin",
"quoteSymbol": "USD",
"quoteId": "united-states-dollar",
"priceQuote": "6927.3300000000000000",
"priceUsd": "6927.3300000000000000",
"volumeUsd24Hr": "43341291.9576547008000000",
"percentExchangeVolume": "67.2199253376108585",
"tradesCount24Hr": "420721",
"updated": 1533581033590
},
...
],
"timestamp": 1533581173350
}
48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/coincap/markets.rb', line 48 def self.list(**) Helper.fetch_data(URI_API, exchangeId: [:exchange_id], baseSymbol: [:base_symbol], quoteSymbol: [:quote_symbol], baseId: [:base_id], quoteId: [:quote_id], assetSymbol: [:asset_symbol], assetId: [:asset_id], limit: [:limit], offset: [:offset]) end |