Get bet by wager request ID
curl --request GET \
--url https://api.4casters.io/user/getBetByWagerRequestID \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.4casters.io/user/getBetByWagerRequestID"
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/getBetByWagerRequestID', 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/getBetByWagerRequestID",
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/getBetByWagerRequestID"
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/getBetByWagerRequestID")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.4casters.io/user/getBetByWagerRequestID")
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": {
"unmatched": [
{
"id": "<string>",
"txID": "<string>",
"type": "moneyline",
"bet": 123,
"odds": 123,
"spread": 123,
"total": 123,
"participantID": "<string>",
"otherParticipantID": "<string>",
"expiry": "2023-11-07T05:31:56Z",
"filled": 123,
"offered": 123,
"remaining": 123,
"takenRatio": 123,
"createdAt": "2023-11-07T05:31:56Z",
"origin": "<string>",
"graded": true,
"closed": true,
"adminRefund": true,
"userReference": "<string>",
"wagerRequestID": "<string>",
"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
}
]
}
}
],
"matched": [
{
"id": "<string>",
"txID": "<string>",
"type": "moneyline",
"bet": 123,
"odds": 123,
"spread": 123,
"total": 123,
"OU": "over",
"participantID": "<string>",
"market": "<string>",
"side": "<string>",
"userReference": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"matchedTime": "2023-11-07T05:31:56Z",
"graded": true,
"closed": true,
"origin": "<string>",
"adminRefund": true,
"risk": "<string>",
"win": "<string>",
"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
}
]
}
}
],
"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
}
]
}
}
]
}
}用户
按 wager request ID 获取投注
查找由单次下单请求产生的全部投注
GET
/
user
/
getBetByWagerRequestID
Get bet by wager request ID
curl --request GET \
--url https://api.4casters.io/user/getBetByWagerRequestID \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.4casters.io/user/getBetByWagerRequestID"
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/getBetByWagerRequestID', 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/getBetByWagerRequestID",
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/getBetByWagerRequestID"
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/getBetByWagerRequestID")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.4casters.io/user/getBetByWagerRequestID")
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": {
"unmatched": [
{
"id": "<string>",
"txID": "<string>",
"type": "moneyline",
"bet": 123,
"odds": 123,
"spread": 123,
"total": 123,
"participantID": "<string>",
"otherParticipantID": "<string>",
"expiry": "2023-11-07T05:31:56Z",
"filled": 123,
"offered": 123,
"remaining": 123,
"takenRatio": 123,
"createdAt": "2023-11-07T05:31:56Z",
"origin": "<string>",
"graded": true,
"closed": true,
"adminRefund": true,
"userReference": "<string>",
"wagerRequestID": "<string>",
"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
}
]
}
}
],
"matched": [
{
"id": "<string>",
"txID": "<string>",
"type": "moneyline",
"bet": 123,
"odds": 123,
"spread": 123,
"total": 123,
"OU": "over",
"participantID": "<string>",
"market": "<string>",
"side": "<string>",
"userReference": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"matchedTime": "2023-11-07T05:31:56Z",
"graded": true,
"closed": true,
"origin": "<string>",
"adminRefund": true,
"risk": "<string>",
"win": "<string>",
"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
}
]
}
}
],
"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
}
]
}
}
]
}
}查找与单个
wagerRequestID 关联的全部投注。wagerRequestID 由服务器为下单请求中的每一笔订单生成 — 用它把单次提交订单所产生的每一笔成交和挂单关联起来。
响应将结果分为三个桶:
unmatched— 该请求中仍挂在订单簿上的未成交挂单。此端点始终为空 — 若需要响应中包含未成交挂单,请改用 按用户引用获取投注。matched— 该请求中已撮合(未结算)的投注。graded— 该请求中已结算的投注,包含risk、win、fee和result。
请求
GET /user/getBetByWagerRequestID
string
必填
/session/v3/place 返回的 wagerRequestID(位于 matched[].wagerRequestID 或 unmatched.wagerRequestID 字段)。curl "https://api.4casters.io/user/getBetByWagerRequestID?wagerRequestID=65f69afec4c141f5ecc5dc0b" \
-H "Authorization: Bearer YOUR_TOKEN"
响应
array
空数组。
错误
| 状态 | 含义 |
|---|---|
400 | wagerRequestID 缺失或未知。 |
授权
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.
查询参数
The wagerRequestID returned by /session/v3/place.
响应
Three-bucket wager view: open (unmatched), filled-but-not-graded (matched), and settled (graded).
Show child attributes
Show child attributes
此页面对您有帮助吗?