ccxt-js
Version:
The node.js portion of original ccxt cryptocurrency trading library with support for 100+ exchanges. It reduces the size of the library from 40MB to 8MB
167 lines (150 loc) • 60.6 kB
Markdown
# CCXT – CryptoCurrency eXchange Trading Library
[](https://travis-ci.org/ccxt/ccxt) [](https://npmjs.com/package/ccxt) [](https://pypi.python.org/pypi/ccxt) [](https://www.npmjs.com/package/ccxt) [](https://nodesecurity.io/orgs/ccxt/projects/856d3088-8b46-4515-9324-6b7cd2470522) [](https://gitter.im/ccxt-dev/ccxt?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [](https://github.com/ccxt/ccxt/wiki/Exchange-Markets) [](https://opencollective.com/ccxt)
A JavaScript / Python / PHP library for cryptocurrency trading and e-commerce with support for many bitcoin/ether/altcoin exchange markets and merchant APIs.
The **CCXT** library is used to connect and trade with cryptocurrency / altcoin exchanges and payment processing services worldwide. It provides quick access to market data for storage, analysis, visualization, indicator development, algorithmic trading, strategy backtesting, bot programming, webshop integration and related software engineering.
It is intended to be used by **coders, developers, technically-skilled traders, data-scientists and financial analysts** for building trading algorithms on top of it.
Current feature list:
- support for many exchange markets, even more upcoming soon
- fully implemented public and private APIs for all exchanges
- all currencies, altcoins and symbols, prices, order books, trades, tickers, etc...
- optional normalized data for cross-exchange or cross-currency analytics and arbitrage
- an out-of-the box unified all-in-one API extremely easy to integrate
- works in Node 7.6+, Python 2 and 3, PHP 5.3+, web browsers
[ccxt on GitHub](https://github.com/ccxt/ccxt) | [Install](#install) | [Usage](#usage) | [Manual](https://github.com/ccxt/ccxt/wiki) | [FAQ](https://github.com/ccxt/ccxt/wiki/FAQ) | [Examples](https://github.com/ccxt/ccxt/tree/master/examples) | [Changelog](https://github.com/ccxt/ccxt/blob/master/CHANGELOG.md) | [Contributing](https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md)
## Supported Cryptocurrency Exchange Markets
The ccxt library currently supports the following 123 cryptocurrency exchange markets and trading APIs:
| | id | name | ver | doc | countries |
|---------------------------------------------------------------------------------------------------------------------------|--------------------|------------------------------------------------------------------------------|:---:|:--------------------------------------------------------------------------------------------:|-----------------------------------------|
| | _1broker | [1Broker](https://1broker.com) | 2 | [API](https://1broker.com/?c=en/content/api-documentation) | US |
| | _1btcxe | [1BTCXE](https://1btcxe.com) | * | [API](https://1btcxe.com/api-docs.php) | Panama |
| | acx | [ACX](https://acx.io) | 2 | [API](https://acx.io/documents/api_v2) | Australia |
| | allcoin | [Allcoin](https://www.allcoin.com) | 1 | [API](https://www.allcoin.com/About/APIReference) | Canada |
| | anxpro | [ANXPro](https://anxpro.com) | 2 | [API](http://docs.anxv2.apiary.io) | Japan, Singapore, Hong Kong, New Zealand|
| | anybits | [Anybits](https://anybits.com) | * | [API](https://anybits.com/help/api) | Ireland |
| | bibox | [Bibox](https://www.bibox.com) | 1 | [API](https://github.com/Biboxcom/api_reference/wiki/home_en) | China, US, South Korea |
| | binance | [Binance](https://www.binance.com/?ref=10205187) | * | [API](https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md) | Japan |
| | bit2c | [Bit2C](https://www.bit2c.co.il) | * | [API](https://www.bit2c.co.il/home/api) | Israel |
| | bitbank | [bitbank](https://bitbank.cc/) | 1 | [API](https://docs.bitbank.cc/) | Japan |
| | bitbay | [BitBay](https://bitbay.net) | * | [API](https://bitbay.net/public-api) | Malta, EU |
| | bitfinex | [Bitfinex](https://www.bitfinex.com) | 1 | [API](https://bitfinex.readme.io/v1/docs) | British Virgin Islands |
| | bitfinex2 | [Bitfinex v2](https://www.bitfinex.com) | 2 | [API](https://bitfinex.readme.io/v2/docs) | British Virgin Islands |
| | bitflyer | [bitFlyer](https://bitflyer.jp) | 1 | [API](https://bitflyer.jp/API) | Japan |
| | bithumb | [Bithumb](https://www.bithumb.com) | * | [API](https://www.bithumb.com/u1/US127) | South Korea |
| | bitkk | [bitkk](https://www.bitkk.com) | 1 | [API](https://www.bitkk.com/i/developer) | China |
| | bitlish | [Bitlish](https://bitlish.com) | 1 | [API](https://bitlish.com/api) | UK, EU, Russia |
| | bitmarket | [BitMarket](https://www.bitmarket.pl) | * | [API](https://www.bitmarket.net/docs.php?file=api_public.html) | Poland, EU |
| | bitmex | [BitMEX](https://www.bitmex.com/register/rm3C16) | 1 | [API](https://www.bitmex.com/app/apiOverview) | Seychelles |
| | bitsane | [Bitsane](https://bitsane.com) | * | [API](https://bitsane.com/info-api) | Ireland |
| | bitso | [Bitso](https://bitso.com) | 3 | [API](https://bitso.com/api_info) | Mexico |
| | bitstamp | [Bitstamp](https://www.bitstamp.net) | 2 | [API](https://www.bitstamp.net/api) | UK |
| | bitstamp1 | [Bitstamp v1](https://www.bitstamp.net) | 1 | [API](https://www.bitstamp.net/api) | UK |
| | bittrex | [Bittrex](https://bittrex.com) | 1.1 | [API](https://bittrex.com/Home/Api) | US |
| | bitz | [Bit-Z](https://www.bit-z.com) | 1 | [API](https://www.bit-z.com/api.html) | Hong Kong |
| | bl3p | [BL3P](https://bl3p.eu) | 1 | [API](https://github.com/BitonicNL/bl3p-api/tree/master/docs) | Netherlands, EU |
| | bleutrade | [Bleutrade](https://bleutrade.com) | 2 | [API](https://bleutrade.com/help/API) | Brazil |
| | braziliex | [Braziliex](https://braziliex.com/) | * | [API](https://braziliex.com/exchange/api.php) | Brazil |
| | btcbox | [BtcBox](https://www.btcbox.co.jp/) | 1 | [API](https://www.btcbox.co.jp/help/asm) | Japan |
| | btcchina | [BTCChina](https://www.btcchina.com) | 1 | [API](https://www.btcchina.com/apidocs) | China |
| | btcexchange | [BTCExchange](https://www.btcexchange.ph) | * | [API](https://github.com/BTCTrader/broker-api-docs) | Philippines |
| | btcmarkets | [BTC Markets](https://btcmarkets.net/) | * | [API](https://github.com/BTCMarkets/API) | Australia |
| | btctradeim | [BtcTrade.im](https://www.btctrade.im) | * | [API](https://www.btctrade.im/help.api.html) | Hong Kong |
| | btctradeua | [BTC Trade UA](https://btc-trade.com.ua) | * | [API](https://docs.google.com/document/d/1ocYA0yMy_RXd561sfG3qEPZ80kyll36HUxvCRe5GbhE/edit) | Ukraine |
| | btcturk | [BTCTurk](https://www.btcturk.com) | * | [API](https://github.com/BTCTrader/broker-api-docs) | Turkey |
| | btcx | [BTCX](https://btc-x.is) | 1 | [API](https://btc-x.is/custom/api-document.html) | Iceland, US, EU |
| | bxinth | [BX.in.th](https://bx.in.th) | * | [API](https://bx.in.th/info/api) | Thailand |
| | ccex | [C-CEX](https://c-cex.com) | * | [API](https://c-cex.com/?id=api) | Germany, EU |
| | cex | [CEX.IO](https://cex.io) | * | [API](https://cex.io/cex-api) | UK, EU, Cyprus, Russia |
| | chbtc | [CHBTC](https://trade.chbtc.com/api) | 1 | [API](https://www.chbtc.com/i/developer) | China |
| | chilebit | [ChileBit](https://chilebit.net) | 1 | [API](https://blinktrade.com/docs) | Chile |
| | cobinhood | [COBINHOOD](https://cobinhood.com) | * | [API](https://cobinhood.github.io/api-public) | Taiwan |
| | coinbase | [coinbase](https://www.coinbase.com/join/58cbe25a355148797479dbd2) | 2 | [API](https://developers.coinbase.com/api/v2) | US |
| | coinbasepro | [Coinbase Pro](https://pro.coinbase.com/) | * | [API](https://docs.gdax.com) | US |
| | coincheck | [coincheck](https://coincheck.com) | * | [API](https://coincheck.com/documents/exchange/api) | Japan, Indonesia |
| | coinegg | [CoinEgg](https://www.coinegg.com) | * | [API](https://www.coinegg.com/explain.api.html) | China, UK |
| | coinex | [CoinEx](https://www.coinex.com/account/signup?refer_code=yw5fz) | 1 | [API](https://github.com/coinexcom/coinex_exchange_api/wiki) | China |
| | coinexchange | [CoinExchange](https://www.coinexchange.io) | * | [API](https://coinexchangeio.github.io/slate/) | India, Japan, South Korea, Vietnam, US |
| | coinfalcon | [CoinFalcon](https://coinfalcon.com) | * | [API](https://docs.coinfalcon.com) | UK |
| | coinfloor | [coinfloor](https://www.coinfloor.co.uk) | * | [API](https://github.com/coinfloor/api) | UK |
| | coingi | [Coingi](https://coingi.com) | * | [API](http://docs.coingi.apiary.io/) | Panama, Bulgaria, China, US |
| | coinmarketcap | [CoinMarketCap](https://coinmarketcap.com) | 1 | [API](https://coinmarketcap.com/api) | US |
| | coinmate | [CoinMate](https://coinmate.io) | * | [API](http://docs.coinmate.apiary.io) | UK, Czech Republic, EU |
| | coinnest | [coinnest](https://www.coinnest.co.kr) | * | [API](https://www.coinnest.co.kr/doc/intro.html) | South Korea |
| | coinone | [CoinOne](https://coinone.co.kr) | 2 | [API](https://doc.coinone.co.kr) | South Korea |
| | coinsecure | [Coinsecure](https://coinsecure.in) | 1 | [API](https://api.coinsecure.in) | India |
| | coinspot | [CoinSpot](https://www.coinspot.com.au) | * | [API](https://www.coinspot.com.au/api) | Australia |
| | cointiger | [CoinTiger](https://www.cointiger.pro/exchange/register.html?refCode=FfvDtt) | 1 | [API](https://github.com/cointiger/api-docs-en/wiki) | China |
| | coolcoin | [CoolCoin](https://www.coolcoin.com) | * | [API](https://www.coolcoin.com/help.api.html) | Hong Kong |
| | crypton | [Crypton](https://cryptonbtc.com) | 1 | [API](https://cryptonbtc.docs.apiary.io/) | EU |
| | cryptopia | [Cryptopia](https://www.cryptopia.co.nz/Register?referrer=kroitor) | * | [API](https://www.cryptopia.co.nz/Forum/Category/45) | New Zealand |
| | deribit | [Deribit](https://www.deribit.com/reg-1189.4038) | 1 | [API](https://www.deribit.com/pages/docs/api) | Netherlands |
| | dsx | [DSX](https://dsx.uk) | 3 | [API](https://api.dsx.uk) | UK |
| | ethfinex | [Ethfinex](https://www.ethfinex.com) | 1 | [API](https://bitfinex.readme.io/v1/docs) | British Virgin Islands |
| | exmo | [EXMO](https://exmo.me/?ref=131685) | 1 | [API](https://exmo.me/en/api_doc?ref=131685) | Spain, Russia |
| | exx | [EXX](https://www.exx.com/) | * | [API](https://www.exx.com/help/restApi) | China |
| | fcoin | [FCoin](https://www.fcoin.com/i/Z5P7V) | 2 | [API](https://developer.fcoin.com) | China |
| | flowbtc | [flowBTC](https://trader.flowbtc.com) | 1 | [API](https://www.flowbtc.com.br/api.html) | Brazil |
| | foxbit | [FoxBit](https://foxbit.exchange) | 1 | [API](https://blinktrade.com/docs) | Brazil |
| | fybse | [FYB-SE](https://www.fybse.se) | * | [API](http://docs.fyb.apiary.io) | Sweden |
| | fybsg | [FYB-SG](https://www.fybsg.com) | * | [API](http://docs.fyb.apiary.io) | Singapore |
| | gatecoin | [Gatecoin](https://gatecoin.com) | * | [API](https://gatecoin.com/api) | Hong Kong |
| | gateio | [Gate.io](https://gate.io/) | 2 | [API](https://gate.io/api2) | China |
| | gdax | [GDAX](https://www.gdax.com) | * | [API](https://docs.gdax.com) | US |
| | gemini | [Gemini](https://gemini.com) | 1 | [API](https://docs.gemini.com/rest-api) | US |
| | getbtc | [GetBTC](https://getbtc.org) | * | [API](https://getbtc.org/api-docs.php) | St. Vincent & Grenadines, Russia |
| | hadax | [HADAX](https://www.huobi.br.com/en-us/topic/invited/?invite_code=rwrd3) | 1 | [API](https://github.com/huobiapi/API_Docs/wiki) | China |
| | hitbtc | [HitBTC](https://hitbtc.com/?ref_id=5a5d39a65d466) | 1 | [API](https://github.com/hitbtc-com/hitbtc-api/blob/master/APIv1.md) | Hong Kong |
| | hitbtc2 | [HitBTC v2](https://hitbtc.com/?ref_id=5a5d39a65d466) | 2 | [API](https://api.hitbtc.com) | Hong Kong |
| | huobi | [Huobi](https://www.huobi.com) | 3 | [API](https://github.com/huobiapi/API_Docs_en/wiki) | China |
| | huobicny | [Huobi CNY](https://www.huobi.br.com/en-us/topic/invited/?invite_code=rwrd3) | 1 | [API](https://github.com/huobiapi/API_Docs/wiki/REST_api_reference) | China |
| | huobipro | [Huobi Pro](https://www.huobi.br.com/en-us/topic/invited/?invite_code=rwrd3) | 1 | [API](https://github.com/huobiapi/API_Docs/wiki/REST_api_reference) | China |
| | ice3x | [ICE3X](https://ice3x.com) | * | [API](https://ice3x.co.za/ice-cubed-bitcoin-exchange-api-documentation-1-june-2017) | South Africa |
| | independentreserve | [Independent Reserve](https://www.independentreserve.com) | * | [API](https://www.independentreserve.com/API) | Australia, New Zealand |
| | indodax | [INDODAX](https://www.indodax.com) | 1.8 | [API](https://indodax.com/downloads/BITCOINCOID-API-DOCUMENTATION.pdf) | Indonesia |
| | itbit | [itBit](https://www.itbit.com) | 1 | [API](https://api.itbit.com/docs) | US |
| | jubi | [jubi.com](https://www.jubi.com) | 1 | [API](https://www.jubi.com/help/api.html) | China |
| | kraken | [Kraken](https://www.kraken.com) | 0 | [API](https://www.kraken.com/en-us/help/api) | US |
| | kucoin | [Kucoin](https://www.kucoin.com/?r=E5wkqe) | 1 | [API](https://kucoinapidocs.docs.apiary.io) | Hong Kong |
| | kuna | [Kuna](https://kuna.io) | 2 | [API](https://kuna.io/documents/api) | Ukraine |
| | lakebtc | [LakeBTC](https://www.lakebtc.com) | 2 | [API](https://www.lakebtc.com/s/api_v2) | US |
| | lbank | [LBank](https://www.lbank.info) | 1 | [API](https://github.com/LBank-exchange/lbank-official-api-docs) | China |
| | liqui | [Liqui](https://liqui.io) | 3 | [API](https://liqui.io/api) | Ukraine |
| | livecoin | [LiveCoin](https://www.livecoin.net) | * | [API](https://www.livecoin.net/api?lang=en) | US, UK, Russia |
| | luno | [luno](https://www.luno.com) | 1 | [API](https://www.luno.com/en/api) | UK, Singapore, South Africa |
| | lykke | [Lykke](https://www.lykke.com) | 1 | [API](https://hft-api.lykke.com/swagger/ui/) | Switzerland |
| | mercado | [Mercado Bitcoin](https://www.mercadobitcoin.com.br) | 3 | [API](https://www.mercadobitcoin.com.br/api-doc) | Brazil |
| | mixcoins | [MixCoins](https://mixcoins.com) | 1 | [API](https://mixcoins.com/help/api/) | UK, Hong Kong |
| | negociecoins | [NegocieCoins](https://www.negociecoins.com.br) | 3 | [API](https://www.negociecoins.com.br/documentacao-tradeapi) | Brazil |
| | nova | [Novaexchange](https://novaexchange.com) | 2 | [API](https://novaexchange.com/remote/faq) | Tanzania |
| | okcoincny | [OKCoin CNY](https://www.okcoin.cn) | 1 | [API](https://www.okcoin.cn/rest_getStarted.html) | China |
| | okcoinusd | [OKCoin USD](https://www.okcoin.com) | 1 | [API](https://www.okcoin.com/rest_getStarted.html) | China, US |
| | okex | [OKEX](https://www.okex.com) | 1 | [API](https://github.com/okcoin-okex/API-docs-OKEx.com) | China, US |
| | paymium | [Paymium](https://www.paymium.com) | 1 | [API](https://github.com/Paymium/api-documentation) | France, EU |
| | poloniex | [Poloniex](https://poloniex.com) | * | [API](https://poloniex.com/support/api/) | US |
| | qryptos | [QRYPTOS](https://www.qryptos.com) | 2 | [API](https://developers.quoine.com) | China, Taiwan |
| | quadrigacx | [QuadrigaCX](https://www.quadrigacx.com) | 2 | [API](https://www.quadrigacx.com/api_info) | Canada |
| | quoinex | [QUOINEX](https://quoinex.com/) | 2 | [API](https://developers.quoine.com) | Japan, Singapore, Vietnam |
| | southxchange | [SouthXchange](https://www.southxchange.com) | * | [API](https://www.southxchange.com/Home/Api) | Argentina |
| | surbitcoin | [SurBitcoin](https://surbitcoin.com) | 1 | [API](https://blinktrade.com/docs) | Venezuela |
| | therock | [TheRockTrading](https://therocktrading.com) | 1 | [API](https://api.therocktrading.com/doc/v1/index.html) | Malta |
| | tidebit | [TideBit](https://www.tidebit.com) | 2 | [API](https://www.tidebit.com/documents/api_v2) | Hong Kong |
| | tidex | [Tidex](https://tidex.com) | 3 | [API](https://tidex.com/exchange/public-api) | UK |
| | urdubit | [UrduBit](https://urdubit.com) | 1 | [API](https://blinktrade.com/docs) | Pakistan |
| | vaultoro | [Vaultoro](https://www.vaultoro.com) | 1 | [API](https://api.vaultoro.com) | Switzerland |
| | vbtc | [VBTC](https://vbtc.exchange) | 1 | [API](https://blinktrade.com/docs) | Vietnam |
| | virwox | [VirWoX](https://www.virwox.com) | * | [API](https://www.virwox.com/developers.php) | Austria, EU |
| | wex | [WEX](https://wex.nz) | 3 | [API](https://wex.nz/api/3/docs) | New Zealand |
| | xbtce | [xBTCe](https://www.xbtce.com) | 1 | [API](https://www.xbtce.com/tradeapi) | Russia |
| | yobit | [YoBit](https://www.yobit.net) | 3 | [API](https://www.yobit.net/en/api/) | Russia |
| | yunbi | [YUNBI](https://yunbi.com) | 2 | [API](https://yunbi.com/documents/api/guide) | China |
| | zaif | [Zaif](https://zaif.jp) | 1 | [API](http://techbureau-api-document.readthedocs.io/ja/latest/index.html) | Japan |
| | zb | [ZB](https://www.zb.com) | 1 | [API](https://www.zb.com/i/developer) | China |
The list above is updated frequently, new crypto markets, altcoin exchanges, bug fixes, API endpoints are introduced and added on a regular basis. See the [Manual](https://github.com/ccxt/ccxt/wiki) for details. If you don't find a cryptocurrency exchange market in the list above and/or want another exchange to be added, post or send us a link to it by opening an issue here on GitHub or via email.
The library is under [MIT license](https://github.com/ccxt/ccxt/blob/master/LICENSE.txt), that means it's absolutely free for any developer to build commercial and opensource software on top of it, but use it at your own risk with no warranties, as is.
## Install
The easiest way to install the ccxt library is to use builtin package managers:
- [ccxt in **NPM**](http://npmjs.com/package/ccxt) (JavaScript / Node v7.6+)
- [ccxt in **PyPI**](https://pypi.python.org/pypi/ccxt) (Python 2 and 3.5.3+)
- [ccxt in **Packagist/Composer**](https://packagist.org/packages/ccxt/ccxt) (PHP 5.3+)
This library is shipped as an all-in-one module implementation with minimalistic dependencies and requirements:
- [`js/`](https://github.com/ccxt/ccxt/blob/master/js/) in JavaScript
- [`python/`](https://github.com/ccxt/ccxt/blob/maste