Contents:
[Responce](#Responce)
Auth: true
params:
params: { currencyId: { type: 'string', optional: true, }, type: { type: 'string', optional: true, }, from: { type: 'string', optional: false, }, to: { type: 'string', optional: false, }, },
Responce:
For trading (columns):
Timestamp - standart date format
Example: Mon May 13 2024 14:24:31 GMT+0000 (Coordinated Universal Time)
Market pair - string with base and quotation currency take from trade
Example: BNB-BTC
Side - Selects one of the values
"buy"
,"sell"
values according to the following rule
ctx.meta.user.id === trade?.buyUserId ? 'buy' : 'sell';
Example: sell
OR buy
Price - take from trade
Example: 0.112
Amount - take from trade
Example: 0.101
Total - take from trade
Example: 0.011312
Fee - The value and accuracy are taken by the following formula
const fee = side === trade?.makerOrderSide ? side === 'buy' ? trade.maker_fee.toFixed(currenciesMap[base_currency]) : trade.maker_fee.toFixed(currenciesMap[quote_currency]) : side === 'buy' ? trade.taker_fee.toFixed(currenciesMap[base_currency]) : trade.taker_fee.toFixed(currenciesMap[quote_currency])
Example: 0.00022624
Role - The value is taken by the following formula
const role = trade?.makerOrderSide === side ? 'Maker' : 'Taker';
Example: Maker
OR Taker