create account

Coinmarketcap_api_ex v2.0.0 released [open source Elixir/Erlang client for coinmarketcap.com] by ontofractal

View this thread on: hive.blogpeakd.comecency.com
· @ontofractal · (edited)
$145.43
Coinmarketcap_api_ex v2.0.0 released [open source Elixir/Erlang client for coinmarketcap.com]
![](http://i.imgur.com/QVcT8MY.png)

This release implements support for the second version of Coinmarketcap API with minimal changes to API structure. 

All CMC API endpoints are called using fetch_#{endpoint} functions and return success tuple with `%CoinmarketcapApi.Response{}` containing :data and :metadata.

# Configuration

Configuration is not required.

# Links

* [Github](https://github.com/cyberpunk-ventures/coinmarketcap_api_ex)
* [Hex.pm](https://hex.pm/packages/coinmarketcap_api)
* [Hexdocs](https://hexdocs.pm/coinmarketcap_api/api-reference.html)


# Documentation

More docs and example return values can be found at [hexdocs](https://hexdocs.pm/coinmarketcap_api/2.0.0/CoinmarketcapApi.html).

# Tickers

All ticker related functions return either a Ticker struct or a list of Ticker structs.
Examples:

* CoinmarketcapApi.fetch_ticker()
* CoinmarketcapApi.fetch_ticker([start: 100, limit: 50])
* CoinmarketcapApi.fetch_ticker([start: 100, limit: 50, convert: "EUR"])
* CoinmarketcapApi.fetch_ticker(1)
* CoinmarketcapApi.fetch_ticker(1, convert: "EUR")


Ticker structs have the following shape:

```
%CoinmarketcapApi.Ticker{
  circulating_supply: 17035225,
  id: 1,
  last_updated: ~N[2018-05-15 17:44:33],
  max_supply: 21000000,
  name: "Bitcoin",
  quotes: %{
    "USD" => %CoinmarketcapApi.Quote{
      market_cap: 145773657018.0,
      percent_change_1h: -0.26,
      percent_change_24h: -2.54,
      percent_change_7d: -7.03,
      price: 8557.19,
      volume_24h: 6.69447e9
    }
  },
  rank: 1,
  symbol: "BTC",
  total_supply: 17035225,
  website_slug: "bitcoin"
}
```

Ticker values are parsed to the most fitting Elixir datatypes:

* id -> Integer
* last_updated -> NaiveDateTime
* {total,circulating,max}_supply -> Integer

# Listings

`fetch_listings` function returns all active cryptocurrency listings. You can then use `fetch_ticker(id)` to query more information for a specific cryptocurrency.

# Global Data

`fetch_global_data` returns the global data found at the top of coinmarketcap.
πŸ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorontofractal
permlinkcoinmarketcapapiex-v2-0-0-released-open-source-elixir-erlang-client-for-coinmarketcap-com
categoryutopian-io
json_metadata{"community":"busy","app":"steemit/0.1","format":"markdown","links":["https://github.com/cyberpunk-ventures/coinmarketcap_api_ex","https://hex.pm/packages/coinmarketcap_api","https://hexdocs.pm/coinmarketcap_api/api-reference.html","https://hexdocs.pm/coinmarketcap_api/2.0.0/CoinmarketcapApi.html"],"tags":["utopian-io","development","busy","opensource","elixir"],"image":["http://i.imgur.com/QVcT8MY.png"]}
created2018-05-15 18:33:12
last_update2018-05-16 00:14:18
depth0
children4
last_payout2018-05-22 18:33:12
cashout_time1969-12-31 23:59:59
total_payout_value114.511 HBD
curator_payout_value30.919 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,031
author_reputation61,670,850,962,884
root_title"Coinmarketcap_api_ex v2.0.0 released [open source Elixir/Erlang client for coinmarketcap.com]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id55,871,742
net_rshares29,609,633,735,880
author_curate_reward""
vote details (34)
@justyy ·
$0.07
Hello, could you point me to the right github repro? thanks
πŸ‘  , , , , ,
properties (23)
authorjustyy
permlinkre-ontofractal-coinmarketcapapiex-v2-0-0-released-open-source-elixir-erlang-client-for-coinmarketcap-com-20180515t232612487z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-05-15 23:26:15
last_update2018-05-15 23:26:15
depth1
children1
last_payout2018-05-22 23:26:15
cashout_time1969-12-31 23:59:59
total_payout_value0.066 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length59
author_reputation280,616,224,641,976
root_title"Coinmarketcap_api_ex v2.0.0 released [open source Elixir/Erlang client for coinmarketcap.com]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id55,906,352
net_rshares13,816,239,185
author_curate_reward""
vote details (6)
@ontofractal ·
Sure, here it is -- [repo link](https://github.com/cyberpunk-ventures/coinmarketcap_api_ex)
properties (22)
authorontofractal
permlinkre-justyy-re-ontofractal-coinmarketcapapiex-v2-0-0-released-open-source-elixir-erlang-client-for-coinmarketcap-com-20180516t001637909z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"links":["https://github.com/cyberpunk-ventures/coinmarketcap_api_ex"],"app":"steemit/0.1"}
created2018-05-16 00:16:39
last_update2018-05-16 00:16:39
depth2
children0
last_payout2018-05-23 00:16:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length91
author_reputation61,670,850,962,884
root_title"Coinmarketcap_api_ex v2.0.0 released [open source Elixir/Erlang client for coinmarketcap.com]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id55,911,643
net_rshares0
@justyy ·
$0.06
Thank you for your contribution.

Your contribution has been evaluated according to [Utopian rules and guidelines](https://utopian.io/rules), as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post,[Click here](https://review.utopian.io/result/3/2322231)

---- 
Need help? Write a ticket on https://support.utopian.io/. 
Chat with us on [Discord](https://discord.gg/uTyJkNm). 
[[utopian-moderator]](https://join.utopian.io/)
πŸ‘  , , , , ,
properties (23)
authorjustyy
permlinkre-ontofractal-coinmarketcapapiex-v2-0-0-released-open-source-elixir-erlang-client-for-coinmarketcap-com-20180516t002215026z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"links":["https://utopian.io/rules","https://review.utopian.io/result/3/2322231","https://support.utopian.io/","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"}
created2018-05-16 00:22:18
last_update2018-05-16 00:22:18
depth1
children0
last_payout2018-05-23 00:22:18
cashout_time1969-12-31 23:59:59
total_payout_value0.057 HBD
curator_payout_value0.006 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length508
author_reputation280,616,224,641,976
root_title"Coinmarketcap_api_ex v2.0.0 released [open source Elixir/Erlang client for coinmarketcap.com]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id55,912,298
net_rshares13,340,267,934
author_curate_reward""
vote details (6)
@utopian-io ·
Hey @ontofractal
**Thanks for contributing on Utopian**.
We’re already looking forward to your next contribution!

**Contributing on Utopian**
Learn how to contribute on <a href='https://join.utopian.io'>our website</a> or by watching <a href='https://www.youtube.com/watch?v=8S1AtrzYY1Q'>this tutorial</a> on Youtube.

**Want to chat? Join us on Discord https://discord.gg/h52nFrV.**

<a href='https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
properties (22)
authorutopian-io
permlinkre-coinmarketcapapiex-v2-0-0-released-open-source-elixir-erlang-client-for-coinmarketcap-com-20180516t002508z
categoryutopian-io
json_metadata"{"app": "beem/0.19.29"}"
created2018-05-16 00:25:09
last_update2018-05-16 00:25:09
depth1
children0
last_payout2018-05-23 00:25:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length508
author_reputation152,955,367,999,756
root_title"Coinmarketcap_api_ex v2.0.0 released [open source Elixir/Erlang client for coinmarketcap.com]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id55,912,610
net_rshares0