UNPKG

ccxt-xigua

Version:

A JavaScript / Python / PHP cryptocurrency trading library with support for 130+ exchanges

26 lines (15 loc) 574 B
'use strict' // ---------------------------------------------------------------------------- const testBalance = require ('./test.balance.js') // ---------------------------------------------------------------------------- module.exports = async (exchange) => { const method = 'fetchBalance' if (!(exchange.has[method])) { console.log (exchange.id, method + '() is not supported') return } console.log ('fetching balance...') const response = await exchange[method] () testBalance (exchange, response) return response }