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>",
"bet": 123,
"odds": 123,
"spread": 123,
"total": 123,
"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>",
"mainPitcher": "<string>",
"rotationNumber": "<string>",
"futuresSide": "<string>",
"score": 123
}
]
}
}
],
"summary": {
"pnl": 123,
"volume": 123
}
}
}User
Get graded wagers
List settled wagers between two dates with a P&L summary
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>",
"bet": 123,
"odds": 123,
"spread": 123,
"total": 123,
"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>",
"mainPitcher": "<string>",
"rotationNumber": "<string>",
"futuresSide": "<string>",
"score": 123
}
]
}
}
],
"summary": {
"pnl": 123,
"volume": 123
}
}
}Returns all of the caller’s graded (settled) wagers between two dates, plus a summary of P&L and volume. Dates correspond to the start time of the game the wager is on (so
startDate=06-22-2022 returns wagers on games starting after 06-21-2022 00:00 GMT).
Request
GET /user/getGradedWagers
string
Start date (
MM-DD-YYYY). Defaults to 10-21-2020.string
End date (
MM-DD-YYYY). Defaults to today.curl "https://api.4casters.io/user/getGradedWagers?startDate=01-01-2024&endDate=02-01-2024" \
-H "Authorization: Bearer YOUR_TOKEN"
Response
array
Array of graded wagers, sorted descending by game start time.
Show GradedWager
Show GradedWager
string
Bet id.
string
Fill transaction id.
string
Display ticket number.
string
moneyline, spread, total, or moneyline1x2.string
winner, loser, push, or refund.number
Original bet size.
integer
American odds at fill time.
number
Present for
spread.number
Present for
total.string
Present for
total.string
Present for
moneyline and spread.string
Present for
moneyline1x2.string
For
moneyline1x2 — yes or no.string
ISO 8601 timestamp the fill occurred.
string
ISO 8601 timestamp the bet was graded.
string
ISO 8601 timestamp the order was placed.
boolean
boolean
boolean
Always
true here.boolean
string
Where the order originated, e.g.
api, web, mobile.string
Risk on the matched portion (string, 2 decimals).
string
Win amount, net of commission.
string
Commission charged on the matched portion.
string
Net P&L on this wager. Negative when you lost, positive when you won,
0 for push.object
Snapshot of the comparable Pinnacle line at fill time, when available.
object
Example
{
"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 }
}
}
Authorizations
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.
Query Parameters
Start date (MM-DD-YYYY). Defaults to 10-21-2020.
Example:
"01-01-2024"
End date (MM-DD-YYYY). Defaults to today.
Example:
"02-01-2024"
Response
Graded wagers and summary
Show child attributes
Show child attributes
Was this page helpful?
⌘I