update sell
This commit is contained in:
parent
20b432c73d
commit
ff393e54b8
@ -52,10 +52,16 @@ class Bittrex(Exchange):
|
|||||||
return data['result']['OrderId']
|
return data['result']['OrderId']
|
||||||
|
|
||||||
def sell(self, pair: str, rate: float, amount: float) -> str:
|
def sell(self, pair: str, rate: float, amount: float) -> str:
|
||||||
data = _API.sell_limit(pair.replace('_', '-'), amount, rate)
|
data = _API.trade_sell(
|
||||||
|
market=pair.replace('_', '-'),
|
||||||
|
order_type=ORDERTYPE_LIMIT,
|
||||||
|
quantity=amount,
|
||||||
|
rate=rate,
|
||||||
|
time_in_effect=TIMEINEFFECT_GOOD_TIL_CANCELLED,
|
||||||
|
)
|
||||||
if not data['success']:
|
if not data['success']:
|
||||||
raise RuntimeError('{}: {}'.format(self.name.upper(), data['message']))
|
raise RuntimeError('{}: {}'.format(self.name.upper(), data['message']))
|
||||||
return data['result']['uuid']
|
return data['result']['OrderId']
|
||||||
|
|
||||||
def get_balance(self, currency: str) -> float:
|
def get_balance(self, currency: str) -> float:
|
||||||
data = _API.get_balance(currency)
|
data = _API.get_balance(currency)
|
||||||
|
Loading…
Reference in New Issue
Block a user