Positions Expiring
curl --request GET \
--url https://www.aionmarket.com/bvapi/markets/positions/expiring \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.aionmarket.com/bvapi/markets/positions/expiring"
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/positions/expiring', 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/positions/expiring",
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/positions/expiring"
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/positions/expiring")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.aionmarket.com/bvapi/markets/positions/expiring")
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{
"positions": [
{
"id": "12345",
"venue": "polymarket",
"marketId": "<string>",
"title": "<string>",
"side": "Yes",
"shares": 50,
"avgPrice": 0.62,
"currentPrice": 0.75,
"pnl": 6.5,
"resolutionTimestamp": "1720000000000",
"hoursUntilResolution": 18.5
}
],
"total": 12,
"hours": 24,
"venue": "all"
}Positions & Portfolio
Positions Expiring
Get positions in markets that are active within a time window. Merges data from Polymarket and Kalshi, sorted by soonest activity. Useful for pre-resolution position review and exit planning.
GET
/
markets
/
positions
/
expiring
Positions Expiring
curl --request GET \
--url https://www.aionmarket.com/bvapi/markets/positions/expiring \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.aionmarket.com/bvapi/markets/positions/expiring"
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/positions/expiring', 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/positions/expiring",
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/positions/expiring"
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/positions/expiring")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.aionmarket.com/bvapi/markets/positions/expiring")
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{
"positions": [
{
"id": "12345",
"venue": "polymarket",
"marketId": "<string>",
"title": "<string>",
"side": "Yes",
"shares": 50,
"avgPrice": 0.62,
"currentPrice": 0.75,
"pnl": 6.5,
"resolutionTimestamp": "1720000000000",
"hoursUntilResolution": 18.5
}
],
"total": 12,
"hours": 24,
"venue": "all"
}Get positions in markets that are active within a time window.
Overview
Returns positions from both Polymarket and Kalshi that have been active within the specified hours window. Useful for:- Pre-resolution position review — see which positions may need attention soon
- Exit planning before market closes
- Avoiding surprise resolutions
Parameters
| Param | Type | Default | Description |
|---|---|---|---|
hours | integer | 24 | Time window in hours (1–168, i.e. up to 1 week) |
venue | string | all | all, polymarket, or kalshi |
limit | integer | 50 | Max results (1–200) |
offset | integer | 0 | Pagination offset |
Cross-venue by default. The
venue parameter defaults to all, returning merged positions from both Polymarket and Kalshi sorted by soonest activity. Each position is tagged with a venue field.Example
- curl
- Python SDK
curl -X GET "https://www.aionmarket.com/bvapi/markets/positions/expiring?hours=24&venue=all&limit=50" \
-H "Authorization: Bearer YOUR_API_KEY"
from aion_sdk import AionMarketClient
client = AionMarketClient(api_key="YOUR_API_KEY")
# Default: 24h window, all venues
positions = client.get_positions_expiring()
# Custom: 48h window, Kalshi only
kalshi_positions = client.get_positions_expiring(hours=48, venue="kalshi", limit=20)
Response Example
{
"code": 200,
"message": "success",
"data": {
"positions": [
{
"id": "12345",
"venue": "polymarket",
"title": "Will BTC exceed $100k by June?",
"side": "Yes",
"shares": 50,
"avgPrice": 0.62,
"currentPrice": 0.75,
"pnl": 6.5,
"resolutionTimestamp": "1720000000000",
"hoursUntilResolution": 18.5
},
{
"id": "67890",
"venue": "kalshi",
"marketId": "KXBTC-100K-JUN",
"title": "KXBTC-100K-JUN",
"side": "yes",
"shares": 10,
"avgPrice": 0.55,
"currentPrice": 0.70,
"pnl": 1.5,
"resolutionTimestamp": "1720050000000",
"hoursUntilResolution": 22.3
}
],
"total": 2,
"hours": 24,
"venue": "all"
}
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Hours until resolution (1-168). Returns positions active within this window.
Required range:
1 <= x <= 168Venue filter: all, polymarket, or kalshi.
Available options:
all, polymarket, kalshi Max results to return.
Required range:
1 <= x <= 200Pagination offset.
Required range:
x >= 0