Order updates
curl --request GET \
--url https://magicmarkets.com/v2/orders/updates/ \
--header 'X-Api-Key: <api-key>'import requests
url = "https://magicmarkets.com/v2/orders/updates/"
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/updates/', 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/updates/"
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"
}
]
}
]
}Order updates
Returns orders updated within the given time range. Both updated_at_from and updated_at_to must be at least 60 seconds in the past, and the window (updated_at_to - updated_at_from) must not exceed 70 minutes. For longer syncs, page through successive 70-minute windows.
GET
/
v2
/
orders
/
updates
/
Order updates
curl --request GET \
--url https://magicmarkets.com/v2/orders/updates/ \
--header 'X-Api-Key: <api-key>'import requests
url = "https://magicmarkets.com/v2/orders/updates/"
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/updates/', 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/updates/"
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"
}
]
}
]
}Authorizations
API key created from the magic-markets website
Query Parameters
Start of update window (ISO 8601). Must be at least 60 seconds in the past.
End of update window (ISO 8601). Must be at least 60 seconds in the past and within 70 minutes of updated_at_from.

