Reputation: 316
I'm trying to place a future position with /fapi/v1/order.
I keep encounter the error {'code': -1117, 'msg': 'Invalid side.'}
.
More info on code 1117
Actual pseudo code
futures.orders.create(
symbol='ADAUSDT',
market_type="TRAILING_STOP_MARKET",
position='LONG',
activationPrice=1.80,
callbackRate=2.0
)
I've tried ['BOTH', 'BUY/LONG', 'SELL/SHORT', 'LONG', 'SHORT', 'BUY', 'SELL']
but the same erros keeps coming back, so what do I do wrong?
Upvotes: 1
Views: 2306
Reputation: 316
I just realized you got two side
parameters; positionSide
and side
. positionSide
was set but side
was not.
Additional information:
There are only two available values for the side
parameter of the order endpoint, one is BUY
another is SELL
.
If you want to place an order under the hedge mode, please use another parameter positionSide
along with the side
parameter.
Hope this helps future people : )
Upvotes: 3