Get graded wagers
curl --request GET \
--url https://api.4casters.io/user/getGradedWagers \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.4casters.io/user/getGradedWagers"
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/getGradedWagers', 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/getGradedWagers",
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/getGradedWagers"
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/getGradedWagers")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.4casters.io/user/getGradedWagers")
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": {
"graded": [
{
"id": "<string>",
"txID": "<string>",
"ticketNumber": "<string>",
"type": "moneyline",
"outcome": "winner",
"bet": 123,
"odds": 123,
"spread": 123,
"total": 123,
"OU": "over",
"participantID": "<string>",
"market": "<string>",
"side": "<string>",
"matchedTime": "2023-11-07T05:31:56Z",
"settledAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"graded": true,
"closed": true,
"cancelled": true,
"adminRefund": true,
"platform": "api",
"fee": "<string>",
"risk": "<string>",
"win": "<string>",
"result": "<string>",
"pinnacleLine": {},
"game": {
"id": "<string>",
"league": "<string>",
"sport": "<string>",
"start": "2023-11-07T05:31:56Z",
"ended": true,
"eventName": "<string>",
"isFutures": true,
"participants": [
{
"id": "<string>",
"longName": "<string>",
"shortName": "<string>",
"homeAway": "home",
"mainPitcher": "<string>",
"rotationNumber": "<string>",
"futuresSide": "<string>",
"score": 123
}
]
}
}
],
"summary": {
"pnl": 123,
"volume": 123
}
}
}使用者
獲取已結算注單
列出兩個日期之間的已結算注單及盈虧彙總
GET
/
user
/
getGradedWagers
Get graded wagers
curl --request GET \
--url https://api.4casters.io/user/getGradedWagers \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.4casters.io/user/getGradedWagers"
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/getGradedWagers', 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/getGradedWagers",
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/getGradedWagers"
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/getGradedWagers")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.4casters.io/user/getGradedWagers")
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": {
"graded": [
{
"id": "<string>",
"txID": "<string>",
"ticketNumber": "<string>",
"type": "moneyline",
"outcome": "winner",
"bet": 123,
"odds": 123,
"spread": 123,
"total": 123,
"OU": "over",
"participantID": "<string>",
"market": "<string>",
"side": "<string>",
"matchedTime": "2023-11-07T05:31:56Z",
"settledAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"graded": true,
"closed": true,
"cancelled": true,
"adminRefund": true,
"platform": "api",
"fee": "<string>",
"risk": "<string>",
"win": "<string>",
"result": "<string>",
"pinnacleLine": {},
"game": {
"id": "<string>",
"league": "<string>",
"sport": "<string>",
"start": "2023-11-07T05:31:56Z",
"ended": true,
"eventName": "<string>",
"isFutures": true,
"participants": [
{
"id": "<string>",
"longName": "<string>",
"shortName": "<string>",
"homeAway": "home",
"mainPitcher": "<string>",
"rotationNumber": "<string>",
"futuresSide": "<string>",
"score": 123
}
]
}
}
],
"summary": {
"pnl": 123,
"volume": 123
}
}
}回傳呼叫方在兩個日期之間的全部已結算(已判定)注單,以及盈虧和成交量彙總。日期對應注單所屬賽事的開賽時間(因此
startDate=06-22-2022 回傳開賽時間晚於 06-21-2022 00:00 GMT 的注單)。
請求
GET /user/getGradedWagers
string
開始日期(
MM-DD-YYYY)。預設為 10-21-2020。string
結束日期(
MM-DD-YYYY)。預設為今天。curl "https://api.4casters.io/user/getGradedWagers?startDate=01-01-2024&endDate=02-01-2024" \
-H "Authorization: Bearer YOUR_TOKEN"
回應
array
已結算注單陣列,按開賽時間降序排列。
顯示 GradedWager
顯示 GradedWager
string
投注 ID。
string
成交事務 ID。
string
展示用票據號。
string
moneyline、spread、total 或 moneyline1x2。string
winner、loser、push 或 refund。number
原始投注額。
integer
成交時的美式賠率。
number
出現在
spread 上。number
出現在
total 上。string
出現在
total 上。string
出現在
moneyline 和 spread 上。string
出現在
moneyline1x2 上。string
用於
moneyline1x2 — yes 或 no。string
成交發生的 ISO 8601 時間戳記。
string
注單被判定的 ISO 8601 時間戳記。
string
下單的 ISO 8601 時間戳記。
boolean
boolean
boolean
此處始終為
true。boolean
string
訂單來源,例如
api、web、mobile。string
已撮合部分的風險額(字串,兩位小數)。
string
扣除佣金後的可贏金額。
string
已撮合部分收取的佣金。
string
該注單的淨盈虧。虧損為負,盈利為正,走水為
0。object
成交時可比的 Pinnacle 盤口快照(如有)。
示例
{
"data": {
"graded": [
{
"id": "64c98e8c0745a206acf18ad7",
"txID": "64c99640453fd2ad91206018",
"ticketNumber": "5a5494406ef9e2c5988b30bf666ce55e",
"type": "total",
"outcome": "loser",
"bet": 1,
"odds": 101,
"total": 8.5,
"OU": "over",
"matchedTime": "2023-08-01T23:33:20.273Z",
"settledAt": "2023-08-02T02:26:16.152Z",
"createdAt": "2023-08-01T23:33:20.273Z",
"graded": true,
"platform": "api",
"risk": "1.01",
"win": "1.00",
"fee": "0.01",
"result": "-1.01",
"pinnacleLine": { "odds": -102, "total": 8.5, "OU": "over" },
"game": {
"id": "64c7fa454803b0ff0f7f5741",
"league": "MLB",
"sport": "baseball",
"start": "2023-08-01T23:45:00.000Z",
"ended": true,
"participants": [/* ... */]
}
}
],
"summary": { "pnl": -1, "volume": 1 }
}
}
授權
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.
查詢參數
Start date (MM-DD-YYYY). Defaults to 10-21-2020.
範例:
"01-01-2024"
End date (MM-DD-YYYY). Defaults to today.
範例:
"02-01-2024"
回應
Graded wagers and summary
Show child attributes
Show child attributes
這個頁面有幫助嗎?