Skip to main content

Query Margin Account's all OCO (USER_DATA)

API Description#

Retrieves all OCO for a specific margin account based on provided optional parameters

HTTP Request#

GET /sapi/v1/margin/allOrderList

Request Weight#

200(IP)

Request Parameters#

NameTypeMandatoryDescription
isIsolatedSTRINGNOfor isolated margin or not, "TRUE", "FALSE",default "FALSE"
symbolSTRINGNOmandatory for isolated margin, not supported for cross margin
fromIdLONGNOIf supplied, neither startTime or endTime can be provided
startTimeLONGNO
endTimeLONGNO
limitINTNODefault Value: 500; Max Value: 1000
recvWindowLONGNOThe value cannot be greater than 60000
timestampLONGYES

Response Example#

[  {    "orderListId": 29,    "contingencyType": "OCO",    "listStatusType": "EXEC_STARTED",    "listOrderStatus": "EXECUTING",    "listClientOrderId": "amEEAXryFzFwYF1FeRpUoZ",    "transactionTime": 1565245913483,    "symbol": "LTCBTC",    "isIsolated": true,       // if isolated margin    "orders": [      {        "symbol": "LTCBTC",        "orderId": 4,        "clientOrderId": "oD7aesZqjEGlZrbtRpy5zB"      },      {        "symbol": "LTCBTC",        "orderId": 5,        "clientOrderId": "Jr1h6xirOxgeJOUuYQS7V3"      }    ]  },  {    "orderListId": 28,    "contingencyType": "OCO",    "listStatusType": "EXEC_STARTED",    "listOrderStatus": "EXECUTING",    "listClientOrderId": "hG7hFNxJV6cZy3Ze4AUT4d",    "transactionTime": 1565245913407,    "symbol": "LTCBTC",    "orders": [      {        "symbol": "LTCBTC",        "orderId": 2,        "clientOrderId": "j6lFOfbmFMRjTYA7rRJ0LP"      },      {        "symbol": "LTCBTC",        "orderId": 3,        "clientOrderId": "z0KCjOdditiLS5ekAFtK81"      }    ]  }]