New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

binance-futures-connector

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

binance-futures-connector - npm Package Compare versions

Comparing version 1.2.9 to 1.3.0

2

package.json
{
"name": "binance-futures-connector",
"version": "1.2.9",
"version": "1.3.0",
"description": "binance-futures-spot 币安-合约+现货-sdk,持续更新,欢迎PR一起完善。微信:wkc19891",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -39,3 +39,3 @@ module.exports.Future = require('./future')

let a3 = Number(`${a1[0]}.${a2}`)
a3=a3.toFixed(length)
a3 = a3.toFixed(length)
return Number(a3);

@@ -156,6 +156,7 @@ } else {

* @param {*} price
* @param {*} flagPrice
* @param {*} flagPrice
* @param {*} timeInForce
* @returns
*/
function buy(cf, symbol, quantity, price = -1, flagPrice = 0) {
function buy(cf, symbol, quantity, price = -1, flagPrice = 0, timeInForce = 'GTC') {
return new Promise((resolve, reject) => {

@@ -171,3 +172,3 @@ if (price < 0) {

} else {
cf.newOrder(symbol, 'BUY', 'LONG', 'LIMIT', { quantity: quantity, price: price, timeInForce: 'GTC' }).then(res => {
cf.newOrder(symbol, 'BUY', 'LONG', 'LIMIT', { quantity: quantity, price: price, timeInForce: timeInForce }).then(res => {
console.log(symbol, `限价,开多,买入成功=>数量:${quantity} | 价格:${price}`)

@@ -190,5 +191,6 @@ resolve(res);

* @param {*} flagPrice
* @param {*} timeInForce
* @returns
*/
function buy_close(cf, symbol, quantity, price = -1, flagPrice = 0) {
function buy_close(cf, symbol, quantity, price = -1, flagPrice = 0, timeInForce = 'GTC') {
return new Promise((resolve, reject) => {

@@ -204,3 +206,3 @@ if (price < 0) {

} else {
cf.newOrder(symbol, 'SELL', 'LONG', 'LIMIT', { quantity: quantity, price: price, timeInForce: 'GTC' }).then(res => {
cf.newOrder(symbol, 'SELL', 'LONG', 'LIMIT', { quantity: quantity, price: price, timeInForce: timeInForce }).then(res => {
console.log(symbol, `限价,平多,卖出成功=>数量:${quantity} | 价格:${price}`)

@@ -223,5 +225,6 @@ resolve(res);

* @param {*} flagPrice
* @param {*} timeInForce
* @returns
*/
function sell(cf, symbol, quantity, price = -1, flagPrice = 0) {
function sell(cf, symbol, quantity, price = -1, flagPrice = 0, timeInForce = 'GTC') {
return new Promise((resolve, reject) => {

@@ -237,3 +240,3 @@ if (price < 0) {

} else {
cf.newOrder(symbol, 'SELL', 'SHORT', 'LIMIT', { quantity: quantity, price: price, timeInForce: 'GTC' }).then(res => {
cf.newOrder(symbol, 'SELL', 'SHORT', 'LIMIT', { quantity: quantity, price: price, timeInForce: timeInForce }).then(res => {
console.log(symbol, `限价,开空,卖出成功=>数量:${quantity} | 价格:${price}`)

@@ -256,5 +259,6 @@ resolve(res);

* @param {*} flagPrice
* @param {*} timeInForce
* @returns
*/
function sell_close(cf, symbol, quantity, price = -1, flagPrice = 0) {
function sell_close(cf, symbol, quantity, price = -1, flagPrice = 0, timeInForce = 'GTC') {
return new Promise((resolve, reject) => {

@@ -270,3 +274,3 @@ if (price < 0) {

} else {
cf.newOrder(symbol, 'BUY', 'SHORT', 'LIMIT', { quantity: quantity, price: price, timeInForce: 'GTC' }).then(res => {
cf.newOrder(symbol, 'BUY', 'SHORT', 'LIMIT', { quantity: quantity, price: price, timeInForce: timeInForce }).then(res => {
console.log(symbol, `限价,平空,买入成功=>数量:${quantity} | 价格:${price}`)

@@ -283,3 +287,3 @@ resolve(res);

const buy_xh = (cs,symbol, quantity, price = -1) => {
const buy_xh = (cs, symbol, quantity, price = -1) => {
return new Promise((resolve, reject) => {

@@ -307,3 +311,3 @@ if (price < 0) {

const sell_xh = (cs,symbol, quantity, price = -1) => {
const sell_xh = (cs, symbol, quantity, price = -1) => {
return new Promise((resolve, reject) => {

@@ -338,3 +342,3 @@ if (price < 0) {

*/
const records_xh = (cs,symbol, interval, limit = 1000) => {
const records_xh = (cs, symbol, interval, limit = 1000) => {
let records = [];

@@ -341,0 +345,0 @@ return new Promise((resolve, reject) => {

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