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
此页面对您有帮助吗?