Updates
This commit is contained in:
parent
75f42e7353
commit
8c3299f9d5
1 changed files with 4 additions and 4 deletions
|
@ -31,13 +31,13 @@ class Kraken:
|
|||
self.shortEMA = self.prices.ewm(span=3).mean()
|
||||
|
||||
|
||||
def buyOrder(self, currency_pair, currency_buy, currency_sell, amount, _type="market"):
|
||||
self.krakenWrapper.add_standard_order(currency_pair, "sell", _type, volume=amount, validate=True)
|
||||
def buyOrder(self, currency_pair, currency_buy, currency_sell, amount, ordertype="market"):
|
||||
self.krakenWrapper.add_standard_order(currency_pair, "buy", ordertype, volume=amount, validate=True)
|
||||
self.balances["vol"][currency_buy] += amount
|
||||
self.balances["vol"][currency_sell] -= amount * self.prices.tail(1)[0]
|
||||
|
||||
def sellOrder(self, currency_pair, currency_buy, currency_sell, amount, _type="market"):
|
||||
self.krakenWrapper.add_standard_order(currency_pair, "buy", _type, volume=amount, validate=True)
|
||||
def sellOrder(self, currency_pair, currency_buy, currency_sell, amount, ordertype="market"):
|
||||
self.krakenWrapper.add_standard_order(currency_pair, "sell", ordertype, volume=amount, validate=True)
|
||||
self.balances["vol"][currency_buy] -= amount
|
||||
self.balances["vol"][currency_sell] += amount * self.prices.tail(1)[0]
|
||||
|
||||
|
|
Loading…
Reference in a new issue