The REST API is in beta. This endpoint’s response shape may change.
Returns a list of current holdings for a brokerage connection. Holdings 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 | Description |
|---|
connectionId | string | Yes | Brokerage connection to fetch holdings from |
accountId | string | No | Filter to a specific brokerage account. Defaults to all accounts on the connection. |
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": "hold_abc123",
"accountId": "acc_abc123",
"accountName": "Trading Account",
"symbol": "VAS.AX",
"name": "Vanguard Australian Shares ETF",
"exchange": "ASX",
"currency": "AUD",
"quantity": "150.0000",
"averagePrice": "85.50",
"currentPrice": "92.30",
"marketValue": "13845.00",
"unrealizedPnl": "1020.00"
},
{
"id": "hold_def456",
"accountId": "acc_abc123",
"accountName": "Trading Account",
"symbol": "AAPL",
"name": "Apple Inc.",
"exchange": "NASDAQ",
"currency": "USD",
"quantity": "25.0000",
"averagePrice": "178.20",
"currentPrice": "195.40",
"marketValue": "4885.00",
"unrealizedPnl": "430.00"
}
]
}
Holding object
| Field | Type | Description |
|---|
id | string | Unique holding identifier |
accountId | string | ID of the brokerage account this holding belongs to |
accountName | string | Account display name |
symbol | string | Ticker symbol (e.g. AAPL, VAS.AX) |
name | string | null | Security name |
exchange | string | null | Exchange the security is listed on (e.g. ASX, NASDAQ) |
currency | string | Currency code (e.g. AUD, USD) |
quantity | string | Number of units held |
averagePrice | string | null | Average cost basis per unit |
currentPrice | string | null | Latest market price per unit |
marketValue | string | null | Current total value of the position |
unrealizedPnl | string | null | Unrealised gain or loss since purchase |
All monetary and quantity fields are strings to preserve decimal precision. Parse them as decimals in your application.
Error responses
| Status | When |
|---|
400 | Missing connectionId, invalid accountId, 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. |
Examples
All holdings for a brokerage connection
curl -H "Authorization: Bearer rbk_live_..." \
"https://api.redbark.co/v1/holdings?connectionId=conn_abc123"
Filter to a specific account
curl -H "Authorization: Bearer rbk_live_..." \
"https://api.redbark.co/v1/holdings?connectionId=conn_abc123&accountId=acc_abc123"
Python
import requests
API_KEY = "rbk_live_..."
BASE = "https://api.redbark.co"
resp = requests.get(
f"{BASE}/v1/holdings",
headers={"Authorization": f"Bearer {API_KEY}"},
params={"connectionId": "conn_abc123"},
)
holdings = resp.json()["data"]
for h in holdings:
print(f"{h['symbol']}: {h['quantity']} @ {h['currentPrice']} ({h['currency']})")
JavaScript
const API_KEY = "rbk_live_...";
const BASE = "https://api.redbark.co";
const params = new URLSearchParams({
connectionId: "conn_abc123",
});
const resp = await fetch(`${BASE}/v1/holdings?${params}`, {
headers: { Authorization: `Bearer ${API_KEY}` },
});
const { data: holdings } = await resp.json();
for (const h of holdings) {
console.log(`${h.symbol}: ${h.quantity} @ ${h.currentPrice} (${h.currency})`);
}