The REST API is in beta. This endpoint’s response shape may change.
Returns a paginated list of trades for a brokerage connection. Trades are fetched live from the brokerage provider. No investment data is stored on Redbark servers.
This endpoint requires a Pro plan subscription. Requests from Starter plan API keys return a 403 error with code pro_required.
Request
| Header | Required | Description |
|---|
Authorization | Yes | Bearer rbk_live_... |
Query parameters
| Parameter | Type | Required | Default | Description |
|---|
connectionId | string | Yes | | Brokerage connection to fetch trades from |
accountId | string | No | All accounts | Filter to a specific brokerage account |
from | string | No | All history | Start date (YYYY-MM-DD or ISO 8601) |
to | string | No | Now | End date (YYYY-MM-DD or ISO 8601) |
limit | integer | No | 200 | Maximum items to return (1 to 500) |
offset | integer | No | 0 | Number of items to skip |
connectionId must refer to a brokerage connection. Passing a banking connection ID returns a 400 error. Use the List Connections endpoint to find your brokerage connection IDs.
Response
{
"data": [
{
"id": "trade_abc123",
"accountId": "acc_abc123",
"accountName": "Trading Account",
"symbol": "VAS.AX",
"name": "Vanguard Australian Shares ETF",
"type": "buy",
"quantity": "50.0000",
"price": "89.75",
"currency": "AUD",
"totalAmount": "4487.50",
"fees": "9.50",
"tradeDate": "2026-03-15",
"settlementDate": "2026-03-17",
"description": null
},
{
"id": "trade_def456",
"accountId": "acc_abc123",
"accountName": "Trading Account",
"symbol": "CBA.AX",
"name": "Commonwealth Bank of Australia",
"type": "sell",
"quantity": "20.0000",
"price": "142.30",
"currency": "AUD",
"totalAmount": "2846.00",
"fees": "9.50",
"tradeDate": "2026-03-10",
"settlementDate": "2026-03-12",
"description": null
}
],
"pagination": {
"total": -1,
"limit": 200,
"offset": 0,
"hasMore": true
}
}
Trade object
| Field | Type | Description |
|---|
id | string | Unique trade identifier |
accountId | string | ID of the brokerage account |
accountName | string | Account display name |
symbol | string | Ticker symbol (e.g. VAS.AX, AAPL) |
name | string | null | Security name |
type | string | Trade type (e.g. buy, sell) |
quantity | string | Number of units traded |
price | string | Price per unit at execution |
currency | string | Currency code (e.g. AUD, USD) |
totalAmount | string | Total value of the trade |
fees | string | null | Brokerage fees charged |
tradeDate | string | Date the order was executed |
settlementDate | string | null | Date the trade settled |
description | string | null | Additional description from the broker, if any |
All monetary and quantity fields are strings to preserve decimal precision. Parse them as decimals in your application.
| Field | Type | Description |
|---|
total | integer | Total number of matching trades. Returns -1 when hasMore is true (the total is not known until all pages have been fetched). |
limit | integer | Limit applied to this request |
offset | integer | Offset applied to this request |
hasMore | boolean | true if more items exist beyond this page |
Error responses
| Status | When |
|---|
400 | Missing connectionId, invalid date format, or connection is not a brokerage |
403 | API key is not on the Pro plan |
404 | Connection or account not found, or does not belong to you |
503 | Brokerage provider temporarily unavailable. Retry later. |
Date validation
The from and to parameters accept:
- Date strings:
2026-03-01
- Full ISO 8601:
2026-03-01T00:00:00Z
Invalid formats return a 400 with details:
{
"error": {
"message": "Invalid date parameters",
"details": [
"from: Must be a valid ISO 8601 date string (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ssZ)"
]
}
}
Examples
All trades for a connection
curl -H "Authorization: Bearer rbk_live_..." \
"https://api.redbark.co/v1/trades?connectionId=conn_abc123"
Filter by date range
curl -H "Authorization: Bearer rbk_live_..." \
"https://api.redbark.co/v1/trades?connectionId=conn_abc123&from=2026-01-01&to=2026-03-31"
Paginate
curl -H "Authorization: Bearer rbk_live_..." \
"https://api.redbark.co/v1/trades?connectionId=conn_abc123&limit=50&offset=50"
Python: fetch all pages
import requests
API_KEY = "rbk_live_..."
BASE = "https://api.redbark.co"
all_trades = []
offset = 0
limit = 200
while True:
resp = requests.get(
f"{BASE}/v1/trades",
headers={"Authorization": f"Bearer {API_KEY}"},
params={
"connectionId": "conn_abc123",
"from": "2026-01-01",
"to": "2026-03-31",
"limit": limit,
"offset": offset,
},
)
data = resp.json()
all_trades.extend(data["data"])
if not data["pagination"]["hasMore"]:
break
offset += limit
print(f"Fetched {len(all_trades)} trades")
JavaScript: fetch all pages
const API_KEY = "rbk_live_...";
const BASE = "https://api.redbark.co";
const allTrades = [];
let offset = 0;
const limit = 200;
while (true) {
const params = new URLSearchParams({
connectionId: "conn_abc123",
from: "2026-01-01",
to: "2026-03-31",
limit: String(limit),
offset: String(offset),
});
const resp = await fetch(`${BASE}/v1/trades?${params}`, {
headers: { Authorization: `Bearer ${API_KEY}` },
});
const { data, pagination } = await resp.json();
allTrades.push(...data);
if (!pagination.hasMore) break;
offset += limit;
}
console.log(`Fetched ${allTrades.length} trades`);