attach ts and send ack on subscribe

This commit is contained in:
Nour Alharithi
2024-01-19 12:37:49 -08:00
parent 207521e95c
commit fe19c821af
3 changed files with 15 additions and 5 deletions

View File

@@ -124,6 +124,7 @@ export class DLOBSubscriberIO extends DLOBSubscriber {
l2Formatted['marketName'] = marketName?.toUpperCase();
l2Formatted['marketType'] = marketType?.toLowerCase();
l2Formatted['marketIndex'] = l2Args.marketIndex;
l2Formatted['ts'] = Date.now();
l2Formatted['slot'] = slot;
addOracletoResponse(
l2Formatted,
@@ -137,7 +138,7 @@ export class DLOBSubscriberIO extends DLOBSubscriber {
l2Args.marketType,
l2Args.marketIndex
);
const l2Formatted_depth100 = Object.assign({}, l2Formatted, {
bids: l2Formatted.bids.slice(0, 100),
asks: l2Formatted.asks.slice(0, 100),