Skip to content

fenris85/ccxt-clone

Repository files navigation

CCXT Pro – A JavaScript / Python / PHP cryptocurrency exchange trading WebSocket API for professionals  

CCXT Pro is a professional tool for algorithmic crypto-trading. It is a high-performance superset of the CCXT library, one of the world's leading open-source frameworks for crypto finance. CCXT Pro includes the standard CCXT library and wraps it with powerful new features and useful enhancements.

Features:

  • Unified public and private WebSockets APIs
  • Auto-connection and re-connection
  • Connection timeouts
  • Re-connection exponential backoff delay
  • Keep-alive ping-pong
  • Proxies
  • Backward-compatible CCXT ←→ CCXT Pro adapters
  • FIX protocol transports planned

Exchanges

The CCXT Pro library currently supports the following 27 cryptocurrency exchange markets and WebSocket trading APIs:

logo id name ver doc certified pro
bequant bequant Bequant 2 API CCXT Pro
binance binance Binance * API CCXT Certified CCXT Pro
binanceus binanceus Binance US * API CCXT Pro
bitcoincom bitcoincom bitcoin.com 2 API CCXT Pro
bitfinex bitfinex Bitfinex 1 API CCXT Certified CCXT Pro
bitmex bitmex BitMEX 1 API CCXT Pro
bitstamp bitstamp Bitstamp 2 API CCXT Pro
bittrex bittrex Bittrex 3 API CCXT Certified CCXT Pro
bitvavo bitvavo Bitvavo 2 API CCXT Certified CCXT Pro
coinbaseprime coinbaseprime Coinbase Prime * API CCXT Pro
coinbasepro coinbasepro Coinbase Pro * API CCXT Pro
currencycom currencycom Currency.com 1 API CCXT Certified CCXT Pro
ftx ftx FTX * API CCXT Certified CCXT Pro
gateio gateio Gate.io 2 API CCXT Pro
gopax gopax GOPAX 1 API CCXT Certified CCXT Pro
hitbtc hitbtc HitBTC 2 API CCXT Pro
huobijp huobijp Huobi Japan 1 API CCXT Pro
huobipro huobipro Huobi Pro 1 API CCXT Pro
idex idex IDEX 2 API CCXT Certified CCXT Pro
kraken kraken Kraken 0 API CCXT Certified CCXT Pro
kucoin kucoin KuCoin 2 API CCXT Pro
okcoin okcoin OKCoin 3 API CCXT Pro
okex okex OKEX 3 API CCXT Pro
phemex phemex Phemex 1 API CCXT Pro
poloniex poloniex Poloniex * API CCXT Pro
ripio ripio Ripio 1 API CCXT Pro
upbit upbit Upbit 1 API CCXT Pro

License

See LICENSE.txt for details

Important Notes

- It is illegal to publish, distribute or sell the CCXT Pro source code without a separate permission from us.
- Violation of the licensing terms will trigger a ban followed by a legal pursuit.

The CCXT Pro is hosted in a private repository on GitHub. The access to the repository is licensed and granted by invitation only on a paid basis. In order to access the repository, the users must obtain prepaid subscription plans at https://ccxt.pro. The users pay for the continued access to the repository, including updates, support and maintenance (new exchanges, improvements, bugfixes and so on).

CCXT Pro does not enforce technical restrictions that would affect the efficiency of direct communications between the users and the exchanges. The protection is not technical but legal. We do not impose unnecessary limitations or intermediary code. If your CCXT Pro license expires, your software or system will not break down and will keep working fine with your most recent version by that time. However, if you discontinue your paid license you will lose the updates that will follow.

Any licensed user, developer, team, or company, having obtained paid access to the CCXT Pro repository from us, can use CCXT Pro as a dependency, subject to the terms and limitations of the CCXT Pro paid subscription plans.

Licensees can use, copy, and modify CCXT Pro as long as they
DO NOT VENDOR, PUBLISH, SELL OR DISTRIBUTE THE SOURCE CODE OF CCXT PRO.

It is allowed to specify CCXT Pro as a dependency of your software as long as you
DO NOT INCLUDE A COPY OF THE CCXT PRO SOURCE CODE IN YOUR SOFTWARE.

If you are a software developer you should specify CCXT Pro as your requirement. The end-user of your software is responsible for obtaining his own individual CCXT Pro license. The best practice is to make it clear in your docs or on your website. Since CCXT and CCXT Pro are interchangeable, auto-detection can be factored-in to let the end-user choose between the free CCXT and the paid CCXT Pro.

Thank you for using CCXT Pro legally!

Install

Installing CCXT Pro requires visiting the https://ccxt.pro website and obtaining a CCXT Pro license. The license gives the access to the CCXT Pro codebase in a private GitHub repository.

- this part of the doc is currenty a work in progress
- there may be some issues and missing implementations here and there
- contributions, pull requests and feedback appreciated

JavaScript

# in your project directory

# if you're using Git/HTTPS authentication
npm install git+https://github.com/kroitor/ccxt.pro.git

# if you are connecting to GitHub with SSH
npm install ssh://git@github.com/kroitor/ccxt.pro.git
# or
npm install git@ssh://github.com/kroitor/ccxt.pro.git
# or if you have git and github.com in your ~/.ssh/config
npm install ssh://github.com/kroitor/ccxt.pro.git

Python

# if you're using Git/HTTPS authentication
pip3 install git+https://github.com/kroitor/ccxt.pro.git#subdirectory=python

# if you are connecting to GitHub with SSH
pip3 install git+ssh://git@github.com/kroitor/ccxt.pro.git#subdirectory=python

PHP

# in your project directory
composer config repositories.ccxtpro '{"type": "git", "url": "https://github.com/kroitor/ccxt.pro.git"}'
composer require ccxt/ccxtpro

Documentation

Read the Manual for more details.

Usage

JavaScript

'use strict';
const ccxtpro = require ('ccxt.pro');

(async () => {
    const exchange = new ccxtpro.binance ({ enableRateLimit: true })
    while (true) {
        const orderbook = await exchange.watchOrderBook ('ETH/BTC')
        console.log (new Date (), orderbook['asks'][0], orderbook['bids'][0])
    }
}) ()

Python

import ccxtpro
import asyncio

async def main():
    exchange = ccxtpro.poloniex({'enableRateLimit': True})
    while True:
        orderbook = await exchange.watch_order_book('ETH/BTC')
        print(orderbook['asks'][0], orderbook['bids'][0])

asyncio.get_event_loop().run_until_complete(main())

PHP

require_once 'vendor/autoload.php';

$loop = \React\EventLoop\Factory::create();
$exchange = new \ccxtpro\bitfinex(array('enableRateLimit' => true, 'loop' => $loop));

$main = function () use (&$exchange, &$main) {
  $exchange->watch_order_book('ETH/BTC')->then(function($ob) use (&$main) {
    echo date('c '), json_encode(array($ob['asks'][0], $ob['bids'][0])), "\n";
    $main();
  });
};

$loop->futureTick($main);
$loop->run ();

Support

© 2020 CCXT Pro

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published