How to get a list of all the account's SPOT Open Orders and MARGIN Open Orders + Active Positions

Hello,

How can I use the API to get a list of the following for any given account:

  • All current Spot Open Orders
  • All current Margin Open Orders + Active Positions

Thanks!

All current Spot Open Orders:
https://binance-docs.github.io/apidocs/spot/en/#current-open-orders-user_data

All current Margin Open Orders + Active Positions:
https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-open-orders-user_data
https://binance-docs.github.io/apidocs/spot/en/#query-cross-margin-account-details-user_data