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
}
}
}Usuario
Obtener apuestas liquidadas
Lista apuestas liquidadas entre dos fechas con un resumen de P&L
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
}
}
}Devuelve todas las apuestas liquidadas de la cuenta autenticada entre dos fechas, más un resumen de P&L y volumen. Las fechas corresponden a la hora de inicio del juego de la apuesta (así,
startDate=06-22-2022 devuelve apuestas de juegos que empiezan después del 06-21-2022 00:00 GMT).
Solicitud
GET /user/getGradedWagers
string
Fecha de inicio (
MM-DD-YYYY). El valor por defecto es 10-21-2020.string
Fecha de fin (
MM-DD-YYYY). El valor por defecto es hoy.curl "https://api.4casters.io/user/getGradedWagers?startDate=01-01-2024&endDate=02-01-2024" \
-H "Authorization: Bearer YOUR_TOKEN"
Respuesta
array
Array de apuestas liquidadas, ordenadas de forma descendente por hora de inicio del juego.
Mostrar GradedWager
Mostrar GradedWager
string
Id de la apuesta.
string
Id de transacción del cruce.
string
Número de ticket de visualización.
string
moneyline, spread, total o moneyline1x2.string
winner, loser, push o refund.number
Tamaño original de la apuesta.
integer
Cuotas americanas en el momento del cruce.
number
Presente en
spread.number
Presente en
total.string
Presente en
total.string
Presente en
moneyline y spread.string
Presente en
moneyline1x2.string
En
moneyline1x2 — yes o no.string
Marca de tiempo ISO 8601 en que ocurrió el cruce.
string
Marca de tiempo ISO 8601 en que se liquidó la apuesta.
string
Marca de tiempo ISO 8601 en que se colocó la orden.
boolean
boolean
boolean
Siempre
true aquí.boolean
string
Origen de la orden, p. ej.
api, web, mobile.string
Riesgo de la porción cruzada (cadena, 2 decimales).
string
Importe de ganancia, neto de comisión.
string
Comisión cobrada sobre la porción cruzada.
string
P&L neto de esta apuesta. Negativo si perdiste, positivo si ganaste,
0 en push.object
Instantánea de la línea comparable de Pinnacle en el momento del cruce, cuando está disponible.
object
Ejemplo
{
"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 }
}
}
Autorizaciones
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.
Parámetros de consulta
Start date (MM-DD-YYYY). Defaults to 10-21-2020.
Ejemplo:
"01-01-2024"
End date (MM-DD-YYYY). Defaults to today.
Ejemplo:
"02-01-2024"
Respuesta
Graded wagers and summary
Show child attributes
Show child attributes
¿Esta página le ayudó?