Sorry if I am missing something obvious.
Is there a way to sell x% of my BTC portfolio etc (under certain conditions).
Rather than always buying and selling 100% of your USD / BTC.
will buy a set quantity of 10 shares
You can sell a percent by calculating first the maximum number of shares you could hold based upon your current portfolio balances and the market spot price:
max_shares = (currency/close + assets)
so if you wanted to sell 10%:
when you specify "amount" your order timeout will be set to your chosen candle size (and then auto cancel before the next tick) unless you also specify timeout in seconds (or None):
the help suggests
Note: if you are deriving the order amount from other variables, we recommend working with the Decimal class for improved accuracy.
I'm personally prone to convert everything tradewave gives me to float() as division operations require less cpu cycles for float than Decimal.