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

@lunch-money/binance-to-lunch-money

Package Overview
Dependencies
Maintainers
5
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lunch-money/binance-to-lunch-money - npm Package Compare versions

Comparing version 1.2.1 to 1.3.0

17

dist/cjs/main.js

@@ -26,16 +26,5 @@ "use strict";

const client = binanceClientConstructor(Object.assign({}, config));
const snapshot = yield client.accountSnapshot({
// We only query for spot traded token balances. Note that we can also
// query for margin and future trading balances, but how that would be
// displayed in Lunch Money is a more complicated question.
type: 'SPOT',
});
// Status code other than 200 means error, c.f.
// https://github.com/Ashlar/binance-api-node#dailyAccountSnapshot
if (snapshot.code !== 200) {
throw new Error(`Attempt to query for Binance account balance returned ` +
`non-200 status code ${snapshot.code} with message ${snapshot.msg}.`);
}
const balances = snapshot.snapshotVos
.flatMap((v) => v.data.balances)
const snapshot = yield client.accountInfo();
const balances = snapshot.balances
.filter((v) => Number(v.locked) !== 0 || Number(v.free) !== 0)
.map((b) => ({

@@ -42,0 +31,0 @@ asset: b.asset,

@@ -8,16 +8,5 @@ import { default as Binance } from 'binance-api-node';

const client = binanceClientConstructor({ ...config });
const snapshot = await client.accountSnapshot({
// We only query for spot traded token balances. Note that we can also
// query for margin and future trading balances, but how that would be
// displayed in Lunch Money is a more complicated question.
type: 'SPOT',
});
// Status code other than 200 means error, c.f.
// https://github.com/Ashlar/binance-api-node#dailyAccountSnapshot
if (snapshot.code !== 200) {
throw new Error(`Attempt to query for Binance account balance returned ` +
`non-200 status code ${snapshot.code} with message ${snapshot.msg}.`);
}
const balances = snapshot.snapshotVos
.flatMap((v) => v.data.balances)
const snapshot = await client.accountInfo();
const balances = snapshot.balances
.filter((v) => Number(v.locked) !== 0 || Number(v.free) !== 0)
.map((b) => ({

@@ -24,0 +13,0 @@ asset: b.asset,

2

package.json

@@ -10,3 +10,3 @@ {

"homepage": "https://github.com/lunch-money/binance-to-lunch-money#README",
"version": "1.2.1",
"version": "1.3.0",
"license": "MIT",

@@ -13,0 +13,0 @@ "keywords": [

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