mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-11 17:28:08 +00:00
commit
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
'use strict';
|
||||
|
||||
const ccxt = require ('ccxt');
|
||||
|
||||
console.log ('CCXT Version:', ccxt.version)
|
||||
|
||||
async function watchTrades (exchange, symbol) {
|
||||
|
||||
while (true) {
|
||||
try {
|
||||
const trades = await exchange.watchTrades (symbol)
|
||||
console.log (new Date (), exchange.id, symbol, trades.length, 'trades')
|
||||
} catch (e) {
|
||||
console.log (symbol, e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function main () {
|
||||
const symbols = [ 'USDT/THB', 'BTC/THB', 'ETH/THB' ]
|
||||
const exchange = new ccxt.pro.zipmex({
|
||||
'newUpdates': true
|
||||
})
|
||||
const markets = await exchange.loadMarkets ()
|
||||
exchange.verbose = true
|
||||
await Promise.all (symbols.map ((symbol) => watchTrades (exchange, symbol)))
|
||||
}
|
||||
|
||||
main()
|
||||
Reference in New Issue
Block a user