Reference example
# Fixed reference example. Playground inputs do not update this sample.
curl --request GET \
--url 'https://api.aisa.one/apis/v1/polymarket/builder/trades?after=1600000000&asset_id=15871154585880608648532107628464183779895785213830018178010423617714102767076&before=1700000000&builder_code=0x0000000000000000000000000000000000000000000000000000000000000001&id=trade-123&market=0x0000000000000000000000000000000000000000000000000000000000000001&next_cursor=MA%3D%3D' \
--header 'Authorization: Bearer <token>'curl --request GET \
--url https://api.aisa.one/apis/v1/polymarket/builder/trades \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/polymarket/builder/trades"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/polymarket/builder/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://api.aisa.one/apis/v1/polymarket/builder/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://api.aisa.one/apis/v1/polymarket/builder/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://api.aisa.one/apis/v1/polymarket/builder/trades")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/polymarket/builder/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{
"count": 2,
"data": [
{
"assetId": "15871154585880608648532107628464183779895785213830018178010423617714102767076",
"bucketIndex": 0,
"builder": "0x0000000000000000000000000000000000000000000000000000000000000001",
"createdAt": "2024-01-01T00:00:00Z",
"fee": "300000",
"feeUsdc": "150000",
"id": "trade-123",
"maker": "0x1234567890123456789012345678901234567890",
"market": "0x0000000000000000000000000000000000000000000000000000000000000001",
"matchTime": "1700000000",
"outcome": "YES",
"outcomeIndex": 0,
"owner": "f4f247b7-4ac7-ff29-a152-04fda0a8755a",
"price": "0.5",
"side": "BUY",
"size": "100000000",
"sizeUsdc": "50000000",
"status": "TRADE_STATUS_CONFIRMED",
"takerOrderHash": "0xabcdef1234567890abcdef1234567890abcdef12",
"tradeType": "TAKER",
"transactionHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"updatedAt": "2024-01-01T00:00:00Z"
}
],
"limit": 300,
"next_cursor": "MzAw"
}CLOB
Get builder trades
Retrieves trades attributed to a builder code.
GET
https://api.aisa.one
/
apis
/
v1
/
polymarket
/
builder
/
trades
Reference example
# Fixed reference example. Playground inputs do not update this sample.
curl --request GET \
--url 'https://api.aisa.one/apis/v1/polymarket/builder/trades?after=1600000000&asset_id=15871154585880608648532107628464183779895785213830018178010423617714102767076&before=1700000000&builder_code=0x0000000000000000000000000000000000000000000000000000000000000001&id=trade-123&market=0x0000000000000000000000000000000000000000000000000000000000000001&next_cursor=MA%3D%3D' \
--header 'Authorization: Bearer <token>'curl --request GET \
--url https://api.aisa.one/apis/v1/polymarket/builder/trades \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/polymarket/builder/trades"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/polymarket/builder/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://api.aisa.one/apis/v1/polymarket/builder/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://api.aisa.one/apis/v1/polymarket/builder/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://api.aisa.one/apis/v1/polymarket/builder/trades")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/polymarket/builder/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{
"count": 2,
"data": [
{
"assetId": "15871154585880608648532107628464183779895785213830018178010423617714102767076",
"bucketIndex": 0,
"builder": "0x0000000000000000000000000000000000000000000000000000000000000001",
"createdAt": "2024-01-01T00:00:00Z",
"fee": "300000",
"feeUsdc": "150000",
"id": "trade-123",
"maker": "0x1234567890123456789012345678901234567890",
"market": "0x0000000000000000000000000000000000000000000000000000000000000001",
"matchTime": "1700000000",
"outcome": "YES",
"outcomeIndex": 0,
"owner": "f4f247b7-4ac7-ff29-a152-04fda0a8755a",
"price": "0.5",
"side": "BUY",
"size": "100000000",
"sizeUsdc": "50000000",
"status": "TRADE_STATUS_CONFIRMED",
"takerOrderHash": "0xabcdef1234567890abcdef1234567890abcdef12",
"tradeType": "TAKER",
"transactionHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"updatedAt": "2024-01-01T00:00:00Z"
}
],
"limit": 300,
"next_cursor": "MzAw"
}请求规范
- 方法与路径: GET /apis/v1/polymarket/builder/trades
- 可用状态: enabled
- 请求 URL 模板:
https://api.aisa.one/apis/v1/polymarket/builder/trades - after: query; 可选
- asset_id: query; 可选
- before: query; 可选
- builder_code: query; 必填
- id: query; 可选
- market: query; 可选
- next_cursor: query; 可选
{
"operationId": "any_polymarket_clob_apis_v1_polymarket_builder_trades",
"method": "GET",
"path": "/apis/v1/polymarket/builder/trades",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [
{
"description": "Filter trades after this Unix timestamp",
"example": "1600000000",
"in": "query",
"name": "after",
"required": false,
"schema": {
"pattern": "^\\d+$",
"type": "string"
}
},
{
"description": "Asset ID (token ID) to filter trades",
"example": "15871154585880608648532107628464183779895785213830018178010423617714102767076",
"in": "query",
"name": "asset_id",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Filter trades before this Unix timestamp",
"example": "1700000000",
"in": "query",
"name": "before",
"required": false,
"schema": {
"pattern": "^\\d+$",
"type": "string"
}
},
{
"description": "Builder code to fetch attributed trades for",
"example": "0x0000000000000000000000000000000000000000000000000000000000000001",
"in": "query",
"name": "builder_code",
"required": true,
"schema": {
"pattern": "^0x[a-fA-F0-9]{64}$",
"type": "string"
}
},
{
"description": "Trade ID to filter by specific trade",
"example": "trade-123",
"in": "query",
"name": "id",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Market (condition ID) to filter trades",
"example": "0x0000000000000000000000000000000000000000000000000000000000000001",
"in": "query",
"name": "market",
"required": false,
"schema": {
"pattern": "^0x[a-fA-F0-9]{64}$",
"type": "string"
}
},
{
"description": "Cursor for pagination (base64 encoded offset)",
"example": "MA==",
"in": "query",
"name": "next_cursor",
"required": false,
"schema": {
"type": "string"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
费用与请求规则
公开参考价格:每次成功请求 $0.012 USD。 账户适用价格可能不同;支持报价的接口可按实际请求获取报价。授权
查询参数
响应
Successfully retrieved builder trades
Paginated builder trades response