Place or preview an order
curl --request POST \
--url https://api.apexiumbet.com/v1/orders \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"clientOrderId": "<string>",
"fixtureId": "<string>",
"outcomeId": 123,
"side": "back",
"stake": {
"amount": "<string>",
"currency": "<string>"
},
"minPrice": "<string>",
"acceptBetterOdds": true,
"acceptPartialStake": true,
"playerId": 0,
"bookmakers": [
"<string>"
],
"expiresAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.apexiumbet.com/v1/orders"
payload = {
"clientOrderId": "<string>",
"fixtureId": "<string>",
"outcomeId": 123,
"side": "back",
"stake": {
"amount": "<string>",
"currency": "<string>"
},
"minPrice": "<string>",
"acceptBetterOdds": True,
"acceptPartialStake": True,
"playerId": 0,
"bookmakers": ["<string>"],
"expiresAt": "2023-11-07T05:31:56Z"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clientOrderId: '<string>',
fixtureId: '<string>',
outcomeId: 123,
side: 'back',
stake: {amount: '<string>', currency: '<string>'},
minPrice: '<string>',
acceptBetterOdds: true,
acceptPartialStake: true,
playerId: 0,
bookmakers: ['<string>'],
expiresAt: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.apexiumbet.com/v1/orders', 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.apexiumbet.com/v1/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'clientOrderId' => '<string>',
'fixtureId' => '<string>',
'outcomeId' => 123,
'side' => 'back',
'stake' => [
'amount' => '<string>',
'currency' => '<string>'
],
'minPrice' => '<string>',
'acceptBetterOdds' => true,
'acceptPartialStake' => true,
'playerId' => 0,
'bookmakers' => [
'<string>'
],
'expiresAt' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.apexiumbet.com/v1/orders"
payload := strings.NewReader("{\n \"clientOrderId\": \"<string>\",\n \"fixtureId\": \"<string>\",\n \"outcomeId\": 123,\n \"side\": \"back\",\n \"stake\": {\n \"amount\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"minPrice\": \"<string>\",\n \"acceptBetterOdds\": true,\n \"acceptPartialStake\": true,\n \"playerId\": 0,\n \"bookmakers\": [\n \"<string>\"\n ],\n \"expiresAt\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.apexiumbet.com/v1/orders")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"clientOrderId\": \"<string>\",\n \"fixtureId\": \"<string>\",\n \"outcomeId\": 123,\n \"side\": \"back\",\n \"stake\": {\n \"amount\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"minPrice\": \"<string>\",\n \"acceptBetterOdds\": true,\n \"acceptPartialStake\": true,\n \"playerId\": 0,\n \"bookmakers\": [\n \"<string>\"\n ],\n \"expiresAt\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apexiumbet.com/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clientOrderId\": \"<string>\",\n \"fixtureId\": \"<string>\",\n \"outcomeId\": 123,\n \"side\": \"back\",\n \"stake\": {\n \"amount\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"minPrice\": \"<string>\",\n \"acceptBetterOdds\": true,\n \"acceptPartialStake\": true,\n \"playerId\": 0,\n \"bookmakers\": [\n \"<string>\"\n ],\n \"expiresAt\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clientOrderId": "<string>",
"status": "PENDING",
"selection": {
"fixtureId": "<string>",
"outcomeId": 123,
"playerId": 123,
"sportId": 123,
"tournamentId": 123,
"marketId": 123
},
"side": "back",
"bookmakers": [
"<string>"
],
"requestedStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"filledStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"remainingStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"minPrice": "<string>",
"averageFilledPrice": "<string>",
"acceptBetterOdds": true,
"acceptPartialStake": true,
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"version": 123,
"bets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bookmaker": "<string>",
"status": "PENDING",
"requestedStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"filledStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"filledPrice": "<string>",
"declineReason": "<string>",
"placedAt": "2023-11-07T05:31:56Z",
"filledAt": "2023-11-07T05:31:56Z",
"settlement": {
"status": "UNSETTLED",
"amount": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"settledAt": "2023-11-07T05:31:56Z"
}
}
]
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clientOrderId": "<string>",
"status": "PENDING",
"selection": {
"fixtureId": "<string>",
"outcomeId": 123,
"playerId": 123,
"sportId": 123,
"tournamentId": 123,
"marketId": 123
},
"side": "back",
"bookmakers": [
"<string>"
],
"requestedStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"filledStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"remainingStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"minPrice": "<string>",
"averageFilledPrice": "<string>",
"acceptBetterOdds": true,
"acceptPartialStake": true,
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"version": 123,
"bets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bookmaker": "<string>",
"status": "PENDING",
"requestedStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"filledStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"filledPrice": "<string>",
"declineReason": "<string>",
"placedAt": "2023-11-07T05:31:56Z",
"filledAt": "2023-11-07T05:31:56Z",
"settlement": {
"status": "UNSETTLED",
"amount": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"settledAt": "2023-11-07T05:31:56Z"
}
}
]
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}Orders
Place or preview an order
mode “place” answers 201 with the new order, or 200 with the existing order when the same request is resent with its clientOrderId. mode “preview” answers 200 with what would be placed now, status PREVIEW, and stores nothing.
POST
/
v1
/
orders
Place or preview an order
curl --request POST \
--url https://api.apexiumbet.com/v1/orders \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"clientOrderId": "<string>",
"fixtureId": "<string>",
"outcomeId": 123,
"side": "back",
"stake": {
"amount": "<string>",
"currency": "<string>"
},
"minPrice": "<string>",
"acceptBetterOdds": true,
"acceptPartialStake": true,
"playerId": 0,
"bookmakers": [
"<string>"
],
"expiresAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.apexiumbet.com/v1/orders"
payload = {
"clientOrderId": "<string>",
"fixtureId": "<string>",
"outcomeId": 123,
"side": "back",
"stake": {
"amount": "<string>",
"currency": "<string>"
},
"minPrice": "<string>",
"acceptBetterOdds": True,
"acceptPartialStake": True,
"playerId": 0,
"bookmakers": ["<string>"],
"expiresAt": "2023-11-07T05:31:56Z"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clientOrderId: '<string>',
fixtureId: '<string>',
outcomeId: 123,
side: 'back',
stake: {amount: '<string>', currency: '<string>'},
minPrice: '<string>',
acceptBetterOdds: true,
acceptPartialStake: true,
playerId: 0,
bookmakers: ['<string>'],
expiresAt: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.apexiumbet.com/v1/orders', 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.apexiumbet.com/v1/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'clientOrderId' => '<string>',
'fixtureId' => '<string>',
'outcomeId' => 123,
'side' => 'back',
'stake' => [
'amount' => '<string>',
'currency' => '<string>'
],
'minPrice' => '<string>',
'acceptBetterOdds' => true,
'acceptPartialStake' => true,
'playerId' => 0,
'bookmakers' => [
'<string>'
],
'expiresAt' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.apexiumbet.com/v1/orders"
payload := strings.NewReader("{\n \"clientOrderId\": \"<string>\",\n \"fixtureId\": \"<string>\",\n \"outcomeId\": 123,\n \"side\": \"back\",\n \"stake\": {\n \"amount\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"minPrice\": \"<string>\",\n \"acceptBetterOdds\": true,\n \"acceptPartialStake\": true,\n \"playerId\": 0,\n \"bookmakers\": [\n \"<string>\"\n ],\n \"expiresAt\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.apexiumbet.com/v1/orders")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"clientOrderId\": \"<string>\",\n \"fixtureId\": \"<string>\",\n \"outcomeId\": 123,\n \"side\": \"back\",\n \"stake\": {\n \"amount\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"minPrice\": \"<string>\",\n \"acceptBetterOdds\": true,\n \"acceptPartialStake\": true,\n \"playerId\": 0,\n \"bookmakers\": [\n \"<string>\"\n ],\n \"expiresAt\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apexiumbet.com/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clientOrderId\": \"<string>\",\n \"fixtureId\": \"<string>\",\n \"outcomeId\": 123,\n \"side\": \"back\",\n \"stake\": {\n \"amount\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"minPrice\": \"<string>\",\n \"acceptBetterOdds\": true,\n \"acceptPartialStake\": true,\n \"playerId\": 0,\n \"bookmakers\": [\n \"<string>\"\n ],\n \"expiresAt\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clientOrderId": "<string>",
"status": "PENDING",
"selection": {
"fixtureId": "<string>",
"outcomeId": 123,
"playerId": 123,
"sportId": 123,
"tournamentId": 123,
"marketId": 123
},
"side": "back",
"bookmakers": [
"<string>"
],
"requestedStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"filledStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"remainingStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"minPrice": "<string>",
"averageFilledPrice": "<string>",
"acceptBetterOdds": true,
"acceptPartialStake": true,
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"version": 123,
"bets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bookmaker": "<string>",
"status": "PENDING",
"requestedStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"filledStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"filledPrice": "<string>",
"declineReason": "<string>",
"placedAt": "2023-11-07T05:31:56Z",
"filledAt": "2023-11-07T05:31:56Z",
"settlement": {
"status": "UNSETTLED",
"amount": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"settledAt": "2023-11-07T05:31:56Z"
}
}
]
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clientOrderId": "<string>",
"status": "PENDING",
"selection": {
"fixtureId": "<string>",
"outcomeId": 123,
"playerId": 123,
"sportId": 123,
"tournamentId": 123,
"marketId": 123
},
"side": "back",
"bookmakers": [
"<string>"
],
"requestedStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"filledStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"remainingStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"minPrice": "<string>",
"averageFilledPrice": "<string>",
"acceptBetterOdds": true,
"acceptPartialStake": true,
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"version": 123,
"bets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bookmaker": "<string>",
"status": "PENDING",
"requestedStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"filledStake": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"filledPrice": "<string>",
"declineReason": "<string>",
"placedAt": "2023-11-07T05:31:56Z",
"filledAt": "2023-11-07T05:31:56Z",
"settlement": {
"status": "UNSETTLED",
"amount": {
"amount": "<string>",
"amountCents": 123,
"currency": "<string>"
},
"settledAt": "2023-11-07T05:31:56Z"
}
}
]
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}{
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": "<unknown>"
}Body
application/json
Response
Default Response
- Option 1
- Option 2