Close betslip
curl --request DELETE \
--url https://magicmarkets.com/v2/betslips/{betslip_id}/ \
--header 'X-Api-Key: <api-key>'import requests
url = "https://magicmarkets.com/v2/betslips/{betslip_id}/"
headers = {"X-Api-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://magicmarkets.com/v2/betslips/{betslip_id}/', 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/betslips/{betslip_id}/"
req, _ := http.NewRequest("DELETE", 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": null
}{
"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"
]
}Close betslip
Close an open betslip. Its quotes stop, and it no longer counts toward the open-betslip cap.
DELETE
/
v2
/
betslips
/
{betslip_id}
/
Close betslip
curl --request DELETE \
--url https://magicmarkets.com/v2/betslips/{betslip_id}/ \
--header 'X-Api-Key: <api-key>'import requests
url = "https://magicmarkets.com/v2/betslips/{betslip_id}/"
headers = {"X-Api-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://magicmarkets.com/v2/betslips/{betslip_id}/', 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/betslips/{betslip_id}/"
req, _ := http.NewRequest("DELETE", 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": null
}{
"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"
]
}
