 I've released Ccxtex 0.2, an F/LOSS library for Elixir/Erlang interoperability with python version of [ccxt library](https://github.com/ccxt/ccxt). Ccxt provides an unified API for querying for historical/ recent data and trading operations for multiple cryptocurrency exchanges including GDAX, Bitfinex, Poloniex, Binance and others. Ccxtex provides access to open/high/low/close/volume data, latest tickers and markets for more than 100 exchanges. # [Ccxtex repo and docs](https://github.com/cyberpunk-ventures/ccxtex) ## Changelog (v0.1 to v0.2) * added exchanges supervisor to start an Erlport process for every exchanges that enables concurrency while fetching data from exchange APIs * added seamless routing of calls to the corresponding exchange erlport process by default * improved usability of function calls that now do not require a pid argument * added specs to the all public functions * updated docs to match latest features * minor fixes and improvements ## [Release commits](https://github.com/cyberpunk-ventures/ccxtex/compare/8441232686b0691f003537932057de56ac76a4f2...master) ## Installation ### Elixir ```elixir def deps do [ {:ccxtex, github: "cyberpunk-ventures/ccxtex"} ] end ``` ### Python You need Python 3 and [ccxt](https://pypi.org/project/ccxt/) python package installed for this module to work. To install ccxt use `pip3 install ccxt` ## Python interoperability To provide querying of APIs in parallel and ease of per-exchange configuration, Ccxtex application includes a supervisor that starts and monitors an Erlport process and Python process for every exchange. Be mindful about the required system resources. ## Status and roadmap Ccxtex is usable, but is under active development, API is unstable and will change. Some exchanges do not support all methods/require CORS/have other esoteric requirements. Please consult [ccxt documentation](https://github.com/ccxt/ccxt) for more. ### Public APIs in progress - [x] fetch_ticker - [x] fetch_ohlcv - [x] fetch_exchanges - [x] fetch_markets - [ ] fetch_trades - [ ] fetch_order_book - [ ] fetch_l2_order_book ### Developer experience improvements - [ ] unified public API call option structs - [ ] investigate alternative parallelism/concurrency implementation - [ ] capture exceptions generated by ccxt python library and convert to elixir success tuples - [ ] improve general usability of library ### Private APIs implementation and authentication are under consideration ## Examples Default process id (@pid) is Ccxtex.Port. You can always start and use another process with Ccxtex.Port.start_link/2 ### Fetch exchanges Usage: `exchanges = Ccxtex.fetch_exchanges()` ``` [ ... %{ has: %{ cancel_order: true, cancel_orders: false, cors: false, create_deposit_address: true, create_limit_order: true, create_market_order: false, create_order: true, deposit: false, edit_order: true, fetch_balance: true, fetch_closed_orders: "emulated", fetch_currencies: true, fetch_deposit_address: true, fetch_funding_fees: false, fetch_l2_order_book: true, fetch_markets: true, fetch_my_trades: true, fetch_ohlcv: true, fetch_open_orders: true, fetch_order: "emulated", fetch_order_book: true, fetch_order_books: false, fetch_orders: "emulated", fetch_ticker: true, fetch_tickers: true, fetch_trades: true, fetch_trading_fees: true, private_api: true, public_api: true, withdraw: true }, id: "poloniex", timeout: 10000 } ] ``` ### Fetch ticker Usage: ``` exchange = "bitstamp" symbol = "ETH/USD" ticker = Ccxtex.fetch_ticker(exchange, symbol) ``` Return value example: ``` %{ ask: 577.35, ask_volume: nil, average: nil, base_volume: 73309.52075575, bid: 576.8, bid_volume: nil, change: nil, close: 577.35, datetime: "2018-05-24T14:06:09.000Z", high: 619.95, info: %{ ask: "577.35", bid: "576.80", high: "619.95", last: "577.35", low: "549.28", open: "578.40", timestamp: "1527170769", volume: "73309.52075575", vwap: "582.86" }, last: 577.35, low: 549.28, open: 578.4, percentage: nil, previous_close: nil, quote_volume: 42729187.26769644, symbol: "ETH/USD", timestamp: 1527170769000, vwap: 582.86 } ``` ### Fetch OHLCV Usage: ``` exchange = "bitstamp" symbol = "ETH/USD" ticker = Ccxtex.fetch_ticker(exchange, symbol) ``` Return value example: ``` %{ base: "ETH", base_volume: 4234.62695691, close: 731.16, exchange: "bitfinex2", high: 737.07, low: 726, open: 736.77, quote: "USDT", timestamp: ~N[2018-01-01 00:00:00.000] } ``` <center> (*`□)<炎炎炎炎 </center>
