Account balance
curl --request GET \
--url https://magicmarkets.com/v2/balance/ \
--header 'X-Api-Key: <api-key>'import requests
url = "https://magicmarkets.com/v2/balance/"
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/balance/', 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/balance/"
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": {
"balance": [
"USDT",
10000.1
],
"open_stake": [
"USDT",
152.55
],
"smart_credit": [
"USDT",
1000
]
}
}Account balance
Returns the authenticated user’s current balance, total stake on open bets, and smart credit. All values are ["USDT", amount] tuples. The same three figures are pushed on the stream as the balance message; open_stake is positive.
GET
/
v2
/
balance
/
Account balance
curl --request GET \
--url https://magicmarkets.com/v2/balance/ \
--header 'X-Api-Key: <api-key>'import requests
url = "https://magicmarkets.com/v2/balance/"
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/balance/', 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/balance/"
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": {
"balance": [
"USDT",
10000.1
],
"open_stake": [
"USDT",
152.55
],
"smart_credit": [
"USDT",
1000
]
}
}
