feat: add support for binance.us, cex.io and ftx

This commit is contained in:
José Oliveira 2021-08-04 17:56:37 +01:00
parent 2040c388b8
commit 01114d01e4
12 changed files with 194 additions and 3 deletions

View file

@ -0,0 +1,19 @@
const { COINS } = require('lamassu-coins')
const _ = require('lodash/fp')
const { ORDER_TYPES } = require('./consts')
const ORDER_TYPE = ORDER_TYPES.MARKET
const { BTC, BCH, ETH, LTC, USDT } = COINS
const CRYPTO = [BTC, ETH, LTC, BCH, USDT]
// ftx supports EUR as well but only for certain cryptos: ETH, BTC
const FIAT = ['USD']
const REQUIRED_CONFIG_FIELDS = ['apiKey', 'privateKey']
const loadConfig = (account) => {
const mapper = {}
const mapped = _.mapKeys(key => mapper[key] ? mapper[key] : key)(account)
return { ...mapped, timeout: 3000 }
}
module.exports = { loadConfig, REQUIRED_CONFIG_FIELDS, CRYPTO, FIAT, ORDER_TYPE }