binance-futures-connector
Advanced tools
Comparing version 1.2.0 to 1.2.1
{ | ||
"name": "binance-futures-connector", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "binance-futures-spot 币安-合约+现货-sdk,持续更新,欢迎PR一起完善。微信:wkc19891", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -126,3 +126,3 @@ module.exports.Future = require('./future') | ||
*/ | ||
const buy = (cf, symbol, quantity, price = -1, flagPrice = 0) => { | ||
function buy(cf, symbol, quantity, price = -1, flagPrice = 0) { | ||
return new Promise((resolve, reject) => { | ||
@@ -148,3 +148,3 @@ if (price < 0) { | ||
} | ||
module.exports.buy = buy; | ||
/** | ||
@@ -159,3 +159,3 @@ * 合约多单-卖出平多 | ||
*/ | ||
const buy_close = (cf, symbol, quantity, price = -1, flagPrice = 0) => { | ||
function buy_close(cf, symbol, quantity, price = -1, flagPrice = 0) { | ||
return new Promise((resolve, reject) => { | ||
@@ -181,3 +181,3 @@ if (price < 0) { | ||
} | ||
module.exports.buy_close = buy_close; | ||
/** | ||
@@ -192,3 +192,3 @@ * 合约卖出开空 | ||
*/ | ||
const sell = (cf, symbol, quantity, price = -1, flagPrice = 0) => { | ||
function sell(cf, symbol, quantity, price = -1, flagPrice = 0) { | ||
return new Promise((resolve, reject) => { | ||
@@ -214,3 +214,3 @@ if (price < 0) { | ||
} | ||
module.exports.sell = sell; | ||
/** | ||
@@ -225,3 +225,3 @@ * 合约 空单 买入平空 | ||
*/ | ||
const sell_close = (cf, symbol, quantity, price = -1, flagPrice = 0) => { | ||
function sell_close(cf, symbol, quantity, price = -1, flagPrice = 0) { | ||
return new Promise((resolve, reject) => { | ||
@@ -247,8 +247,8 @@ if (price < 0) { | ||
} | ||
module.exports = { | ||
buy, | ||
buy_close, | ||
sell, | ||
sell_close | ||
} | ||
module.exports.sell_close = sell_close; | ||
// module.exports = { | ||
// buy, | ||
// buy_close, | ||
// sell, | ||
// sell_close | ||
// } |
@@ -1,2 +0,2 @@ | ||
const { Future, TA, Sleep, _G, _N, LogProfit, DateFormat } = require('../index') | ||
const { Future, TA, Sleep, _G, _N, LogProfit, DateFormat,buy } = require('../index') | ||
@@ -3,0 +3,0 @@ const apiKey = '' |
253648
51
7181