mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-09 08:18:07 +00:00
29 lines
479 B
JavaScript
29 lines
479 B
JavaScript
|
|
|
|
import ccxt from '../../js/ccxt.js';
|
|
|
|
async function main () {
|
|
|
|
console.log ('CCXT Version:', ccxt.version)
|
|
|
|
const exchange = new ccxt.bitrue ({
|
|
"apiKey": "YOUR_API_KEY",
|
|
"secret": "YOUR_SECRET",
|
|
})
|
|
|
|
await exchange.loadMarkets ()
|
|
|
|
exchange.verbose = true
|
|
|
|
try {
|
|
|
|
const balance = await exchange.fetchBalance ()
|
|
console.log (balance)
|
|
|
|
} catch (e) {
|
|
console.log (e.constructor.name, e.message);
|
|
}
|
|
}
|
|
|
|
main ()
|