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>",
"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>",
"mainPitcher": "<string>",
"rotationNumber": "<string>",
"futuresSide": "<string>",
"score": 123
}
]
}
}
]
}
}User
Get unmatched orders
List your open orders resting on the exchange
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>",
"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>",
"mainPitcher": "<string>",
"rotationNumber": "<string>",
"futuresSide": "<string>",
"score": 123
}
]
}
}
]
}
}Returns all of the caller’s open orders that are currently resting on the exchange and available to be matched.
Request
GET /user/getUnmatched
Takes no parameters.
curl https://api.4casters.io/user/getUnmatched \
-H "Authorization: Bearer YOUR_TOKEN"
Response
array
Array of open orders, sorted ascending by game start time.
Show UnmatchedOrder
Show UnmatchedOrder
string
Order id.
string
Transaction id of the order’s creation.
string
moneyline, spread, total, or moneyline1x2.number
Original
bet (risk).integer
American odds.
number
Present for
spread.number
Present for
total.string
Present for
moneyline and spread — the participant being backed.string
The opposite participant id (whose side is being offered).
number
Risk that has already been matched.
number
Original offer amount (matched + remaining).
number
Win amount still available on this order (taker pays risk to claim it).
number
Fraction of the order that has been matched, between
0 and 1.string
Cancel-at timestamp (ISO 8601).
null if no expiry was set.string
ISO 8601 timestamp.
string
offer or wager.string
Client-defined identifier preserved from place time.
string
Server-generated id grouping every fill / offer derived from the original place request.
boolean
Always
false.boolean
boolean
Example
{
"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": [/* ... */]
}
}
]
}
}
Was this page helpful?
⌘I