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.
'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]) } }) ()
import ccxtpro import asyncio async def main(): exchange = ccxtpro.binance({'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())
require_once 'vendor/autoload.php'; $exchange = new \ccxtpro\binance(array('enableRateLimit' => true)); $exchange::execute_and_run(function() use ($exchange) { while (true) { $orderbook = yield $exchange->watch_order_book('ETH/BTC'); echo date('c '), json_encode(array($orderbook['asks'][0], $orderbook['bids'][0])), "\n"; } });