 I'm releasing Ccxtex 0.1, a first version of FLOSS Elixir package for Elixir/Erlang interoperability with python version of [ccxt library](https://github.com/ccxt/ccxt). Ccxt provides unified API for fetching of historical data and trading operations for multiple cryptocurrency exchanges including GDAX, Bitfinex, Poloniex, Binance and others. # [Ccxtex repo and docs](https://github.com/cyberpunk-ventures/ccxtex) ## Installation ### Elixir Add the following line to your package mix.exs: ```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 interop is implemented with Erlport and Export libraries. ## 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 - [ ] integrate python 3 async calls and remove a pid arg from module functions - [ ] capture exceptions generated by ccxt python library and convert to elixir success tuples ### Private APIs implementation 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(Ccxtex.Port)` ``` [ ... %{ 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(Ccxtex.Port, 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(Ccxtex.Port, 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-1-released-call-ccxt-library-from-elixir-erlang |
category | utopian-io |
json_metadata | {"community":"busy","app":"steemit/0.1","format":"markdown","tags":["utopian-io","development","busy","opensource","elixir"],"users":["pid"],"links":["https://github.com/ccxt/ccxt","https://github.com/cyberpunk-ventures/ccxtex","https://pypi.org/project/ccxt/"],"image":["http://i.imgur.com/QVcT8MY.png"]} |
created | 2018-05-28 16:47:03 |
last_update | 2018-05-28 16:56:51 |
depth | 0 |
children | 3 |
last_payout | 2018-06-04 16:47:03 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 131.195 HBD |
curator_payout_value | 30.846 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 3,722 |
author_reputation | 61,670,850,962,884 |
root_title | "Ccxtex 0.1 released: call ccxt library from Elixir/Erlang" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 58,140,163 |
net_rshares | 39,971,177,003,321 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
cm-steem | 0 | 607,674,648,397 | 100% | ||
knopki | 0 | 181,090,579 | 100% | ||
matt-a | 0 | 452,209,851,080 | 10% | ||
ace108 | 0 | 14,807,677,228 | 1% | ||
fooblic | 0 | 21,609,800,743 | 99% | ||
sc-steemit | 0 | 2,283,394,258 | 15% | ||
jimmco | 0 | 9,533,657,141 | 100% | ||
ontofractal | 0 | 6,371,059,812 | 100% | ||
carrinm | 0 | 16,407,229,252 | 2% | ||
whatsup | 0 | 314,925,232,723 | 100% | ||
busy.pay | 0 | 746,567,391,885 | 10.17% | ||
steemtruth | 0 | 1,403,819,422 | 5% | ||
ebryans | 0 | 410,988,347 | 50% | ||
crowdfundedwhale | 0 | 63,682,800,114 | 12% | ||
steemfeed | 0 | 20,202,522,932 | 100% | ||
fakj94 | 0 | 26,297,140,583 | 100% | ||
nyh | 0 | 306,137,213,270 | 100% | ||
ccoin | 0 | 6,288,120,063 | 100% | ||
kharrazi | 0 | 87,542,834,955 | 100% | ||
tach | 0 | 14,946,956,608 | 100% | ||
ikonik | 0 | 393,531,737 | 100% | ||
utopian-io | 0 | 36,111,735,282,991 | 24.2% | ||
steemitstats | 0 | 3,632,411,383 | 5% | ||
kryptoblogger | 0 | 46,139,612,437 | 100% | ||
minestein | 0 | 376,039,688 | 100% | ||
amosbastian | 0 | 38,591,395,243 | 100% | ||
r351574nc3 | 0 | 625,546,915 | 1% | ||
ikrahch | 0 | 412,755,487,762 | 100% | ||
chronocrypto | 0 | 577,520,827,206 | 100% | ||
properfraction | 0 | 602,700,623 | 100% | ||
salty-mcgriddles | 0 | 770,459,583 | 0.9% | ||
macdonald.ian | 0 | 50,711,139,467 | 100% | ||
anshar | 0 | 7,123,685,426 | 100% | ||
drsensor | 0 | 61,010,713 | 10% | ||
dugan | 0 | 99,943,884 | 100% | ||
luzeroc4 | 0 | 554,498,871 | 100% | ||
helcim | 0 | 0 | 100% |
Thanks for the contribution! Looks like a cool project! The commit messages are great and it looks like quite a lot of work went into it, so keep it up! One thing that is always appreciated is including a link to a PR or a comparison like [this](https://github.com/cyberpunk-ventures/ccxtex/compare/master@%7B1day%7D...master) for example. It would also be cool if you could tell a bit more about how you implemented the features (just my opinion, as I am curious myself). 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/2212112). ---- 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 | amosbastian |
---|---|
permlink | re-ontofractal-ccxtex-0-1-released-call-ccxt-library-from-elixir-erlang-20180529t151504608z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"links":["https://github.com/cyberpunk-ventures/ccxtex/compare/master@%7B1day%7D...master","https://join.utopian.io/guidelines","https://review.utopian.io/result/3/2212112","https://support.utopian.io/","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"} |
created | 2018-05-29 15:15:03 |
last_update | 2018-05-29 15:15:03 |
depth | 1 |
children | 1 |
last_payout | 2018-06-05 15:15:03 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.019 HBD |
curator_payout_value | 0.004 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 966 |
author_reputation | 174,473,586,900,705 |
root_title | "Ccxtex 0.1 released: call ccxt library from Elixir/Erlang" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 58,291,672 |
net_rshares | 6,275,493,915 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
ontofractal | 0 | 6,275,493,915 | 100% |
Thanks for the review, @amosbastian! Got it, will include commit history comparison in the future posts. Yeah, thanks for the suggestion, I'm planning to maybe do a tutorial on Elixir/Python interop after a few iterations of the library.
author | ontofractal |
---|---|
permlink | re-amosbastian-re-ontofractal-ccxtex-0-1-released-call-ccxt-library-from-elixir-erlang-20180530t152358837z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"users":["amosbastian"],"app":"steemit/0.1"} |
created | 2018-05-30 15:24:00 |
last_update | 2018-05-30 15:24:00 |
depth | 2 |
children | 0 |
last_payout | 2018-06-06 15:24:00 |
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 | 238 |
author_reputation | 61,670,850,962,884 |
root_title | "Ccxtex 0.1 released: call ccxt library from Elixir/Erlang" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 58,455,331 |
net_rshares | 0 |
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>
author | utopian-io |
---|---|
permlink | re-ccxtex-0-1-released-call-ccxt-library-from-elixir-erlang-20180529t172511z |
category | utopian-io |
json_metadata | "{"app": "beem/0.19.29"}" |
created | 2018-05-29 17:25:12 |
last_update | 2018-05-29 17:25:12 |
depth | 1 |
children | 0 |
last_payout | 2018-06-05 17:25:12 |
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 | 508 |
author_reputation | 152,955,367,999,756 |
root_title | "Ccxtex 0.1 released: call ccxt library from Elixir/Erlang" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 58,309,822 |
net_rshares | 0 |