README.md in coinmarketcap-ruby-client-1.1.0 vs README.md in coinmarketcap-ruby-client-1.1.1

- old
+ new

@@ -11,10 +11,11 @@ - [Get an API Key](#get-an-api-token) - [Configure](#configure) - [Get CoinMarketCap ID Map](#get-coinmarketcap-id-map) - [Get Cryptocurrency Metadata](#get-cryptocurrency-metadata) - [Get Latest Listings](#get-latest-listings) + - [Get Latest Quotes](#get-latest-quotes) - [Development](#development) - [Contributing](#contributing) - [License](#license) - [Code of Conduct](#code-of-conduct) @@ -147,9 +148,49 @@ quote_in_usd.fully_diluted_market_cap # 1130930767201.65 quote_in_usd.last_updated # <Date: 2021-10-08 ((2459496j,0s,0n),+0s,2299161j)> ``` See [Listings Latest](https://coinmarketcap.com/api/documentation/v1/#operation/getV1CryptocurrencyListingsLatest) for detailed documentation. + +### Get Latest Quotes + +Returns the latest market quote for 1 or more cryptocurrencies. Use the "convert" option to return market values in multiple fiat and cryptocurrency conversions in the same call. + +```ruby + listings = client.quotes_latest(symbol: 'BTC') + listing = listings['BTC'] + + listing.id # 1 + listing.name # 'Bitcoin' + listing.symbol # 'BTC' + listing.slug # 'bitcoin' + listing.is_active # 1 + listing.is_fiat # 0 + listing.num_market_pairs # 8527 + listing.date_added # <Date: 2013-04-28 ((2456411j,0s,0n),+0s,2299161j)> + listing.tags # ['mineable', 'pow', 'sha-256', 'store-of-value', ...] + listing.max_supply # 21000000 + listing.circulating_supply # 18837706 + listing.total_supply # 18837706 + listing.platform # nil + listing.cmc_rank # 1 + listing.last_updated # <Date: 2021-10-08 ((2459496j,0s,0n),+0s,2299161j)> + + quote_in_usd = listing.quote['USD'] + + quote_in_usd.price # 53853.84605722145 + quote_in_usd.volume_24h # 35664606394.86121 + quote_in_usd.percent_change_1h # -0.08049597 + quote_in_usd.percent_change_24h # -1.93058 + quote_in_usd.percent_change_7d # 23.57830268 + quote_in_usd.percent_change_30d # 15.8506565 + quote_in_usd.percent_change_60d # 24.08594399 + quote_in_usd.percent_change_90d # 59.25745607 + quote_in_usd.market_cap # 1014482918995.1969 + quote_in_usd.market_cap_dominance # 44.5955 + quote_in_usd.fully_diluted_market_cap # 1130930767201.65 + quote_in_usd.last_updated # <Date: 2021-10-08 ((2459496j,0s,0n),+0s,2299161j)> +``` ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.