List trades
curl --request POST \
--url https://api.aisa.one/apis/v1/api-exchange-coinbase-com/markets/list-trades \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_id": "BTC-USD"
}
'import requests
url = "https://api.aisa.one/apis/v1/api-exchange-coinbase-com/markets/list-trades"
payload = { "product_id": "BTC-USD" }
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({product_id: 'BTC-USD'})
};
fetch('https://api.aisa.one/apis/v1/api-exchange-coinbase-com/markets/list-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/api-exchange-coinbase-com/markets/list-trades",
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([
'product_id' => 'BTC-USD'
]),
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/api-exchange-coinbase-com/markets/list-trades"
payload := strings.NewReader("{\n \"product_id\": \"BTC-USD\"\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/api-exchange-coinbase-com/markets/list-trades")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"product_id\": \"BTC-USD\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/api-exchange-coinbase-com/markets/list-trades")
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 \"product_id\": \"BTC-USD\"\n}"
response = http.request(request)
puts response.read_body{
"after": null,
"before": null,
"count": 5,
"limit": 5,
"newest_before": 1097948935,
"next_after": 1097948931,
"observed_at_ms": 1790268831436,
"product_id": "BTC-USD",
"source_url": "https://api.exchange.coinbase.com/products/BTC-USD/trades?limit=5",
"trades": [
{
"price": "84497.16000000",
"side": "buy",
"size": "0.00000024",
"time": "2026-09-24T16:53:46.462964Z",
"trade_id": 1097948935
},
{
"price": "84496.14000000",
"side": "buy",
"size": "0.00626960",
"time": "2026-09-24T16:53:46.215642Z",
"trade_id": 1097948934
},
{
"price": "84496.14000000",
"side": "buy",
"size": "0.00000003",
"time": "2026-09-24T16:53:46.210569Z",
"trade_id": 1097948933
},
{
"price": "84496.13000000",
"side": "buy",
"size": "0.00353505",
"time": "2026-09-24T16:53:46.125396Z",
"trade_id": 1097948932
},
{
"price": "84496.12000000",
"side": "buy",
"size": "0.00000030",
"time": "2026-09-24T16:53:45.843530Z",
"trade_id": 1097948931
}
]
}Coinbase Exchange
List trades
Tick-level trade history; walk next_after backwards for a backfill, or poll with before set to the newest trade id you have.
POST
https://api.aisa.one
/
apis
/
v1
/
api-exchange-coinbase-com
/
markets
/
list-trades
List trades
curl --request POST \
--url https://api.aisa.one/apis/v1/api-exchange-coinbase-com/markets/list-trades \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_id": "BTC-USD"
}
'import requests
url = "https://api.aisa.one/apis/v1/api-exchange-coinbase-com/markets/list-trades"
payload = { "product_id": "BTC-USD" }
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({product_id: 'BTC-USD'})
};
fetch('https://api.aisa.one/apis/v1/api-exchange-coinbase-com/markets/list-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/api-exchange-coinbase-com/markets/list-trades",
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([
'product_id' => 'BTC-USD'
]),
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/api-exchange-coinbase-com/markets/list-trades"
payload := strings.NewReader("{\n \"product_id\": \"BTC-USD\"\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/api-exchange-coinbase-com/markets/list-trades")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"product_id\": \"BTC-USD\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/api-exchange-coinbase-com/markets/list-trades")
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 \"product_id\": \"BTC-USD\"\n}"
response = http.request(request)
puts response.read_body{
"after": null,
"before": null,
"count": 5,
"limit": 5,
"newest_before": 1097948935,
"next_after": 1097948931,
"observed_at_ms": 1790268831436,
"product_id": "BTC-USD",
"source_url": "https://api.exchange.coinbase.com/products/BTC-USD/trades?limit=5",
"trades": [
{
"price": "84497.16000000",
"side": "buy",
"size": "0.00000024",
"time": "2026-09-24T16:53:46.462964Z",
"trade_id": 1097948935
},
{
"price": "84496.14000000",
"side": "buy",
"size": "0.00626960",
"time": "2026-09-24T16:53:46.215642Z",
"trade_id": 1097948934
},
{
"price": "84496.14000000",
"side": "buy",
"size": "0.00000003",
"time": "2026-09-24T16:53:46.210569Z",
"trade_id": 1097948933
},
{
"price": "84496.13000000",
"side": "buy",
"size": "0.00353505",
"time": "2026-09-24T16:53:46.125396Z",
"trade_id": 1097948932
},
{
"price": "84496.12000000",
"side": "buy",
"size": "0.00000030",
"time": "2026-09-24T16:53:45.843530Z",
"trade_id": 1097948931
}
]
}请求规范
- 方法与路径: POST /apis/v1/api-exchange-coinbase-com/markets/list-trades
- 可用状态: enabled
- 请求 URL 模板:
https://api.aisa.one/apis/v1/api-exchange-coinbase-com/markets/list-trades
{
"operationId": "api-exchange-coinbase-com.markets.list-trades",
"method": "POST",
"path": "/apis/v1/api-exchange-coinbase-com/markets/list-trades",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"examples": {
"provider": {
"summary": "Official provider example; checked against AIsa request constraints",
"value": {
"limit": 5,
"product_id": "BTC-USD"
}
}
},
"schema": {
"additionalProperties": true,
"properties": {
"after": {
"description": "Return trades with an id lower than this (older). Use `next_after` from the previous page. Mutually exclusive with `before`.\n\nProvider reference: minimum 1.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"min": 1
}
},
"before": {
"description": "Return trades with an id higher than this (newer). Mutually exclusive with `after`.\n\nProvider reference: minimum 1.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"min": 1
}
},
"limit": {
"default": 100,
"description": "Trades per page.\n\nProvider reference: minimum 1; maximum 1000; default 100.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 1000,
"min": 1
}
},
"product_id": {
"description": "Trading pair id `BASE-QUOTE` as listed by `list_products`, e.g. `BTC-USD`, `USELESS-USD`. Case-insensitive; the canonical upper-case id is returned. Pattern: ^[A-Za-z0-9]{1,20}-[A-Za-z0-9]{1,20}$.",
"type": "string"
}
},
"required": [
"product_id"
],
"type": "object"
}
}
},
"required": true
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
费用与请求规则
按实际用量收费。 默认请求预估费用:$0.0005 USD。 最终费用以实际用量为准。 账户适用价格可能不同;支持报价的接口可按实际请求获取报价。授权
请求体
application/json
响应
Recent trades for one trading pair (GET /products/{product_id}/trades), newest first, up to 1000 per page. Cursor pagination follows the exchange's cb-after/cb-before headers: pass after (a trade id) to get older trades, before to get newer ones. next_after is the cursor for the next older page.
The response contains the tool result directly.
The provider identifies trades as the primary payload key.
| Documented field | Provider type | Description |
|---|---|---|
price | string | Decimal string exactly as the exchange sends it (never converted to a float). |
side | string | Maker side as the exchange reports it: buy or sell. |
size | string | Decimal string exactly as the exchange sends it (never converted to a float). |
time | string | RFC 3339 UTC. |
trade_id | number |
These are the provider's documented fields. Field requiredness, nullability and nested object structures are specified only where the descriptions explicitly say so.