Skip to content

Commit

Permalink
updated examples/js/symbols.js
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed Dec 6, 2017
1 parent b1fc503 commit e951e2a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions examples/js/symbols.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ const log = require ('ololog')

require ('ansicolor').nice;

//-----------------------------------------------------------------------------

const verbose = process.argv.includes ('--verbose')
const debug = process.argv.includes ('--debug')

//-----------------------------------------------------------------------------

let printSupportedExchanges = function () {
log ('Supported exchanges:', ccxt.exchanges.join (', ').green)
}
Expand All @@ -25,7 +32,7 @@ let printSymbols = async (id) => {

// instantiate the exchange by id
let exchange = new ccxt[id] ({
// 'verbose': true,
verbose,
// 'proxy': 'https://cors-anywhere.herokuapp.com/',
// 'proxy': 'https://crossorigin.me/',
})
Expand All @@ -37,7 +44,8 @@ let printSymbols = async (id) => {
log (id.green, 'has', exchange.symbols.length, 'symbols:', exchange.symbols.join (', ').yellow)

// debug log
Object.values (markets).forEach (market => log (market))
if (debug)
Object.values (markets).forEach (market => log (market))

// make a table of all markets
let table = asTable.configure ({ delimiter: ' | ' }) (ccxt.sortBy (Object.values (markets), 'symbol'))
Expand Down

0 comments on commit e951e2a

Please sign in to comment.