Portfolio
/v1/portfolioGet the portfolio
The investment portfolio's value, cost and gain, today's move, and how it splits: by asset class, security type, account and tax treatment, with its concentration. Accounts left out of the ledger's totals are left out here too.
Parameters
X-Organization-Id string | null · header |
Returns 200 · Portfolio
accounts | The accounts holding it, largest first. |
allocation | By security type (equity, etf, mutual fund, …); largest first. |
alternatives_value Money · required | Documented alternative investments (private equity, collectibles, …). |
as_of date | null · required | The latest date an institution priced any holding. |
asset_classes | stocks, fixed_income, cash, crypto, alternatives; largest first. |
combined_value Money · required | total_value + alternatives_value. |
currency string · required | The ledger's base currency; every amount is in it. |
day_return | Today's move, summed over the positions the market feed prices. Null until the feed has a previous close for one of them. |
diversification Diversification · required | |
tax_treatments | By tax treatment of the account; largest first. |
total_cost_basis Money · required | |
total_value Money · required | What the securities are worth. |
unrealized_gain Money · required | Value less cost, over the positions that carry a cost basis. |
unrealized_gain_percent string · required | Pattern: ^-?\d+(\.\d+)?$. |
curl -X GET "https://api.lumaledger.app/v1/portfolio" \
-H "Authorization: Bearer $LUMALEDGER_TOKEN"/v1/portfolio/accounts/{account_id}Get an account's holdings
What one account holds, position by position, valued in the account's
own currency and weighted within it. An account that holds nothing (a
checking account, most of the time) answers with no positions, not a
404. Ids come from accounts.list.
Parameters
account_id integer · path · required | |
X-Organization-Id string | null · header |
Returns 200 · AccountHoldings
account_id integer · required | |
as_of date | null · required | The latest date the institution priced a holding. |
currency string · required | The account's currency; every amount is in it. |
day_return | |
positions | Largest first. |
total_cost_basis | Null when no position carries a cost basis. |
total_value Money · required | |
unrealized_gain |
curl -X GET "https://api.lumaledger.app/v1/portfolio/accounts/{account_id}" \
-H "Authorization: Bearer $LUMALEDGER_TOKEN"/v1/portfolio/activityList investment activity
The buys, sells, dividends, contributions, fees and transfers inside the investment accounts, newest first: the history behind the holdings. Cancelled trades are left out.
Parameters
limit integer · query | Page size, 1–200. |
cursor string | null · query | The next_cursor of the previous page. |
account_id integer | null · query | Only this investment account. Ids from accounts.list. |
since date | null · query | On or after this date. |
until date | null · query | On or before this date. |
X-Organization-Id string | null · header |
Returns 200 · InvestmentActivityList
data | |
has_more boolean · required | |
next_cursor string | null · required |
curl -X GET "https://api.lumaledger.app/v1/portfolio/activity" \
-H "Authorization: Bearer $LUMALEDGER_TOKEN"/v1/portfolio/positionsList positions
Every security the portfolio holds, summed across accounts and valued in the ledger's base currency, with its weight in the whole.
Parameters
limit integer · query | Page size, 1–200. |
cursor string | null · query | The next_cursor of the previous page. |
X-Organization-Id string | null · header |
Returns 200 · PositionList
data | |
has_more boolean · required | |
next_cursor string | null · required |
curl -X GET "https://api.lumaledger.app/v1/portfolio/positions" \
-H "Authorization: Bearer $LUMALEDGER_TOKEN"/v1/portfolio/positions/{symbol}Get a position
One position by ticker: how much the ledger holds, in which accounts, its cost and gain, the latest quote and a year of daily closes. Only a ticker the ledger holds is found; this is not a market-data lookup.
Parameters
symbol string · path · required | |
X-Organization-Id string | null · header |
Returns 200 · PositionDetail
accounts | Where it is held, largest first. |
average_cost | Cost basis per share. |
cost_basis | |
currency string · required | The ledger's base currency; the position's amounts are in it. |
day_return | |
gain | |
gain_percent string | null · required | Pattern: ^-?\d+(\.\d+)?$. |
history | A year of daily closes, oldest first. |
is_estimate boolean · required | |
name string · required | |
quantity string · required | Pattern: ^-?\d+(\.\d+)?$. |
quote Quote · required | |
security_type string · required | |
stats Stats · required | |
symbol string · required | |
value Money · required | |
weight string · required | Share of the whole portfolio, 0–1. Pattern: ^-?\d+(\.\d+)?$. |
curl -X GET "https://api.lumaledger.app/v1/portfolio/positions/{symbol}" \
-H "Authorization: Bearer $LUMALEDGER_TOKEN"Objects
AccountHoldings
What one account holds, valued in the account's own currency and weighted within the account.
Fields
account_id integer · required | |
as_of date | null · required | The latest date the institution priced a holding. |
currency string · required | The account's currency; every amount is in it. |
day_return | |
positions | Largest first. |
total_cost_basis | Null when no position carries a cost basis. |
total_value Money · required | |
unrealized_gain |
Diversification
Fields
effective_holdings string · required | 1 / hhi: how many equal positions it behaves like. Pattern: ^-?\d+(\.\d+)?$. |
hhi string · required | Herfindahl–Hirschman index of the position weights, 0–1: higher is more concentrated. Pattern: ^-?\d+(\.\d+)?$. |
positions integer · required | |
top5_share string · required | The five largest positions' weight, 0–1. Pattern: ^-?\d+(\.\d+)?$. |
top_share string · required | The largest position's weight, 0–1. Pattern: ^-?\d+(\.\d+)?$. |
InvestmentActivity
A trade or cash event inside an investment account.
Fields
account_id integer · required | |
cash Money · required | Cash into the account (positive) or out of it (negative). |
date date · required | |
fees | |
id integer · required | |
name string · required | |
price | |
quantity string · required | Shares or units; 0 for a cash event. Pattern: ^-?\d+(\.\d+)?$. |
subtype string | null · required | As the institution refines it (dividend, contribution, …). |
symbol string | null · required | |
type string · required | buy, sell, cash, fee or transfer. |
InvestmentActivityList
A page of investment activity, newest first.
Fields
data | |
has_more boolean · required | |
next_cursor string | null · required |
Money
An amount and its currency. `amount` is a base-10 string with two
decimal places and an optional leading minus sign. Parse it with a
decimal type, not a float.
Fields
amount string · required | Pattern: ^-?\d+\.\d{2}$. |
currency string · required | ISO 4217 code. Pattern: ^[A-Z]{3}$. |
Portfolio
The investment portfolio as a whole, valued in the ledger's base
currency. Positions are listed by positions.list.
Fields
accounts | The accounts holding it, largest first. |
allocation | By security type (equity, etf, mutual fund, …); largest first. |
alternatives_value Money · required | Documented alternative investments (private equity, collectibles, …). |
as_of date | null · required | The latest date an institution priced any holding. |
asset_classes | stocks, fixed_income, cash, crypto, alternatives; largest first. |
combined_value Money · required | total_value + alternatives_value. |
currency string · required | The ledger's base currency; every amount is in it. |
day_return | Today's move, summed over the positions the market feed prices. Null until the feed has a previous close for one of them. |
diversification Diversification · required | |
tax_treatments | By tax treatment of the account; largest first. |
total_cost_basis Money · required | |
total_value Money · required | What the securities are worth. |
unrealized_gain Money · required | Value less cost, over the positions that carry a cost basis. |
unrealized_gain_percent string · required | Pattern: ^-?\d+(\.\d+)?$. |
PortfolioAccount
Fields
account_id integer · required | |
name string · required | |
role string | null · required | brokerage, ira, roth_ira, 401k, hsa, … |
share string · required | Share of the holdings' value, 0–1. Pattern: ^-?\d+(\.\d+)?$. |
tax_treatment string · required | taxable, tax_deferred or tax_free. |
value Money · required |
Position
A security held, summed across the accounts that hold it.
Fields
cost_basis | Null when an institution did not report one. |
day_change_percent string | null · required | Pattern: ^-?\d+(\.\d+)?$. |
day_return | What today's move did to the position. |
gain | value − cost_basis. |
gain_percent string | null · required | Pattern: ^-?\d+(\.\d+)?$. |
is_estimate boolean · required | The value is the cost basis standing in for a market value. |
last_price | The feed's latest daily close. |
last_price_date date | null · required | |
name string · required | |
previous_close | |
quantity string · required | Shares or units held. Pattern: ^-?\d+(\.\d+)?$. |
security_type string · required | equity, etf, mutual fund, fixed income, cash, cryptocurrency, … |
symbol string · required | The ticker, as positions.get takes it. |
value Money · required | |
weight string · required | Share of the list's total value, 0–1. Pattern: ^-?\d+(\.\d+)?$. |
PositionAccount
Fields
account_id integer · required | |
mask string | null · required | |
name string · required | |
quantity string · required | Pattern: ^-?\d+(\.\d+)?$. |
share string · required | This account's share of the position, 0–1. Pattern: ^-?\d+(\.\d+)?$. |
value Money · required |
PositionDetail
One position: what the ledger holds of it, where, and what the market did to it over the past year.
Fields
accounts | Where it is held, largest first. |
average_cost | Cost basis per share. |
cost_basis | |
currency string · required | The ledger's base currency; the position's amounts are in it. |
day_return | |
gain | |
gain_percent string | null · required | Pattern: ^-?\d+(\.\d+)?$. |
history | A year of daily closes, oldest first. |
is_estimate boolean · required | |
name string · required | |
quantity string · required | Pattern: ^-?\d+(\.\d+)?$. |
quote Quote · required | |
security_type string · required | |
stats Stats · required | |
symbol string · required | |
value Money · required | |
weight string · required | Share of the whole portfolio, 0–1. Pattern: ^-?\d+(\.\d+)?$. |
PositionList
A page of positions, in symbol order.
Fields
data | |
has_more boolean · required | |
next_cursor string | null · required |
PricePoint
Fields
date date · required | |
value UnitPrice · required | The day's close. |
Quote
Slice
One slice of the portfolio's value.
Fields
key string · required | |
share string · required | Share of the whole, 0–1. Pattern: ^-?\d+(\.\d+)?$. |
value Money · required |
Stats
The latest session's figures, and what a year of closes says.
UnitPrice
A price per share or per unit. Unlike `Money` it keeps the
precision the institution quoted (up to 8 places): a coin or a penny
stock is not priced in whole cents.
Fields
amount string · required | Pattern: ^-?\d+(\.\d+)?$. |
currency string · required | ISO 4217 code. Pattern: ^[A-Z]{3}$. |