Get game liability
curl --request GET \
--url https://api.4casters.io/user/getGameLiability \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.4casters.io/user/getGameLiability"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.4casters.io/user/getGameLiability', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.4casters.io/user/getGameLiability",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.4casters.io/user/getGameLiability"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.4casters.io/user/getGameLiability")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.4casters.io/user/getGameLiability")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"liability": -125.5
}
}使用者
獲取賽事負債
單場賽事的最壞情況虧損
GET
/
user
/
getGameLiability
Get game liability
curl --request GET \
--url https://api.4casters.io/user/getGameLiability \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.4casters.io/user/getGameLiability"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.4casters.io/user/getGameLiability', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.4casters.io/user/getGameLiability",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.4casters.io/user/getGameLiability"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.4casters.io/user/getGameLiability")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.4casters.io/user/getGameLiability")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"liability": -125.5
}
}計算呼叫方在單場賽事上的最壞情況下的財務負債(最大風險敞口),計入該賽事每個市場上的每一筆投注。
該值始終
<= 0 — 即使完全對沖的持倉也可能因雨取消、中止或取消資格而產生虧損。
請求
GET /user/getGameLiability
string
必填
要計算負債的賽事 ID。
curl "https://api.4casters.io/user/getGameLiability?gameID=657f8ea1ea0ce6f62c1fe37d" \
-H "Authorization: Bearer YOUR_TOKEN"
回應
number
帳戶貨幣計的最壞情況虧損。始終
<= 0。呼叫方在該賽事上沒有投注時回傳 0。示例
{
"data": { "liability": -125.50 }
}
授權
Pass your auth token in the Authorization header. The Bearer prefix is optional; the server also accepts a signed auth cookie or a token field in the request body.
查詢參數
A 4casters game id (ObjectID). Get game ids from GET /exchange/v2/getGames or GET /exchange/v2/getOrderbook.
回應
Liability for the requested game (always <= 0).
Show child attributes
Show child attributes
這個頁面有幫助嗎?