UNPKG

ccxt-look

Version:

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

23 lines (19 loc) 657 B
'use strict'; const assert = require ('assert') , testLeverageTier = require ('./test.leverageTier.js') module.exports = async (exchange, symbol) => { const method = 'fetchMarketLeverageTiers'; if (exchange.has[method]) { const tiers = await exchange [method] (symbol); console.log (method + 'for ' + symbol); const arrayLength = tiers.length; assert (arrayLength >= 1); for (let j=0; j < tiers.length; j++) { const tier = tiers[j]; testLeverageTier (exchange, method, tier); } return tiers; } else { console.log (method + ' not supported'); } }