refactor: add trade id to trade entry object
This commit is contained in:
parent
700244e45b
commit
9b4bae4097
3 changed files with 10 additions and 8 deletions
|
|
@ -8,7 +8,8 @@ const { ORDER_TYPES } = require('./consts')
|
|||
const DEFAULT_PRICE_PRECISION = 2
|
||||
const DEFAULT_AMOUNT_PRECISION = 8
|
||||
|
||||
function trade (side, account, cryptoAtoms, fiatCode, cryptoCode, exchangeName, tradeId) {
|
||||
function trade (side, account, tradeEntry, exchangeName) {
|
||||
const { cryptoAtoms, fiatCode, cryptoCode, tradeId } = tradeEntry
|
||||
try {
|
||||
const exchangeConfig = ALL[exchangeName]
|
||||
if (!exchangeConfig) throw Error('Exchange configuration not found')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue