Calculate position
curl --request GET \
--url https://magicmarkets.com/v2/orders/position/ \
--header 'X-Api-Key: <api-key>'import requests
url = "https://magicmarkets.com/v2/orders/position/"
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/position/', 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/position/"
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": {
"sport": "fb",
"event_id": "2026-05-18,53672,10058814",
"payoff_grid": {
"ccy_code": "USDT",
"values": [
[
-115.38,
-115.38,
-115.38
],
[
173.07,
-115.38,
-115.38
],
[
173.07,
173.07,
-115.38
]
]
},
"totals": {
"for,h": {
"bet_type_description": "Home",
"got_price": 2.5,
"got_stake": [
"USDT",
115.38
],
"unknown_price": null,
"unknown_stake": [
"USDT",
0
]
}
},
"unknown_bets_num": 0,
"unknown_grid": null
}
}{
"status": "error",
"code": "validation_error",
"data": {
"validation_errors": {
"non_field_errors": [
"filters match orders from multiple events"
]
}
}
}{
"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"
]
}Calculate position
Calculate profit/loss position based on filtered orders. Accepts the same query parameters as the list orders endpoint.
GET
/
v2
/
orders
/
position
/
Calculate position
curl --request GET \
--url https://magicmarkets.com/v2/orders/position/ \
--header 'X-Api-Key: <api-key>'import requests
url = "https://magicmarkets.com/v2/orders/position/"
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/position/', 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/position/"
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": {
"sport": "fb",
"event_id": "2026-05-18,53672,10058814",
"payoff_grid": {
"ccy_code": "USDT",
"values": [
[
-115.38,
-115.38,
-115.38
],
[
173.07,
-115.38,
-115.38
],
[
173.07,
173.07,
-115.38
]
]
},
"totals": {
"for,h": {
"bet_type_description": "Home",
"got_price": 2.5,
"got_stake": [
"USDT",
115.38
],
"unknown_price": null,
"unknown_stake": [
"USDT",
0
]
}
},
"unknown_bets_num": 0,
"unknown_grid": null
}
}{
"status": "error",
"code": "validation_error",
"data": {
"validation_errors": {
"non_field_errors": [
"filters match orders from multiple events"
]
}
}
}{
"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
Query Parameters
Accepted for compatibility. cashout_info is currently returned on every position regardless of this flag.

