MCPcopy Create free account
hub / github.com/ccxt/node-binance-api / dLiquidationConvertData

Method dLiquidationConvertData

src/node-binance-api.ts:2693–2709  ·  view source on GitHub ↗

* Converts the delivery liquidation stream data into a friendly object * @param {object} data - liquidation data callback data type * @return {object} - user friendly data type

(data: any)

Source from the content-addressed store, hash-verified

2691 * @return {object} - user friendly data type
2692 */
2693 dLiquidationConvertData(data: any) {
2694 const eventType = data.e, eventTime = data.E;
2695 const {
2696 s: symbol,
2697 S: side,
2698 o: orderType,
2699 f: timeInForce,
2700 q: origAmount,
2701 p: price,
2702 ap: avgPrice,
2703 X: orderStatus,
2704 l: lastFilledQty,
2705 z: totalFilledQty,
2706 T: tradeTime
2707 } = data.o;
2708 return { symbol, side, orderType, timeInForce, origAmount, price, avgPrice, orderStatus, lastFilledQty, totalFilledQty, eventType, tradeTime, eventTime };
2709 }
2710
2711 /**
2712 * Converts the delivery ticker stream data into a friendly object

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected