Isolated margin order API not authorized

I’m trying to create an isolated margin order but keep getting an error code:
{‘code’: -1002, ‘msg’: ‘You are not authorized to execute this request.’}

  • Margin trading and Margin is enabled at API restrictions.
  • isIsolated parameter set to TRUE
  • isolated account opened (in browser)
  • balance transferred to isolated account

It works fine with spot trading.

What am I missing?

Thank you for your feedback. Could you please generate another key with margin permission and try again?

Unfortunately that doesn’t help either.

please contact customer support and see if they can validate the account status.

I found the issue.
In Python requests the request body needs to be sent as “params” not as “data”.
It works as “data” at spot trading but not at margin trading.

1 Like