Skip to content

Instantly share code, notes, and snippets.

Avatar

Marko Paasila MarkoPaasila

View GitHub Profile
View gist:f0cc9e19b6d04f6bc3d7
Verifying I am +markopaasila on my passcard. https://onename.com/markopaasila
View keybase.md

Keybase proof

I hereby claim:

  • I am markopaasila on github.
  • I am markopaasila (https://keybase.io/markopaasila) on keybase.
  • I have a public key ASAIlmiN1Qp5Qw11fffttqSu-LoCAiTJPabJTaNDO7fIgwo

To claim this, I am signing this object:

@MarkoPaasila
MarkoPaasila / top_up_fee_asset.py
Created May 24, 2019
method to acquire more of the fee asset by buying it with base or quote
View top_up_fee_asset.py
def top_up_fee_asset(self):
if self.fee_asset['symbol'] == self.b_symbol:
if self.cancel_orders(self.own_buy_orders[-1]):
self.log.info(f"Cancelled the last buy order to get some {self.b_symbol} for fee's")
return True
elif self.fee_asset['symbol'] == self.q_symbol:
if self.cancel_orders(self.own_sell_orders[-1]):
self.log.info(f"Cancelled the last sell order to get some {self.q_symbol} for fee's")
return True
else: # Must buy fee asset. Try first with base, then with quote