Open_trade() the rate parameter?!

i don’t understand what the rate parameter is doing in open_trade()

according the docs:
rate: float (default 0),
** the trades rate.**
since it is set by default to 0, it seems it may not be too meaningful.

furthermore, since the order_type parameter must be
’AtMarket’ or 'MarketRange’
wouldn’t this just be a straightforward market order?

finally, examining the actual code using
the limit, stop, trailing_step parameters are actually used if they are not None:

    if limit is not None:
        params['limit'] = limit
    if stop is not None:
        params['stop'] = stop
    if trailing_step is not None:
        params['trailing_step'] = trailing_step

but there seems to be no indication what rate is being used for other than it gets passed with params.

so what’s the point of setting it to anything?

i see jens and liza were mentioning it here:

but i don’t really see what the rate parameter is for.

in fact, i don’t see how open trade is any different really than

other than you can’t put stop and limit into those directly as you can with open_trade(), because you need to use
change_trade_stop_limit() with the trade’s id.

i would appreciate some enlightenment from those who understand this better than i do.


Hi @pradtf, you are correct in that the “rate” is not needed with the market order. Please disregard that parameters.