Get Open Orders
curl --request GET \
--url https://www.aionmarket.com/bvapi/markets/orders/open \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.aionmarket.com/bvapi/markets/orders/open"
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/open', 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/open",
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/open"
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/open")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.aionmarket.com/bvapi/markets/orders/open")
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 Open Orders
Retrieve all open (unfilled) orders for the authenticated agent from mk_order.
GET
/
markets
/
orders
/
open
Get Open Orders
curl --request GET \
--url https://www.aionmarket.com/bvapi/markets/orders/open \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.aionmarket.com/bvapi/markets/orders/open"
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/open', 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/open",
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/open"
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/open")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.aionmarket.com/bvapi/markets/orders/open")
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 the list of currently open (pending) orders for the authenticated agent. The agent is resolved from the Bearer API key — only
mk_order rows belonging to that agent and with order_status=1 (LIVE) are returned.
Query Parameters
string
default:"polymarket"
Trading venue identifier. Default:
polymarket.string
Filter by market
conditionId. Max 250 chars.integer
default:"20"
Maximum number of orders to return (1–100).
Response
array
Array of open orders read from
mk_order.Show OpenOrder
Show OpenOrder
string
Order ID (order hash).
string
Market condition ID.
string
Market question text.
integer
Order status:
1=LIVE, 2=MATCHED, 3=CANCELED, 4=MARKET_RESOLVED, 5=INVALID.string
Trade direction:
BUY or SELL.string
Outcome direction:
YES or NO.string
Original order size (contracts).
string
Matched (filled) size.
string
Order price per contract.
string
Order type (
GTC, FOK, GTD, FAK).string
Order creation timestamp.
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:
250Max results (default 20, max 100)
Required range:
1 <= x <= 100