Get order by UUID
curl --request GET \
--url https://magicmarkets.com/v2/orders/tracked/{uuid}/ \
--header 'X-Api-Key: <api-key>'import requests
url = "https://magicmarkets.com/v2/orders/tracked/{uuid}/"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://magicmarkets.com/v2/orders/tracked/{uuid}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://magicmarkets.com/v2/orders/tracked/{uuid}/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "ok",
"data": {
"order_id": 123,
"order_type": "normal",
"bet_type": "<string>",
"bet_type_description": "<string>",
"sport": "<string>",
"want_price": 123,
"want_stake": [
"<string>",
123
],
"ccy_rate": 123,
"placement_time": "2023-11-07T05:31:56Z",
"expiry_time": "2023-11-07T05:31:56Z",
"closed": true,
"close_reason": "<string>",
"event_info": {
"event_type": "normal",
"event_id": "<string>",
"event_name": "<string>",
"home_id": 123,
"home_team": "<string>",
"away_id": 123,
"away_team": "<string>",
"competition_id": 123,
"competition_name": "<string>",
"competition_country": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"date": "2023-12-25",
"result": {
"ht_home": 123,
"ht_away": 123,
"ft_home": 123,
"ft_away": 123
},
"teams": [
{
"team_id": 123,
"name": "<string>"
}
],
"end_time": "2023-11-07T05:31:56Z",
"leg_event_infos": "<array>"
},
"bets": [
{
"bet_id": 123,
"order_id": 123,
"order_ccy_rate": 123,
"status": {
"code": "<string>",
"reason": "<string>",
"response_pmm": {
"effective": {
"price": 123,
"min": {
"[0]": "<string>",
"[1]": 123
},
"max": {
"[0]": "<string>",
"[1]": 123
}
}
}
},
"sport": "<string>",
"event_id": "<string>",
"bet_type": "<string>",
"ccy_rate": 123,
"want_price": 123,
"got_price": 123,
"want_stake": [
"<string>",
123
],
"got_stake": [
"<string>",
123
],
"profit_loss": {
"[0]": "<string>",
"[1]": 123
},
"reconciled": true,
"exchange_role": "maker"
}
],
"user_data": "<string>",
"status": "<string>",
"keep_open_ir": true,
"exchange_mode": "make_and_take",
"price": 123,
"stake": {
"[0]": "<string>",
"[1]": 123
},
"profit_loss": {
"[0]": "<string>",
"[1]": 123
},
"bet_bar_values": {},
"current_score": {
"[0]": 123,
"[1]": 123
},
"legs": [
{
"id": 123,
"sport": "<string>",
"event_id": "<string>",
"bet_type": "<string>",
"live_score": {
"home": 512,
"away": 512
},
"bet_type_description": "<string>",
"price": 123,
"outcome": "w"
}
]
}
}{
"status": "error",
"code": "validation_error",
"data": {
"validation_errors": {
"request_uuid": [
"must be a uuid"
]
}
}
}{
"status": "error",
"code": "auth_error",
"data": {
"detail": "Authentication credentials were not provided."
}
}{
"status": "error",
"code": "forbidden",
"data": null
}{
"status": "error",
"code": "not_found",
"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"
]
}Get order by UUID
Retrieve an order using the request_uuid from order creation instead of the order ID. Available for several days after placement (until the order is purged upstream).
GET
/
v2
/
orders
/
tracked
/
{uuid}
/
Get order by UUID
curl --request GET \
--url https://magicmarkets.com/v2/orders/tracked/{uuid}/ \
--header 'X-Api-Key: <api-key>'import requests
url = "https://magicmarkets.com/v2/orders/tracked/{uuid}/"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://magicmarkets.com/v2/orders/tracked/{uuid}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://magicmarkets.com/v2/orders/tracked/{uuid}/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "ok",
"data": {
"order_id": 123,
"order_type": "normal",
"bet_type": "<string>",
"bet_type_description": "<string>",
"sport": "<string>",
"want_price": 123,
"want_stake": [
"<string>",
123
],
"ccy_rate": 123,
"placement_time": "2023-11-07T05:31:56Z",
"expiry_time": "2023-11-07T05:31:56Z",
"closed": true,
"close_reason": "<string>",
"event_info": {
"event_type": "normal",
"event_id": "<string>",
"event_name": "<string>",
"home_id": 123,
"home_team": "<string>",
"away_id": 123,
"away_team": "<string>",
"competition_id": 123,
"competition_name": "<string>",
"competition_country": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"date": "2023-12-25",
"result": {
"ht_home": 123,
"ht_away": 123,
"ft_home": 123,
"ft_away": 123
},
"teams": [
{
"team_id": 123,
"name": "<string>"
}
],
"end_time": "2023-11-07T05:31:56Z",
"leg_event_infos": "<array>"
},
"bets": [
{
"bet_id": 123,
"order_id": 123,
"order_ccy_rate": 123,
"status": {
"code": "<string>",
"reason": "<string>",
"response_pmm": {
"effective": {
"price": 123,
"min": {
"[0]": "<string>",
"[1]": 123
},
"max": {
"[0]": "<string>",
"[1]": 123
}
}
}
},
"sport": "<string>",
"event_id": "<string>",
"bet_type": "<string>",
"ccy_rate": 123,
"want_price": 123,
"got_price": 123,
"want_stake": [
"<string>",
123
],
"got_stake": [
"<string>",
123
],
"profit_loss": {
"[0]": "<string>",
"[1]": 123
},
"reconciled": true,
"exchange_role": "maker"
}
],
"user_data": "<string>",
"status": "<string>",
"keep_open_ir": true,
"exchange_mode": "make_and_take",
"price": 123,
"stake": {
"[0]": "<string>",
"[1]": 123
},
"profit_loss": {
"[0]": "<string>",
"[1]": 123
},
"bet_bar_values": {},
"current_score": {
"[0]": 123,
"[1]": 123
},
"legs": [
{
"id": 123,
"sport": "<string>",
"event_id": "<string>",
"bet_type": "<string>",
"live_score": {
"home": 512,
"away": 512
},
"bet_type_description": "<string>",
"price": 123,
"outcome": "w"
}
]
}
}{
"status": "error",
"code": "validation_error",
"data": {
"validation_errors": {
"request_uuid": [
"must be a uuid"
]
}
}
}{
"status": "error",
"code": "auth_error",
"data": {
"detail": "Authentication credentials were not provided."
}
}{
"status": "error",
"code": "forbidden",
"data": null
}{
"status": "error",
"code": "not_found",
"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"
]
}
