I checked other posts and answers and didn't find a favorable answer. :(
I am trying to find a proper price after a value is generated by code.
For example, I'm trying to place a STOP MARKET order for a MARKET BUY order whose "avgPrice" I already have derived.
I calculated stop loss from that avgPrice, which gives me 37460.830500000004 - I passed this value into Futures STOP MARKET order, and I got this error: Precision is over the maximum defined for this asset
client.futures_create_order(
symbol=config.SYMBOL,
type='STOP_MARKET',
side='SELL',
stopPrice=stoploss_price,
closePosition='True'
)
I know that's not the right price to enter - my question is how do I properly round this price for a specific symbol (which are bound to change) automatically?