mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-10 16:58:08 +00:00
commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
- [Basic Orderbook Polling](./examples/js/)
|
||||
|
||||
|
||||
```javascript
|
||||
import ccxt from '../../js/ccxt.js';
|
||||
|
||||
const id = 'huobipro', exchange = new ccxt[id] ({ enableRateLimit: true }), symbol = 'ETH/BTC';(async function main () {
|
||||
|
||||
await exchange.loadMarkets ()
|
||||
|
||||
for (let i = 0; i < 2000; i++) {
|
||||
|
||||
const orderbook = await exchange.fetchOrderBook (symbol)
|
||||
console.log (new Date (), i, symbol, orderbook.asks[0], orderbook.bids[0])
|
||||
}
|
||||
|
||||
}) ()
|
||||
```
|
||||
Reference in New Issue
Block a user