Query
The Transactions Query API returns transaction data filtered by date range, portfolio scope, and attribute-based criteria. It is the primary endpoint for pulling transaction history into data warehouses, reconciliation systems, and reporting pipelines. Unlike the Transactions endpoint (which operates on individual records by ID), Transactions Query lets you retrieve many transactions at once based on who owns them, what date range they fall in, and what attributes they have.
Use this endpoint for synchronous, filtered reads. For large exports that may time out, use Transaction Jobs instead.
Overview
| Base route | /v1/transactions/query |
| Method | POST |
| Produces | JSON |
| Pagination | No |
| OAuth scopes | TRANSACTIONS or TRANSACTIONS_WRITE |
Access requirements
- API Access: Create, edit, and delete.
- Transaction firm view: View only.
- Transactions: View-only permission to extract transaction data.
Required parameters
| Parameter | Description |
|---|---|
columns | Attribute keys to return as columns. Array of strings. Example: ["trade_date", "security", "value"] |
start_date | Beginning of the date range. YYYY-MM-DD. |
end_date | End of the date range. YYYY-MM-DD. |
portfolio_type | Scope of the query. Values: ENTITY, ENTITY_FUNDS, GROUP, GROUP_FUNDS, FIRM, FIRM_ACCOUNTS, FIRM_CLIENTS, FIRM_HOUSEHOLDS, FIRM_UNVERIFIED_ACCOUNTS. |
portfolio_id | Entity ID, group ID, or 1 (for firm). Accepts a single number or array. |
Alternative to portfolio_id: Pass external_ids to scope by external identifier instead of internal ID. Format: [{"external_type_key": "salesforce", "external_id": "sf_record_123"}]
Optional parameters
| Parameter | Description |
|---|---|
filters | Filter rows by attribute values. Array of filter objects (see below). |
sortings | Sort results by up to 3 columns. Array of {"attribute": "...", "ascending": true/false}. Default: trade date descending. |
limit | Maximum transactions to return. Default: no limit (returns all matching). |
include_online_valuations | Include online snapshots. Default: false. |
include_unverified | Include unverified transactions. Default: false. |
include_deleted | Include deleted online transactions. Default: false. |
Query transactions
POST /v1/transactions/query
curl -X POST "https://{firm}.addepar.com/api/v1/transactions/query" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/vnd.api+json" \
-H "Accept: application/vnd.api+json" \
-d '{
"data": {
"type": "transaction_query",
"attributes": {
"columns": ["direct_owner", "security", "value", "trade_date"],
"portfolio_type": "GROUP",
"portfolio_id": 7,
"start_date": "2021-02-01",
"end_date": "2021-03-01",
"include_online_valuations": false,
"include_unverified": false,
"include_deleted": true
}
}
}'
{
"meta": {
"columns": ["direct_owner", "security", "value", "trade_date"]
},
"data": [
{
"id": "7",
"type": "transaction_query",
"attributes": {
"direct_owner": { "name": "Person 1", "entity_id": 22 },
"security": { "name": "Holding Company 1", "entity_id": 21 },
"trade_date": "2000-01-01",
"value": null
}
}
],
"included": [],
"links": { "next": null }
}
The response meta.columns array confirms which columns were used. Each row in data is a transaction with the requested attribute values. Entity-reference columns (like direct_owner, security) return an object with name and entity_id.
Response codes:
200 OK-- Query succeeded400 Bad Request-- Malformed query, invalid column name, or missing required parameters403 Forbidden-- Insufficient permissions or scope
Filter object
Filters narrow results by attribute value. Each filter specifies an attribute, an operator (include or exclude), a type that matches the attribute's data type, and the criteria.
| Field | Description |
|---|---|
attribute | Column key to filter on. Example: "security", "trade_date" |
operator | include (keep matching rows) or exclude (remove matching rows). |
type | Data type of the filter. Values: DISCRETE, NUMBER, DATE, STRING. |
Type-specific fields:
| Filter type | Required field | Format |
|---|---|---|
DISCRETE | values (plural) | Array of strings. Case-sensitive. Example: ["Buy", "Sell"] |
STRING | value (singular) | Space-separated tokens. Matches any token. Example: "stock Apple" |
NUMBER | number | Object with start and end. Example: {"start": 1, "end": 30.5} |
DATE | period | Period object (see date filters below). |
Example with discrete filter:
curl -X POST "https://{firm}.addepar.com/api/v1/transactions/query" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/vnd.api+json" \
-H "Accept: application/vnd.api+json" \
-d '{
"data": {
"type": "transaction_query",
"attributes": {
"columns": ["direct_owner", "value", "trade_date"],
"filters": [
{
"operator": "include",
"type": "discrete",
"values": ["Buy", "Sell"],
"attribute": "type"
}
],
"portfolio_type": "firm",
"portfolio_id": [1],
"start_date": "2021-09-05",
"end_date": "2021-10-05",
"include_online_valuations": false,
"include_unverified": false,
"include_deleted": true
}
}
}'
Date filters
Date filters use a period object that defines the time window. The period type determines which additional fields are required:
| Period type | Additional fields | Description |
|---|---|---|
static_time_period | start, end (both YYYY-MM-DD) | Fixed date range. |
trailing_time_period | period (duration string) | Window trailing backward from the query's end date. |
relative_time_period | period (duration string) | Relative to today. |
current_time_period | None | Current calendar period. |
since_inception_time_period | None | From position inception to query end. |
inception_to_start_date_time_period | None | From inception to query start date. |
custom_time_period | Varies | Custom-defined range. |
Duration string format: P{count}{unit} where unit is: D (days), K (weekdays), W (weeks), M (months), Q (quarters), Y (years). Example: "P3M" = 3 months, "P2K" = 2 weekdays.
Static time period example:
{
"attribute": "trade_date",
"operator": "include",
"type": "date",
"period": {
"type": "static_time_period",
"start": "2020-01-02",
"end": "2020-01-03"
}
}
Trailing time period example:
{
"attribute": "trade_date",
"operator": "include",
"type": "date",
"period": {
"type": "trailing_time_period",
"period": "P2K"
}
}
Sorting
Sort results by up to 3 columns. The order of entries in the array determines priority (first entry is the primary sort).
"sorting": [
{ "attribute": "trade_date", "ascending": false },
{ "attribute": "security", "ascending": true }
]
This sorts newest trades first, then alphabetically by security name within the same date.
Available columns
Full column reference (90+ columns)
| Column key | Addepar UI label |
|---|---|
account_number | Account # |
accrued_income | Snapshot Accrued Income |
are_tax_lots_ignored | Are Custodian Tax Lots Ignored |
asset_class | Asset Class |
cash_account | Paid to(from) |
client | Client |
comments | Comments |
context | Context |
currency | Currency |
cusip | CUSIP |
data_source | Data Source |
data_type | Summary Data Level |
description | Description |
direct_owner_id | Direct Owner Entity ID |
edited_online_data | Edited Online Data |
associated_hidden_positions | Associated Hidden Position(s) |
entity_id | Entity ID |
ex_date | Ex-Date |
fees | Fees |
fund | Fund |
affected_by_hidden_positions | Affected by Hidden Position(s) |
has_tax_lots | Has Tax Lots |
has_wash_sale | Has Wash Sale |
is_verified | Is Verified |
direct_owner | Direct Owner |
id | ID |
isin | ISIN |
limited_partner | Limited Partner |
other_affected_assets | Other Affected Assets |
ownership_type | Ownership Type |
account_name | Account Name |
position | Position |
position_id | Position ID |
posted_date | Posted Date |
price_factor | Price Factor |
price_per_share | Price Per Share |
recallable_amount | Recallable Amount |
security | Security |
model_type | Security Model Type |
sedol | SEDOL |
grouping_configuration | Grouping Configuration |
tag | TAG |
ticker_symbol | Ticker Symbol |
trade_date | Trade Date |
settlement_date | Settlement Date |
snapshot_units | Snapshot Units |
summary | Summary |
transaction_units | Transaction Units |
type | Type |
units | Units |
units_changed | Units Changed |
value | Value |
vendor_id | Vendor ID |
affects_adjusted_value | Affects Adjusted Value |
affects_cost_basis | Affects Cost Basis |
affects_paid_in_capital | Affects Paid-in Capital |
affects_unfunded_commitments | Affects Unfunded Commitments |
general_fee | General Fee |
external_brokerage_fee | External Broker Fee |
internal_brokerage_fee | Internal Broker Fee |
other_government_tax | Other Government Tax |
counterparty_fee | Counterparty Fee |
entry_exit_fee | Entry and Exit Fee |
foreign_fee | Foreign Fee |
matching_fee | Matching/Confirmation Fee |
market_fee | Market Fee |
market_tax | Market Tax |
other_fee | Other Fee |
stamp_tax | Stamp Duty |
stock_exchange_tax | Stock Exchange Tax |
stock_exchange_fee | Stock Exchange Fee |
turnover_fee | Turnover Fee |
value_added_tax | Value Added Tax (VAT) |
withholding_tax | Withholding Tax |
last_edit_by | Last Edited By |
last_edit_date | Last Edited Date |
modified_date | Modified Date |
general_distribution | General Distribution |
return_of_capital | Return of Capital |
long_term_capital_gain | Long-Term Capital Gain |
short_term_capital_gain | Short-Term Capital Gain |
unknown_capital_gain | Unknown Capital Gain |
interest_income | Interest Income |
ordinary_income | Ordinary Income |
dividend_income | Dividend Income |
total_distribution | Total Distribution |
created_date | Created Date |
Related
- Transactions -- Single-record CRUD operations
- Transaction Jobs -- Async export for large datasets
- Transaction Types -- Valid type classifications for filtering
- Attributes -- Discover available attribute keys for columns and filters
- External Identifiers -- Use external IDs as portfolio scope
Updated 8 days ago