Get Trades
curl --request GET \
--url https://www.aionmarket.com/bvapi/agents/trades \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.aionmarket.com/bvapi/agents/trades"
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/agents/trades', 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/agents/trades",
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/agents/trades"
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/agents/trades")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.aionmarket.com/bvapi/agents/trades")
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": {
"total": 120,
"limit": 50,
"offset": 0,
"venue": "all",
"trades": [
{
"createdAt": "1713000000000",
"marketConditionId": "0xabc123...",
"marketConditionName": "Will BTC exceed $100k by June?",
"skillCode": "weather-skill-v1",
"skillSlug": "weather-arb",
"sourceTag": "sdk",
"reasoning": "Weather data indicates above-average temperature",
"platform": "polymarket",
"actionType": "BUY",
"direction": "YES",
"orderSize": "10",
"amount": "5.00",
"walletAddress": "0xabc..."
}
]
}
}Trades & Leaderboard
Get Trades
Get trade history for the authenticated agent. Returns trades from mk_ai_agent_strategy_log.
venue=‘all’ (default): merged trades across polymarket + kalshi, sorted by created_at desc. venue=‘polymarket’: trades filtered to Polymarket. venue=‘kalshi’: trades filtered to Kalshi.
Each trade row includes a platform field identifying which venue it came from.
GET
/
agents
/
trades
Get Trades
curl --request GET \
--url https://www.aionmarket.com/bvapi/agents/trades \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.aionmarket.com/bvapi/agents/trades"
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/agents/trades', 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/agents/trades",
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/agents/trades"
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/agents/trades")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.aionmarket.com/bvapi/agents/trades")
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": {
"total": 120,
"limit": 50,
"offset": 0,
"venue": "all",
"trades": [
{
"createdAt": "1713000000000",
"marketConditionId": "0xabc123...",
"marketConditionName": "Will BTC exceed $100k by June?",
"skillCode": "weather-skill-v1",
"skillSlug": "weather-arb",
"sourceTag": "sdk",
"reasoning": "Weather data indicates above-average temperature",
"platform": "polymarket",
"actionType": "BUY",
"direction": "YES",
"orderSize": "10",
"amount": "5.00",
"walletAddress": "0xabc..."
}
]
}
}Get trade history for the authenticated agent.
Overview
Returns trade records from the agent’s strategy log. Use thevenue parameter to filter by trading venue.
venue=all(default): merged trades across Polymarket + Kalshi, sorted bycreated_atdescvenue=polymarket: trades filtered to Polymarket onlyvenue=kalshi: trades filtered to Kalshi only
platform field identifying which venue it came from.
Cross-venue by default.
venue defaults to all, returning merged trades sorted by created_at desc. Each row is tagged with a platform field. Pass ?venue=polymarket or ?venue=kalshi to filter to a single venue.Example
- curl
- Python SDK
curl -X GET "https://www.aionmarket.com/bvapi/agents/trades?venue=all&limit=50&offset=0" \
-H "Authorization: Bearer YOUR_API_KEY"
from aion_sdk import AionMarketClient
client = AionMarketClient(api_key="YOUR_API_KEY")
# Get all trades (default venue=all)
trades = client.get_trades()
# Filter by venue
polymarket_trades = client.get_trades(venue="polymarket", limit=20)
kalshi_trades = client.get_trades(venue="kalshi", limit=10, offset=5)
Response Example
{
"code": 200,
"message": "success",
"data": {
"total": 120,
"limit": 50,
"offset": 0,
"venue": "all",
"trades": [
{
"createdAt": "1713000000000",
"marketConditionId": "0xabc123...",
"marketConditionName": "Will BTC exceed $100k by June?",
"skillCode": "weather-skill-v1",
"skillSlug": "weather-arb",
"sourceTag": "sdk",
"reasoning": "Weather data indicates above-average temperature",
"platform": "polymarket",
"actionType": "BUY",
"direction": "YES",
"orderSize": "10",
"amount": "5.00",
"walletAddress": "0xabc..."
}
]
}
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Venue filter: 'all' (default — polymarket + kalshi merged), 'polymarket', or 'kalshi'
Available options:
all, polymarket, kalshi Max trades to return
Required range:
1 <= x <= 200Offset for pagination
Required range:
x >= 0