mirror of
https://github.com/Death916/emailtrade.git
synced 2026-04-10 03:04:40 -07:00
commit
6df0bb9ce0
1 changed files with 2 additions and 2 deletions
2
trade.py
2
trade.py
|
|
@ -25,7 +25,7 @@ def open_trade():
|
||||||
global buyprice
|
global buyprice
|
||||||
buyprice = marketcheck(ticker)
|
buyprice = marketcheck(ticker)
|
||||||
balance = trex.get_balance('BTC')['result']['Available']
|
balance = trex.get_balance('BTC')['result']['Available']
|
||||||
buy_amount = balance / buyprice
|
buy_amount = (balance / buyprice) - (balance / buyprice) * .0025
|
||||||
print(trex.buy_limit(ticker, buy_amount, rate=buyprice))
|
print(trex.buy_limit(ticker, buy_amount, rate=buyprice))
|
||||||
print('buying', buy_amount, 'of', ticker)
|
print('buying', buy_amount, 'of', ticker)
|
||||||
hist.tradehist('bought ' + str(buy_amount) + ' of ' + ticker + ' at ' + str(buyprice))
|
hist.tradehist('bought ' + str(buy_amount) + ' of ' + ticker + ' at ' + str(buyprice))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue