How to use the ccxt.coinmarketcap function in ccxt

To help you get started, we’ve selected a few ccxt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github michnovka / ccxt-trading-cp / config-reader.js View on Github external
if(config_object.exchanges_unencrypted[i].inactive)
                        module.exports.exchanges_inactive[exchange_id] = exchange;
                    else
                        module.exports.exchanges[exchange_id] = exchange;
                }
            }
        }

        let default_exchange_for_fiat = 'okcoinusd';

        if(config_object.hasOwnProperty('exchange_for_fiat'))
            default_exchange_for_fiat = config_object.exchange_for_fiat;

        module.exports.exchange_for_fiat = new ccxt[default_exchange_for_fiat]();

        module.exports.coinmarketcap = new ccxt.coinmarketcap();

    }catch (e){
        // invalid config file
        console.log(e);
        process.exit();
    }

    return true;

}