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

binance-api-node

Package Overview
Dependencies
Maintainers
1
Versions
180
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

binance-api-node - npm Package Compare versions

Comparing version 0.11.8 to 0.11.9

4

dist/http-client.js

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

var headers = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
return sendResult(fetch("".concat(!(path.includes('/fapi') || path.includes('/futures')) ? endpoints.base : endpoints.futures).concat(path).concat(makeQueryString(data)), {
return sendResult(fetch("".concat(!(path.includes('/fapi') || path.includes('/futures')) || path.includes('/sapi') ? endpoints.base : endpoints.futures).concat(path).concat(makeQueryString(data)), {
method: method,

@@ -218,3 +218,3 @@ json: true,

});
return sendResult(fetch("".concat(!(path.includes('/fapi') || path.includes('/futures')) ? endpoints.base : endpoints.futures).concat(path).concat(noData ? '' : makeQueryString(newData)), {
return sendResult(fetch("".concat(!(path.includes('/fapi') || path.includes('/futures')) || path.includes('/sapi') ? endpoints.base : endpoints.futures).concat(path).concat(noData ? '' : makeQueryString(newData)), {
method: method,

@@ -221,0 +221,0 @@ headers: {

@@ -168,5 +168,5 @@ // tslint:disable:interface-name

export interface SetBNBBurnOptions {
spotBNBBurn: boolean;
interestBNBBurn: boolean;
recvWindow?: number;
spotBNBBurn: boolean
interestBNBBurn: boolean
recvWindow?: number
}

@@ -230,3 +230,3 @@

MINING_UMFUTURE = 'MINING_UMFUTURE',
MINING_C2C = 'MINING_C2C'
MINING_C2C = 'MINING_C2C',
}

@@ -262,5 +262,23 @@

export interface MarginBorrowParent {
asset: string
isIsolated?: 'TRUE' | 'FALSE'
amount: string
recvWindow?: number
}
export interface MarginBorrowCross extends MarginBorrowParent {
isIsolated?: 'FALSE'
}
export interface MarginBorrowIsolated extends MarginBorrowParent {
isIsolated: 'TRUE'
symbol: string
}
export type MarginBorrowOptions = MarginBorrowCross | MarginBorrowIsolated
export enum MarginType {
ISOLATED = "ISOLATED",
CROSSED = "CROSSED"
ISOLATED = 'ISOLATED',
CROSSED = 'CROSSED',
}

@@ -423,4 +441,4 @@

origClientOrderId?: string
recvWindow?: number,
timestamp?: number,
recvWindow?: number
timestamp?: number
}): Promise<QueryFuturesOrderResult>

@@ -433,3 +451,3 @@ futuresOpenOrders(options: {

futuresLeverageBracket(options?: {
symbol?: string,
symbol?: string
recvWindow: number

@@ -483,12 +501,4 @@ }): Promise<LeverageBracketResult[]>

}): Promise<QueryOrderResult[]>
marginRepay(options: {
asset: string
amount: number
useServerTime?: boolean
}): Promise<{ tranId: number }>
marginLoan(options: {
asset: string
amount: number
useServerTime?: boolean
}): Promise<{ tranId: number }>
marginRepay(options: MarginBorrowOptions): Promise<{ tranId: number }>
marginLoan(options: MarginBorrowOptions): Promise<{ tranId: number }>
marginAccountInfo(options?: { recvWindow?: number }): Promise<IsolatedCrossAccount>

@@ -635,3 +645,3 @@ marginIsolatedAccount(options?: {

REQUEST_WEIGHT = 'REQUEST_WEIGHT',
ORDERS = 'ORDERS'
ORDERS = 'ORDERS',
}

@@ -647,3 +657,3 @@

MINUTE = 'MINUTE',
DAY = 'DAY'
DAY = 'DAY',
}

@@ -660,3 +670,3 @@

EXCHANGE_MAX_NUM_ORDERS = 'EXCHANGE_MAX_NUM_ORDERS',
EXCHANGE_MAX_ALGO_ORDERS = 'EXCHANGE_MAX_ALGO_ORDERS'
EXCHANGE_MAX_ALGO_ORDERS = 'EXCHANGE_MAX_ALGO_ORDERS',
}

@@ -675,3 +685,3 @@

MAX_NUM_ORDERS = 'MAX_NUM_ORDERS',
MAX_ALGO_ORDERS = 'MAX_ALGO_ORDERS'
MAX_ALGO_ORDERS = 'MAX_ALGO_ORDERS',
}

@@ -844,3 +854,3 @@

MARGIN_BUY = 'MARGIN_BUY',
AUTO_REPAY = 'AUTO_REPAY'
AUTO_REPAY = 'AUTO_REPAY',
}

@@ -880,24 +890,24 @@

export interface FuturesOrder {
clientOrderId: string,
cumQty: string,
cumQuote: string,
executedQty: string,
orderId: number,
avgPrice: string,
origQty: string,
price: string,
reduceOnly: boolean,
side: OrderSide,
positionSide: PositionSide,
status: OrderStatus,
stopPrice: string,
closePosition: boolean,
symbol: string,
timeInForce: TimeInForce,
type: OrderType,
origType: OrderType,
activatePrice: string,
priceRate: string,
updateTime: number,
workingType: WorkingType,
clientOrderId: string
cumQty: string
cumQuote: string
executedQty: string
orderId: number
avgPrice: string
origQty: string
price: string
reduceOnly: boolean
side: OrderSide
positionSide: PositionSide
status: OrderStatus
stopPrice: string
closePosition: boolean
symbol: string
timeInForce: TimeInForce
type: OrderType
origType: OrderType
activatePrice: string
priceRate: string
updateTime: number
workingType: WorkingType
}

@@ -908,3 +918,3 @@

ALL_DONE = 'ALL_DONE',
REJECT = 'REJECT'
REJECT = 'REJECT',
}

@@ -915,3 +925,3 @@

EXEC_STARTED = 'EXEC_STARTED',
ALL_DONE = 'ALL_DONE'
ALL_DONE = 'ALL_DONE',
}

@@ -937,3 +947,3 @@

BUY = 'BUY',
SELL = 'SELL'
SELL = 'SELL',
}

@@ -948,3 +958,3 @@

PENDING_CANCEL = 'PENDING_CANCEL',
REJECTED = 'REJECTED'
REJECTED = 'REJECTED',
}

@@ -961,3 +971,3 @@

TAKE_PROFIT_MARKET = 'TAKE_PROFIT_MARKET',
TRAILING_STOP_MARKET = 'TRAILING_STOP_MARKET'
TRAILING_STOP_MARKET = 'TRAILING_STOP_MARKET',
}

