Get unmatched orders
curl --request GET \
--url https://api.4casters.io/user/getUnmatched \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.4casters.io/user/getUnmatched"
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/getUnmatched', 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/getUnmatched",
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/getUnmatched"
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/getUnmatched")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.4casters.io/user/getUnmatched")
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
}
]
}
}
]
}
}Usuario
Obtener órdenes no cruzadas
Lista tus órdenes abiertas en espera en el intercambio
GET
/
user
/
getUnmatched
Get unmatched orders
curl --request GET \
--url https://api.4casters.io/user/getUnmatched \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.4casters.io/user/getUnmatched"
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/getUnmatched', 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/getUnmatched",
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/getUnmatched"
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/getUnmatched")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.4casters.io/user/getUnmatched")
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
}
]
}
}
]
}
}Devuelve todas las órdenes abiertas de la cuenta autenticada que están actualmente en espera en el intercambio y disponibles para cruzarse.
Solicitud
GET /user/getUnmatched
No recibe parámetros.
curl https://api.4casters.io/user/getUnmatched \
-H "Authorization: Bearer YOUR_TOKEN"
Respuesta
array
Array de órdenes abiertas, ordenadas de forma ascendente por hora de inicio del juego.
Mostrar UnmatchedOrder
Mostrar UnmatchedOrder
string
Id de la orden.
string
Id de transacción de la creación de la orden.
string
moneyline, spread, total o moneyline1x2.number
bet original (riesgo).integer
Cuotas americanas.
number
Presente en
spread.number
Presente en
total.string
Presente en
moneyline y spread — el participante al que se apoya.string
El id del participante contrario (cuyo lado se ofrece).
number
Riesgo que ya se ha cruzado.
number
Importe original de la oferta (cruzado + restante).
number
Importe de ganancia aún disponible en esta orden (el taker paga riesgo para reclamarlo).
number
Fracción de la orden que se ha cruzado, entre
0 y 1.string
Marca de tiempo de cancelación (ISO 8601).
null si no se definió expiración.string
Marca de tiempo ISO 8601.
string
offer o wager.string
Identificador definido por el cliente, conservado desde el momento de colocación.
string
Id generado por el servidor que agrupa cada cruce / oferta derivado de la solicitud de colocación original.
boolean
Siempre
false.boolean
boolean
Ejemplo
{
"data": {
"unmatched": [
{
"id": "62851e3bd54b74e52c39953c",
"txID": "62851e3bd54b74e52c39953b",
"type": "moneyline",
"bet": 100,
"odds": 165,
"spread": null,
"total": null,
"participantID": "6165e6e23c65e61a09bf1f73",
"otherParticipantID": "626dca8a83899580a06ba87e",
"filled": 0,
"offered": 100,
"remaining": 100,
"takenRatio": 0,
"expiry": "2022-05-18T23:08:00.000Z",
"createdAt": "2022-05-18T16:26:35.601Z",
"origin": "offer",
"graded": false,
"closed": false,
"adminRefund": false,
"game": {
"id": "62823d9d75d894042dfee218",
"league": "NHL",
"sport": "hockey",
"start": "2022-05-18T23:08:00.000Z",
"ended": false,
"eventName": "NEW YORK RANGERS VS CAROLINA HURRICANES",
"isFutures": false,
"participants": [/* ... */]
}
}
]
}
}
¿Esta página le ayudó?