Look up an order
curl --request GET \
--url https://api.4casters.io/session/lookupOrder \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.4casters.io/session/lookupOrder"
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/session/lookupOrder', 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/session/lookupOrder",
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/session/lookupOrder"
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/session/lookupOrder")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.4casters.io/session/lookupOrder")
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": {
"order": {
"id": "<string>",
"cancelled": true,
"isTheBestOffer": true,
"odds": 123,
"OU": "<string>",
"participant": "<string>",
"participantLongName": "<string>",
"spread": 123,
"total": 123,
"matchedRisk": "<string>",
"unmatchedRisk": "<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>",
"mainPitcher": "<string>",
"rotationNumber": "<string>",
"futuresSide": "<string>",
"score": 123
}
]
}
}
}
}Orders
Look up an order
Get the current state of one of your orders
GET
/
session
/
lookupOrder
Look up an order
curl --request GET \
--url https://api.4casters.io/session/lookupOrder \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.4casters.io/session/lookupOrder"
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/session/lookupOrder', 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/session/lookupOrder",
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/session/lookupOrder"
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/session/lookupOrder")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.4casters.io/session/lookupOrder")
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": {
"order": {
"id": "<string>",
"cancelled": true,
"isTheBestOffer": true,
"odds": 123,
"OU": "<string>",
"participant": "<string>",
"participantLongName": "<string>",
"spread": 123,
"total": 123,
"matchedRisk": "<string>",
"unmatchedRisk": "<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>",
"mainPitcher": "<string>",
"rotationNumber": "<string>",
"futuresSide": "<string>",
"score": 123
}
]
}
}
}
}Get the current state of one of the caller’s orders. Returns the order with
matchedRisk / unmatchedRisk accounting and a denormalized snapshot of the underlying game.
Request
GET /session/lookupOrder
string
required
A 4casters order id. Get one from
data.unmatched.orderID of /session/v3/place or id from /user/getUnmatched.curl "https://api.4casters.io/session/lookupOrder?orderID=ORDER_ID" \
-H "Authorization: Bearer YOUR_TOKEN"
Response
object
Show order
Show order
string
boolean
boolean
true when there is no competing offer on the other side at better odds than this order.integer
American odds of this order (sign-flipped from internal storage).
string
moneyline, spread, total, or moneyline1x2.string
Opposite of the order’s side for
total markets. null for non-total.string
Participant id you bet on.
null for total.string
number
number
string
Risk that has already been matched (string-formatted, 2 decimals).
string
Remaining risk still resting on the book.
Errors
| Status | Meaning |
|---|---|
403 | Not your order. |
404 | Invalid order id. |
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
A 4casters order id (e.g. id from /user/getUnmatched).
Response
Order details
Show child attributes
Show child attributes
Was this page helpful?
⌘I