Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Fix #1184 cexio update-products.sh #1194

Merged
merged 1 commit into from
Jan 22, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 22 additions & 21 deletions extensions/exchanges/cexio/update-products.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
#!/usr/bin/env node
const ccxt = require('ccxt')
const path = require('path')
var client = new ccxt.cex()
client.fetchMarkets().then(result => {
var products = []
result.forEach(function (product) {
products.push({
asset: product.info.symbol1,
currency: product.info.symbol2,
min_size: product.info.minLotSize.toString(),
max_size: product.info.maxLotSize != null ? product.info.maxLotSize.toString() : product.info.maxLotSize,
increment: product.info.symbol1 === 'BTC' ? '0.01' : (product.info.symbol2 === 'BTC' ? '0.00000001' : '0.0001'),
label: product.id
})
})
var target = path.resolve(__dirname, 'products.json')
require('fs').writeFileSync(target, JSON.stringify(products, null, 2))
console.log('wrote', target)
process.exit()
})
#!/usr/bin/env node

const ccxt = require('ccxt')
const path = require('path')
var client = new ccxt.cex()
client.fetchMarkets().then(result => {
var products = []
result.forEach(function (product) {
products.push({
asset: product.info.symbol1,
currency: product.info.symbol2,
min_size: product.info.minLotSize.toString(),
max_size: product.info.maxLotSize != null ? product.info.maxLotSize.toString() : product.info.maxLotSize,
increment: product.info.symbol1 === 'BTC' ? '0.01' : (product.info.symbol2 === 'BTC' ? '0.00000001' : '0.0001'),
label: product.id
})
})
var target = path.resolve(__dirname, 'products.json')
require('fs').writeFileSync(target, JSON.stringify(products, null, 2))
console.log('wrote', target)
process.exit()
})