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
21
lib/plugins/exchange/cex.js
Normal file
21
lib/plugins/exchange/cex.js
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
const { COINS } = require('lamassu-coins')
|
||||
const _ = require('lodash/fp')
|
||||
|
||||
const { ORDER_TYPES } = require('./consts')
|
||||
|
||||
const ORDER_TYPE = ORDER_TYPES.MARKET
|
||||
const { BTC, BCH, DASH, ETH, LTC, USDT } = COINS
|
||||
const CRYPTO = [BTC, ETH, LTC, DASH, BCH, USDT]
|
||||
const FIAT = ['USD', 'EUR']
|
||||
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 }
|
||||
}
|
||||
|
||||
// Documentation mentions a field 'nonce', doesn't specify if it's mandatory
|
||||
// or not but we should pay attention to this when testing
|
||||
|
||||
module.exports = { loadConfig, REQUIRED_CONFIG_FIELDS, CRYPTO, FIAT, ORDER_TYPE }
|
||||
Loading…
Add table
Add a link
Reference in a new issue