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,
"type": "moneyline",
"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>",
"homeAway": "home",
"mainPitcher": "<string>",
"rotationNumber": "<string>",
"futuresSide": "<string>",
"score": 123
}
]
}
}
}
}Órdenes
Consultar una orden
Obtén el estado actual de una de tus órdenes
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,
"type": "moneyline",
"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>",
"homeAway": "home",
"mainPitcher": "<string>",
"rotationNumber": "<string>",
"futuresSide": "<string>",
"score": 123
}
]
}
}
}
}Obtén el estado actual de una de las órdenes de la cuenta autenticada. Devuelve la orden con el desglose
matchedRisk / unmatchedRisk y una instantánea desnormalizada del juego subyacente.
Solicitud
GET /session/lookupOrder
string
requerido
Un id de orden de 4casters. Obtén uno de
data.unmatched.orderID de /session/v3/place o de id de /user/getUnmatched.curl "https://api.4casters.io/session/lookupOrder?orderID=ORDER_ID" \
-H "Authorization: Bearer YOUR_TOKEN"
Respuesta
object
Mostrar order
Mostrar order
string
boolean
boolean
true cuando no hay una oferta competidora en el otro lado a mejores cuotas que esta orden.integer
Cuotas americanas de esta orden (signo invertido respecto al almacenamiento interno).
string
moneyline, spread, total o moneyline1x2.string
Opuesto del lado de la orden en mercados
total. null si no es total.string
Id del participante al que apostaste.
null en total.string
number
number
string
Riesgo que ya se ha cruzado (formateado como cadena, 2 decimales).
string
Riesgo restante que sigue en el libro.
Errores
| Estado | Significado |
|---|---|
403 | No es tu orden. |
404 | Id de orden inválido. |
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
A 4casters order id (e.g. id from /user/getUnmatched).
Respuesta
Order details
Show child attributes
Show child attributes
¿Esta página le ayudó?