curl --request POST \
--url https://magicmarkets.com/v2/orders/close_all/ \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '{}'{
"status": "ok",
"data": [
[
5001,
5002
]
]
}{
"status": "error",
"code": "auth_error",
"data": {
"detail": "Authentication credentials were not provided."
}
}{
"status": "error",
"code": "forbidden",
"data": null
}{
"status": "error",
"code": "throttled",
"data": {
"message": "Request was throttled. Expected available in 12 seconds.",
"retry_after": 12
}
}{
"status": "error",
"code": "server_error",
"data": [
"An error has occurred, token:",
"ABC123abc456DEF789gh"
]
}Close all open orders
Request cancellation of all open orders. Optionally filter by sport and/or event.
POST
/
v2
/
orders
/
close_all
/
curl --request POST \
--url https://magicmarkets.com/v2/orders/close_all/ \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '{}'{
"status": "ok",
"data": [
[
5001,
5002
]
]
}{
"status": "error",
"code": "auth_error",
"data": {
"detail": "Authentication credentials were not provided."
}
}{
"status": "error",
"code": "forbidden",
"data": null
}{
"status": "error",
"code": "throttled",
"data": {
"message": "Request was throttled. Expected available in 12 seconds.",
"retry_after": 12
}
}{
"status": "error",
"code": "server_error",
"data": [
"An error has occurred, token:",
"ABC123abc456DEF789gh"
]
}Authorizations
API key created from the magic-markets website
Body
application/json
Response
Cancellation accepted. data is a list of the order-id lists being cancelled; an empty result is [[]].

