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

@ex-master/core

Package Overview
Dependencies
Maintainers
2
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ex-master/core - npm Package Compare versions

Comparing version 0.3.17 to 0.3.18

6

bld/library/spot-market-utility.js

@@ -168,3 +168,3 @@ "use strict";

let cacheKey = `get-market-price-from-kline-${stockKey}-${moneyKey}-${startOfMinuteTimestamp}`;
let klineEntries = yield v.retry(() => this.spotClient.getKLine({ stock: stockKey, money: moneyKey }, timestamp, Date.now(), ONE_MINUTE_MILLISECONDS), { limit: 3, interval: 2000 });
let klineEntries = yield v.retry(() => this.spotClient.getKLine({ stock: stockKey, money: moneyKey }, timestamp, Date.now(), 5 * ONE_MINUTE_MILLISECONDS), { limit: 3, interval: 2000 });
if (!klineEntries || !klineEntries.length) {

@@ -174,4 +174,4 @@ return undefined;

let candleEntry = klineEntries[klineEntries.length - 1];
let close = candleEntry.close;
let price = Number(close);
let { open, close } = candleEntry;
let price = (open + close) / 2;
this.cache.set(cacheKey, price, 10 * 1000);

@@ -178,0 +178,0 @@ return price;

{
"name": "@ex-master/core",
"version": "0.3.17",
"version": "0.3.18",
"main": "bld/library/index.js",

@@ -27,3 +27,3 @@ "types": "bld/library/index.d.ts",

},
"gitHead": "173b1bc1a3bbf1640ce3cc51624cc1182dd8e23f"
"gitHead": "394850621a5aba487b292c7537d9281c22321a2c"
}

@@ -265,3 +265,3 @@ import {Cache} from '@ex-master/utilities/cache';

Date.now(),
ONE_MINUTE_MILLISECONDS,
5 * ONE_MINUTE_MILLISECONDS,
),

@@ -276,5 +276,5 @@ {limit: 3, interval: 2000},

let candleEntry = klineEntries[klineEntries.length - 1];
let close = candleEntry.close;
let {open, close} = candleEntry;
let price = Number(close);
let price = (open + close) / 2;

@@ -281,0 +281,0 @@ this.cache.set(cacheKey, price, 10 * 1000);

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