Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tardis-dev

Package Overview
Dependencies
Maintainers
1
Versions
272
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tardis-dev - npm Package Compare versions

Comparing version 13.1.7 to 13.1.8

1

dist/mappers/bitmex.d.ts

@@ -55,2 +55,3 @@ import { BookChange, BookTicker, DerivativeTicker, FilterForExchange, Liquidation, Trade } from '../types';

price?: number;
timestamp?: string;
}[];

@@ -57,0 +58,0 @@ };

@@ -90,3 +90,15 @@ "use strict";

const asks = [];
let latestBitmexTimestamp = undefined;
for (const item of bitmexBookMessagesGrouppedBySymbol[symbol]) {
if (item.timestamp !== undefined) {
const priceLevelTimestamp = new Date(item.timestamp);
if (latestBitmexTimestamp === undefined) {
latestBitmexTimestamp = priceLevelTimestamp;
}
else {
if (priceLevelTimestamp.valueOf() > latestBitmexTimestamp.valueOf()) {
latestBitmexTimestamp = priceLevelTimestamp;
}
}
}
// https://www.bitmex.com/app/restAPI#OrderBookL2

@@ -124,3 +136,3 @@ if (item.price !== undefined) {

asks,
timestamp: localTimestamp,
timestamp: latestBitmexTimestamp !== undefined ? latestBitmexTimestamp : localTimestamp,
localTimestamp: localTimestamp

@@ -127,0 +139,0 @@ };

2

package.json
{
"name": "tardis-dev",
"version": "13.1.7",
"version": "13.1.8",
"engines": {

@@ -5,0 +5,0 @@ "node": ">=12"

@@ -103,4 +103,16 @@ import { asNumberIfValid, upperCaseSymbols } from '../handy'

const asks: BookPriceLevel[] = []
let latestBitmexTimestamp: Date | undefined = undefined
for (const item of bitmexBookMessagesGrouppedBySymbol[symbol]) {
if (item.timestamp !== undefined) {
const priceLevelTimestamp = new Date(item.timestamp)
if (latestBitmexTimestamp === undefined) {
latestBitmexTimestamp = priceLevelTimestamp
} else {
if (priceLevelTimestamp.valueOf() > latestBitmexTimestamp.valueOf()) {
latestBitmexTimestamp = priceLevelTimestamp
}
}
}
// https://www.bitmex.com/app/restAPI#OrderBookL2

@@ -140,3 +152,3 @@ if (item.price !== undefined) {

asks,
timestamp: localTimestamp,
timestamp: latestBitmexTimestamp !== undefined ? latestBitmexTimestamp : localTimestamp,
localTimestamp: localTimestamp

@@ -319,2 +331,3 @@ }

price?: number
timestamp?: string
}[]

@@ -321,0 +334,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc