Reference example
# Fixed reference example. Playground inputs do not update this sample.
curl --request POST \
--url https://api.aisa.one/apis/v1/polymarket/last-trades-prices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '[
{
"token_id": "0xabc123def456..."
},
{
"token_id": "0xdef456abc123..."
}
]'curl --request POST \
--url https://api.aisa.one/apis/v1/polymarket/last-trades-prices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"token_id": "0xabc123def456..."
},
{
"token_id": "0xdef456abc123..."
}
]
'import requests
url = "https://api.aisa.one/apis/v1/polymarket/last-trades-prices"
payload = [{ "token_id": "0xabc123def456..." }, { "token_id": "0xdef456abc123..." }]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([{token_id: '0xabc123def456...'}, {token_id: '0xdef456abc123...'}])
};
fetch('https://api.aisa.one/apis/v1/polymarket/last-trades-prices', 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://api.aisa.one/apis/v1/polymarket/last-trades-prices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'token_id' => '0xabc123def456...'
],
[
'token_id' => '0xdef456abc123...'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/polymarket/last-trades-prices"
payload := strings.NewReader("[\n {\n \"token_id\": \"0xabc123def456...\"\n },\n {\n \"token_id\": \"0xdef456abc123...\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/polymarket/last-trades-prices")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"token_id\": \"0xabc123def456...\"\n },\n {\n \"token_id\": \"0xdef456abc123...\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/polymarket/last-trades-prices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"token_id\": \"0xabc123def456...\"\n },\n {\n \"token_id\": \"0xdef456abc123...\"\n }\n]"
response = http.request(request)
puts response.read_body[
{
"price": "0.45",
"side": "BUY",
"token_id": "0xabc123def456..."
},
{
"price": "0.52",
"side": "SELL",
"token_id": "0xdef456abc123..."
}
]CLOB
Get last trade prices (query parameters)
Retrieves last trade prices for multiple token IDs using a request body. Maximum 500 token IDs can be requested per call.
Retrieves last trade prices for multiple token IDs using query parameters. Maximum 500 token IDs can be requested per call.
POST
https://api.aisa.one
/
apis
/
v1
/
polymarket
/
last-trades-prices
Reference example
# Fixed reference example. Playground inputs do not update this sample.
curl --request POST \
--url https://api.aisa.one/apis/v1/polymarket/last-trades-prices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '[
{
"token_id": "0xabc123def456..."
},
{
"token_id": "0xdef456abc123..."
}
]'curl --request POST \
--url https://api.aisa.one/apis/v1/polymarket/last-trades-prices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"token_id": "0xabc123def456..."
},
{
"token_id": "0xdef456abc123..."
}
]
'import requests
url = "https://api.aisa.one/apis/v1/polymarket/last-trades-prices"
payload = [{ "token_id": "0xabc123def456..." }, { "token_id": "0xdef456abc123..." }]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([{token_id: '0xabc123def456...'}, {token_id: '0xdef456abc123...'}])
};
fetch('https://api.aisa.one/apis/v1/polymarket/last-trades-prices', 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://api.aisa.one/apis/v1/polymarket/last-trades-prices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'token_id' => '0xabc123def456...'
],
[
'token_id' => '0xdef456abc123...'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/polymarket/last-trades-prices"
payload := strings.NewReader("[\n {\n \"token_id\": \"0xabc123def456...\"\n },\n {\n \"token_id\": \"0xdef456abc123...\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/polymarket/last-trades-prices")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"token_id\": \"0xabc123def456...\"\n },\n {\n \"token_id\": \"0xdef456abc123...\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/polymarket/last-trades-prices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"token_id\": \"0xabc123def456...\"\n },\n {\n \"token_id\": \"0xdef456abc123...\"\n }\n]"
response = http.request(request)
puts response.read_body[
{
"price": "0.45",
"side": "BUY",
"token_id": "0xabc123def456..."
},
{
"price": "0.52",
"side": "SELL",
"token_id": "0xdef456abc123..."
}
]Request contract
- Method and path: POST /apis/v1/polymarket/last-trades-prices
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/polymarket/last-trades-prices
{
"operationId": "post_any_polymarket_clob_apis_v1_polymarket_last__b38f3e",
"method": "POST",
"path": "/apis/v1/polymarket/last-trades-prices",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"example": [
{
"token_id": "0xabc123def456..."
},
{
"token_id": "0xdef456abc123..."
}
],
"schema": {
"items": {
"properties": {
"side": {
"description": "Order side (optional, not used for midpoint calculation)",
"enum": [
"BUY",
"SELL"
],
"example": "BUY",
"type": "string"
},
"token_id": {
"description": "Token ID (asset ID)",
"example": "0xabc123def456...",
"type": "string"
}
},
"required": [
"token_id"
],
"type": "object"
},
"type": "array"
}
}
},
"required": true
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
Published reference price: $0.012 USD per successful request. Your account price may differ; use a request quote where supported.Authorizations
Body
application/json