feat: add support for binance.us, cex.io and ftx
This commit is contained in:
parent
2040c388b8
commit
01114d01e4
12 changed files with 194 additions and 3 deletions
19
lib/plugins/exchange/ftx.js
Normal file
19
lib/plugins/exchange/ftx.js
Normal 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 }
|
||||
Loading…
Add table
Add a link
Reference in a new issue