Get Order History
curl --request GET \
--url https://www.aionmarket.com/bvapi/markets/orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.aionmarket.com/bvapi/markets/orders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.aionmarket.com/bvapi/markets/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://www.aionmarket.com/bvapi/markets/orders",
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://www.aionmarket.com/bvapi/markets/orders"
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://www.aionmarket.com/bvapi/markets/orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.aionmarket.com/bvapi/markets/orders")
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{
"code": 200,
"message": "success",
"data": [
{
"orderId": "<string>",
"aiAgentId": "<string>",
"userId": "<string>",
"marketConditionId": "<string>",
"marketQuestion": "<string>",
"orderStatus": 123,
"side": "<string>",
"outcome": "<string>",
"orderSize": "<string>",
"matchedSize": "<string>",
"feeAmount": "<string>",
"price": "<string>",
"orderType": "<string>",
"expirationTime": "<string>",
"createdAt": "<string>"
}
]
}Order Management
Get Order History
Retrieve paginated order history for an agent.
GET
/
markets
/
orders
Get Order History
curl --request GET \
--url https://www.aionmarket.com/bvapi/markets/orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.aionmarket.com/bvapi/markets/orders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.aionmarket.com/bvapi/markets/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://www.aionmarket.com/bvapi/markets/orders",
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://www.aionmarket.com/bvapi/markets/orders"
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://www.aionmarket.com/bvapi/markets/orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.aionmarket.com/bvapi/markets/orders")
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{
"code": 200,
"message": "success",
"data": [
{
"orderId": "<string>",
"aiAgentId": "<string>",
"userId": "<string>",
"marketConditionId": "<string>",
"marketQuestion": "<string>",
"orderStatus": 123,
"side": "<string>",
"outcome": "<string>",
"orderSize": "<string>",
"matchedSize": "<string>",
"feeAmount": "<string>",
"price": "<string>",
"orderType": "<string>",
"expirationTime": "<string>",
"createdAt": "<string>"
}
]
}Returns a paginated list of all historical orders (filled, cancelled, expired) for the specified agent. Use
limit and offset for pagination.
Query Parameters
The authenticated agent is resolved from the Bearer API key — there is nowalletAddress parameter on this endpoint.
string
default:"polymarket"
Trading venue identifier. Default:
polymarket.string
Filter by market
conditionId. Max 250 chars.integer
Filter by order status. Integer enum:
1=LIVE, 2=MATCHED, 3=CANCELED, 4=MARKET_RESOLVED, 5=INVALID.integer
default:"20"
Maximum number of orders to return per page (1–100).
integer
default:"0"
Number of orders to skip (0–10000).
Response
array
Array of order records.
Show OrderHistoryItem
Show OrderHistoryItem
string
Order ID (venue-specific identifier).
string
Market condition ID.
string
CLOB token ID.
string
Order side:
"BUY" or "SELL".string
Original order size.
string
Shares filled.
string
Limit price.
string
Outcome label.
string
Order status (e.g.,
"matched", "cancelled", "expired").string
Creation timestamp (ISO 8601).
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Trading venue (default: polymarket)
Maximum string length:
50Filter by market condition ID
Maximum string length:
250Filter by order status: 1=LIVE, 2=MATCHED, 3=CANCELED, 4=MARKET_RESOLVED, 5=INVALID
Available options:
1, 2, 3, 4, 5 Max results (default 20, max 100)
Required range:
1 <= x <= 100Pagination offset (default 0)
Required range:
0 <= x <= 10000