Skip to content

Commit

Permalink
0.1.4 trader
Browse files Browse the repository at this point in the history
  • Loading branch information
JSapp.me committed Jun 27, 2019
1 parent c4f0fa5 commit 3beb8b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion trader.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ let user_payload = []

const binance_client = binance()

const nbt_vers = "0.1.3"
const nbt_vers = "0.1.4"
const socket = io('https://nbt-hub.herokuapp.com', { query: "v="+nbt_vers+"&type=client&key=" + bva_key })

socket.on('connect', () => {
Expand All @@ -61,6 +61,7 @@ socket.on('buy_signal', async (signal) => {
key: bva_key,
stratname: signal.stratname,
stratid: signal.stratid,
trading_type: user_payload[tresult].trading_type,
pair: signal.pair,
buy_price: Number(buy_prices[signal.pair+signal.stratid].toString()),
}
Expand All @@ -87,6 +88,7 @@ socket.on('sell_signal', async (signal) => {
key: bva_key,
stratname: signal.stratname,
stratid: signal.stratid,
trading_type: user_payload[tresult].trading_type,
pair: signal.pair,
sell_price: Number(sell_price.toString()),
pnl: Number(pnl.minus(0.1).decimalPlaces(2).toString()),
Expand Down

0 comments on commit 3beb8b4

Please sign in to comment.