Get Market
curl --request GET \
--url https://www.aionmarket.com/bvapi/markets/{market_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.aionmarket.com/bvapi/markets/{market_id}"
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/{market_id}', 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/{market_id}",
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/{market_id}"
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/{market_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.aionmarket.com/bvapi/markets/{market_id}")
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{
"id": "<string>",
"question": "<string>",
"conditionId": "<string>",
"slug": "<string>",
"description": "<string>",
"outcomes": "<string>",
"outcomePrices": "<string>",
"volume": "<string>",
"liquidity": "<string>",
"active": true,
"closed": true,
"category": "<string>",
"endDate": "2023-11-07T05:31:56Z",
"startDate": "2023-11-07T05:31:56Z",
"image": "<string>",
"clobTokenIds": "<string>",
"volumeNum": 123,
"liquidityNum": 123,
"bestBid": 123,
"bestAsk": 123,
"lastTradePrice": 123,
"spread": 123,
"oneDayPriceChange": 123,
"oneWeekPriceChange": 123,
"enableOrderBook": true,
"acceptingOrders": true,
"events": [
{}
],
"tags": [
{}
]
}Market Operations
Get Market
Get a single market by ID with full details from Polymarket.
GET
/
markets
/
{market_id}
Get Market
curl --request GET \
--url https://www.aionmarket.com/bvapi/markets/{market_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.aionmarket.com/bvapi/markets/{market_id}"
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/{market_id}', 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/{market_id}",
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/{market_id}"
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/{market_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.aionmarket.com/bvapi/markets/{market_id}")
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{
"id": "<string>",
"question": "<string>",
"conditionId": "<string>",
"slug": "<string>",
"description": "<string>",
"outcomes": "<string>",
"outcomePrices": "<string>",
"volume": "<string>",
"liquidity": "<string>",
"active": true,
"closed": true,
"category": "<string>",
"endDate": "2023-11-07T05:31:56Z",
"startDate": "2023-11-07T05:31:56Z",
"image": "<string>",
"clobTokenIds": "<string>",
"volumeNum": 123,
"liquidityNum": 123,
"bestBid": 123,
"bestAsk": 123,
"lastTradePrice": 123,
"spread": 123,
"oneDayPriceChange": 123,
"oneWeekPriceChange": 123,
"enableOrderBook": true,
"acceptingOrders": true,
"events": [
{}
],
"tags": [
{}
]
}Get a single market by ID with full details from Polymarket.
Overview
Retrieve the complete market object for a given Polymarket market ID. The response includes pricing, volume, outcomes, event metadata, and order book configuration. Use this before placing trades or building market detail views.Example
- curl
- Python SDK
curl -X GET "https://www.aionmarket.com/bvapi/markets/512357" \
-H "Authorization: Bearer YOUR_API_KEY"
from aion_sdk import AionMarketClient
client = AionMarketClient(api_key="YOUR_API_KEY", base_url="https://www.aionmarket.com/bvapi")
market = client.get_market("512357")
print(market)
Response
{
"id": "512357",
"question": "Will BTC exceed $100k by end of June?",
"conditionId": "0xabc123...",
"slug": "will-btc-exceed-100k-by-end-of-june",
"description": "This market resolves to Yes if...",
"outcomes": "[\"Yes\",\"No\"]",
"outcomePrices": "[\"0.65\",\"0.35\"]",
"volume": "125000.50",
"liquidity": "45000.00",
"active": true,
"closed": false,
"category": "Crypto",
"endDate": "2026-06-30T23:59:59Z",
"startDate": "2026-01-01T00:00:00Z",
"image": "https://polymarket-upload.s3.us-east-2.amazonaws.com/...",
"clobTokenIds": "[\"12345\",\"67890\"]",
"volumeNum": 125000.50,
"liquidityNum": 45000.00,
"bestBid": 0.64,
"bestAsk": 0.66,
"lastTradePrice": 0.65,
"spread": 0.02,
"oneDayPriceChange": -0.03,
"oneWeekPriceChange": 0.05,
"enableOrderBook": true,
"acceptingOrders": true,
"events": [],
"tags": []
}
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Polymarket market ID |
question | string | null | Market question |
conditionId | string | Condition token ID |
slug | string | null | URL slug |
description | string | null | Market description |
outcomes | string | JSON-encoded array of outcome labels |
outcomePrices | string | JSON-encoded array of outcome prices |
volume | string | null | Total volume traded |
liquidity | string | null | Current liquidity |
active | boolean | Whether the market is active |
closed | boolean | Whether the market is closed |
category | string | null | Market category |
endDate | string | null | Market end date |
startDate | string | null | Market start date |
image | string | null | Market image URL |
clobTokenIds | string | JSON-encoded array of CLOB token IDs |
volumeNum | number | Total volume (numeric) |
liquidityNum | number | Current liquidity (numeric) |
bestBid | number | null | Best bid price |
bestAsk | number | null | Best ask price |
lastTradePrice | number | null | Last trade price |
spread | number | null | Current spread |
oneDayPriceChange | number | null | 24-hour price change |
enableOrderBook | boolean | Whether order book is enabled |
acceptingOrders | boolean | Whether the market accepts orders |
events | array | Associated events |
tags | array | Market tags |
Common Errors
| Code | Meaning |
|---|---|
401 | Missing or invalid API key |
404 | Market not found on Polymarket |
500 | Server-side error |
Use Cases
- Display market detail pages with pricing data.
- Pre-trade validation to confirm market status before execution.
- Build dashboards showing real-time market information.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Polymarket market ID
Query Parameters
Trading venue (default: polymarket)
Maximum string length:
50Include market tag data
Response
Market details
Polymarket market ID
Market question
Condition token ID
JSON-encoded array of outcome labels
JSON-encoded array of outcome prices
JSON-encoded array of CLOB token IDs