@@ -968,3 +978,3 @@

RESULT = 'RESULT',
FULL = 'FULL'
FULL = 'FULL',
}

@@ -975,3 +985,3 @@

IOC = 'IOC',
FOK = 'FOK'
FOK = 'FOK',
}

@@ -999,3 +1009,3 @@

TRADE = 'TRADE',
EXPIRED = 'EXPIRED'
EXPIRED = 'EXPIRED',
}

@@ -1106,3 +1116,3 @@

EXECUTION_REPORT = 'executionReport',
ACCOUNT_UPDATE = 'ACCOUNT_UPDATE'
ACCOUNT_UPDATE = 'ACCOUNT_UPDATE',
}

@@ -1213,3 +1223,3 @@

id: number
maker: boolean,
maker: boolean
orderId: number

@@ -1421,3 +1431,3 @@ price: string

export interface LeverageBracketResult {
symbol: string,
symbol: string
brackets: Bracket[]

@@ -1427,8 +1437,8 @@ }

export interface Bracket {
bracket: number, // Notional bracket
initialLeverage: number, // Max initial leverage for this bracket
notionalCap: number, // Cap notional of this bracket
notionalFloor: number, // Notional threshold of this bracket
maintMarginRatio: number, // Maintenance ratio for this bracket
cum: 0, // Auxiliary number for quick calculation
bracket: number // Notional bracket
initialLeverage: number // Max initial leverage for this bracket
notionalCap: number // Cap notional of this bracket
notionalFloor: number // Notional threshold of this bracket
maintMarginRatio: number // Maintenance ratio for this bracket
cum: 0 // Auxiliary number for quick calculation
}

@@ -1483,5 +1493,5 @@

export interface FuturesLeverageResult {
leverage: number;
maxNotionalValue: number;
symbol: string;
leverage: number
maxNotionalValue: number
symbol: string
}

@@ -1500,3 +1510,3 @@

COMMISSION = 'COMMISSION',
INSURANCE_CLEAR = 'INSURANCE_CLEAR'
INSURANCE_CLEAR = 'INSURANCE_CLEAR',
}

@@ -1525,19 +1535,19 @@

export interface IsolatedCrossAccount {
borrowEnabled: boolean,
marginLevel: string,
totalAssetOfBtc: string,
totalLiabilityOfBtc: string,
totalNetAssetOfBtc: string,
tradeEnabled: boolean,
transferEnabled: boolean,
userAssets: CrossAsset[],
borrowEnabled: boolean
marginLevel: string
totalAssetOfBtc: string
totalLiabilityOfBtc: string
totalNetAssetOfBtc: string
tradeEnabled: boolean
transferEnabled: boolean
userAssets: CrossAsset[]
}
export interface CrossAsset {
asset: string,
borrowed: string,
free: string,
interest: string,
locked: string,
netAsset: string,
asset: string
borrowed: string
free: string
interest: string
locked: string
netAsset: string
}

@@ -1557,3 +1567,3 @@

PRE_LIQUIDATION = 'PRE_LIQUIDATION',
FORCE_LIQUIDATION = 'FORCE_LIQUIDATION'
FORCE_LIQUIDATION = 'FORCE_LIQUIDATION',
}

@@ -1590,3 +1600,3 @@

SPOT = 'SPOT',
ISOLATED_MARGIN = 'ISOLATED_MARGIN'
ISOLATED_MARGIN = 'ISOLATED_MARGIN',
}

@@ -1671,3 +1681,3 @@

SHORT = 'SHORT',
LONG = 'LONG'
LONG = 'LONG',
}

@@ -1677,4 +1687,4 @@

MARK_PRICE = 'MARK_PRICE',
CONTRACT_PRICE = 'CONTRACT_PRICE'
CONTRACT_PRICE = 'CONTRACT_PRICE',
}
}
{
"name": "binance-api-node",
"version": "0.11.8",
"version": "0.11.9",
"description": "A node API wrapper for Binance",

@@ -5,0 +5,0 @@ "main": "dist",

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