def nanoseconds():
return int(time.time() * 1000000000)
+ def is_dust_trade(self, amount, rate):
+ if abs(amount) < decimal.Decimal("0.000001"):
+ return True
+ if abs(amount * rate) < decimal.Decimal("0.0001"):
+ return True
+ return False
+
def fetch_margin_balance(self):
"""
portfolio.market.privatePostGetMarginPosition({"currencyPair": "BTC_DASH"})
"total": decimal.Decimal(summary["totalValue"]),
}
+ def fetch_nth_order_book(self, symbol, action, number):
+ book = self.fetch_order_book(symbol, limit=number)
+ return decimal.Decimal(book[action + "s"][-1][0])
+
def nonce(self):
"""
Wrapped to allow nonce with other libraries