author | ontofractal |
---|---|
permlink | ccxtex-0-2-released-elixir-erlang-interop-with-ccxt-library |
category | utopian-io |
json_metadata | {"community":"busy","app":"busy/2.4.0","format":"markdown","tags":["utopian-io","development","busy","opensource","elixir"],"users":["pid"],"links":["https://github.com/ccxt/ccxt","https://github.com/cyberpunk-ventures/ccxtex","https://github.com/cyberpunk-ventures/ccxtex/compare/8441232686b0691f003537932057de56ac76a4f2...master","https://pypi.org/project/ccxt/","https://github.com/ccxt/ccxt","/@pid"],"image":["http://i.imgur.com/QVcT8MY.png"]} |
created | 2018-06-27 11:48:27 |
last_update | 2018-06-27 11:48:27 |
depth | 0 |
children | 2 |
last_payout | 2018-07-04 11:48:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 112.984 HBD |
curator_payout_value | 28.981 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 4,589 |
author_reputation | 61,670,850,962,884 |
root_title | "Ccxtex 0.2 released: Elixir/Erlang interop with Ccxt library" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 62,474,617 |
net_rshares | 56,849,832,048,635 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
cm-steem | 0 | 618,518,363,398 | 100% | ||
knopki | 0 | 181,090,579 | 100% | ||
ace108 | 0 | 74,600,279,529 | 6% | ||
fooblic | 0 | 18,387,277,695 | 94% | ||
sc-steemit | 0 | 5,254,902,364 | 15% | ||
mada | 0 | 19,440,019,922 | 100% | ||
jimmco | 0 | 13,094,107,673 | 100% | ||
ontofractal | 0 | 6,811,772,758 | 100% | ||
carrinm | 0 | 14,854,134,169 | 2% | ||
busy.pay | 0 | 4,760,620,983,084 | 20.33% | ||
steemtruth | 0 | 1,568,735,509 | 5% | ||
achiron | 0 | 20,549,907,961 | 100% | ||
ebryans | 0 | 479,486,405 | 50% | ||
crowdfundedwhale | 0 | 72,327,601,861 | 15% | ||
gomatthew | 0 | 78,401,740 | 1% | ||
semasping | 0 | 6,185,401,978 | 100% | ||
doughtaker | 0 | 9,656,871,380 | 50% | ||
alexzicky | 0 | 23,424,913,299 | 50% | ||
ingdirect | 0 | 329,610,815 | 54% | ||
monash | 0 | 451,688,894 | 74% | ||
ikonik | 0 | 393,531,737 | 100% | ||
jrawsthorne | 0 | 12,768,071,980 | 100% | ||
utopian-io | 0 | 50,962,179,423,467 | 33.44% | ||
r351574nc3 | 0 | 1,026,289,159 | 3% | ||
grzesiekb | 0 | 175,926,222,325 | 100% | ||
tdogvoid | 0 | 205,233,215 | 100% | ||
liberviarum | 0 | 3,527,485,330 | 100% | ||
juanwhite | 0 | 845,336,084 | 100% | ||
reazuliqbal | 0 | 21,079,633,621 | 100% | ||
properfraction | 0 | 562,928,500 | 100% | ||
salty-mcgriddles | 0 | 833,520,186 | 2% | ||
mhossain | 0 | 582,331,369 | 100% | ||
tanzil2020 | 0 | 162,119,465 | 50% | ||
developspanish | 0 | 1,262,597,958 | 100% | ||
fuzzythumb | 0 | 512,722,497 | 100% | ||
boomtube | 0 | 545,708,799 | 100% | ||
kenniac | 0 | 70,226,040 | 100% | ||
bdcommunity2 | 0 | 533,115,890 | 100% | ||
helcim | 0 | 0 | 100% |
Thank you for your contribution. Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/guidelines), 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/2222213). ---- 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/)
author | codingdefined |
---|---|
permlink | re-ontofractal-ccxtex-0-2-released-elixir-erlang-interop-with-ccxt-library-20180629t050715143z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"links":["https://join.utopian.io/guidelines","https://review.utopian.io/result/3/2222213","https://support.utopian.io/","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"} |
created | 2018-06-29 05:07:15 |
last_update | 2018-06-29 05:07:15 |
depth | 1 |
children | 0 |
last_payout | 2018-07-06 05:07:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 525 |
author_reputation | 533,274,036,397,313 |
root_title | "Ccxtex 0.2 released: Elixir/Erlang interop with Ccxt library" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 62,697,672 |
net_rshares | 0 |
Hey @ontofractal **Thanks for contributing on Utopian**. We’re already looking forward to your next contribution! **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>
author | utopian-io |
---|---|
permlink | re-ccxtex-0-2-released-elixir-erlang-interop-with-ccxt-library-20180630t033509z |
category | utopian-io |
json_metadata | "{"app": "beem/0.19.29"}" |
created | 2018-06-30 03:35:09 |
last_update | 2018-06-30 03:35:09 |
depth | 1 |
children | 0 |
last_payout | 2018-07-07 03:35:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 303 |
author_reputation | 152,955,367,999,756 |
root_title | "Ccxtex 0.2 released: Elixir/Erlang interop with Ccxt library" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 62,817,294 |
net_rshares | 0 |