Get Prices History
curl --request GET \
--url https://www.aionmarket.com/bvapi/markets/prices-history \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.aionmarket.com/bvapi/markets/prices-history"
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/prices-history', 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/prices-history",
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/prices-history"
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/prices-history")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.aionmarket.com/bvapi/markets/prices-history")
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": {
"history": [
{
"timestamp": "2023-11-07T05:31:56Z",
"price": 123
}
]
}
}Market Operations
Get Prices History
Return historical price data for a market asset (CLOB token).
GET
/
markets
/
prices-history
Get Prices History
curl --request GET \
--url https://www.aionmarket.com/bvapi/markets/prices-history \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.aionmarket.com/bvapi/markets/prices-history"
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/prices-history', 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/prices-history",
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/prices-history"
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/prices-history")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.aionmarket.com/bvapi/markets/prices-history")
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": {
"history": [
{
"timestamp": "2023-11-07T05:31:56Z",
"price": 123
}
]
}
}Retrieve time-series price data for a specific market outcome token. Useful for charting, backtesting, and trend analysis.
Query Parameters
string
required
CLOB token ID (Polymarket token address). This is the unique identifier for the outcome token you want price history for.
number
Start timestamp in Unix seconds. Omit to use the server default (beginning of available data).
number
End timestamp in Unix seconds. Omit to use the current time.
string
Time aggregation interval. One of:
max, all, 1m, 1w, 1d, 6h, 1h.integer
default:"1"
Data fidelity in minutes. Higher values produce coarser data with fewer points. Default is
1 (one-minute granularity).string
default:"polymarket"
Trading venue identifier. Default:
polymarket.Response
array
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
CLOB token ID (Polymarket token address)
Start timestamp (Unix seconds)
End timestamp (Unix seconds)
Time aggregation interval
Available options:
max, all, 1m, 1w, 1d, 6h, 1h Data fidelity in minutes (default 1)
Required range:
x >= 1Trading venue (default: polymarket)
Maximum string length:
50