Skip to content

Developer API

Recipes

Two complete Developer API scripts, a year of transactions to CSV and a monthly cash-flow table, and a map from Lunch Money and YNAB API concepts.

This page has two complete scripts that read your data through the Developer API, each as a shell script (curl and jq) and as a Python script that uses only the standard library, with the output of a real run. Both take the app’s address from TAIGA_API and a token from TAIGA_TOKEN, and add /api/v1 to every path, so with TAIGA_API=https://app.taiga.finance the requests go to https://app.taiga.finance/api/v1. A read-only token is enough for both; Authentication covers creating one. The runs used a demo household’s seeded data.

How do I export every transaction for a year?

Section titled “How do I export every transaction for a year?”

This script writes every transaction dated in one calendar year to CSV, one page of up to 1,000 rows at a time. It needs a token of either kind, and bash with curl, jq and awk, or Python 3.

#!/usr/bin/env bash
# Export every transaction of one year to CSV, following next_cursor.
# Needs curl and jq. Usage: ./a-export-year.sh 2025 > transactions-2025.csv
set -euo pipefail
: "${TAIGA_API:?set TAIGA_API, e.g. https://app.example}" "${TAIGA_TOKEN:?set TAIGA_TOKEN}"
year=${1:-2025}
get() { # GET $1; on 429 sleep for Retry-After and try again
local hdr status body; hdr=$(mktemp)
while :; do
body=$(curl -sS -D "$hdr" -H "Authorization: Bearer $TAIGA_TOKEN" "$1")
status=$(awk 'NR==1{print $2}' "$hdr")
if [ "$status" = 429 ]; then
sleep "$(awk 'tolower($1)=="retry-after:"{print $2+0}' "$hdr")"; continue
fi
rm -f "$hdr"
[ "$status" = 200 ] || { echo "HTTP $status: $body" >&2; exit 1; }
printf '%s' "$body"; return
done
}
echo "id,split_of,date,account,merchant,category,amount,currency,amount_home"
cursor=""
while :; do
page=$(get "$TAIGA_API/api/v1/transactions?from=$year-01-01&to=$year-12-31&limit=1000${cursor:+&cursor=$cursor}")
jq -r '.data[] | [.id, .split_of, .date, .account_name, .merchant,
(if .category then .parent_category + "::" + .category else "" end),
.amount, .currency, .amount_home] | @csv' <<<"$page"
cursor=$(jq -r '.next_cursor // empty' <<<"$page")
[ -n "$cursor" ] || break
done

The run exported 2025 for one person in the demo household: 1,077 rows over two pages. The first seven rows follow; jq quotes every string, Python’s csv module only where it must.

id,split_of,date,account,merchant,category,amount,currency,amount_home
"1610843",,"2025-01-01","Chase Sapphire Preferred","Sweetgreen","Food::Dining Out",-21.47,"USD",-21.47
"1610844",,"2025-01-01","Chase Sapphire Preferred","Apple.Com","Utilities::Subscriptions",-6.06,"USD",-6.06
"1610845",,"2025-01-02","Chase Joint Checking","Denver Parking","Transportation::Transportation",-19.08,"USD",-19.08
"1610846",,"2025-01-02","Chase Joint Checking","Lowe's","Housing::Home Improvement",-160.97,"USD",-160.97
"1610847",,"2025-01-02","Chase Joint Checking","Transfer From Alliant Checking","Transfers::Transfers",3000.0,"USD",3000.0
"1610848",,"2025-01-03","Chase Joint Checking","King Soopers","Food::Groceries",-100.04,"USD",-100.04
"1610849",,"2025-01-03","Chase Joint Checking","Circle K","Transportation::Gas",-40.7,"USD",-40.7

The cursor loop. /transactions returns rows oldest first and a next_cursor with each page. The script sends it back as cursor with the same from and to, and stops when next_cursor is null. from and to are required and both inclusive; limit runs from 1 to 1,000 and defaults to 100. A split transaction reads as one row per leg, with the parent’s id in split_of, which is why the CSV has that column. Conventions covers the envelope, cursors and ids; Read reference lists every field of a row.

Backing off on a 429. Each person has 60 requests a minute and 2 in flight, across all their tokens. A request past either limit is 429 with a Retry-After header in whole seconds, and both scripts sleep that long and send the same request again. Limits and errors lists every refusal.

This script prints income, expenses and net for each month of a date range, in the household’s home currency. It needs a token of either kind, and bash with curl, jq and awk, or Python 3.

#!/usr/bin/env bash
# A monthly cash-flow table (income, expenses, net, in the household's home currency).
# Needs curl and jq. Usage: ./b-monthly-cashflow.sh 2025-01-01 2025-12-31
set -euo pipefail
: "${TAIGA_API:?set TAIGA_API}" "${TAIGA_TOKEN:?set TAIGA_TOKEN}"
from=${1:-2025-01-01}; to=${2:-2025-12-31}
curl -sS --fail-with-body "$TAIGA_API/api/v1/cashflow?from=$from&to=$to&granularity=month" \
-H "Authorization: Bearer $TAIGA_TOKEN" |
jq -r '.home_currency as $cur | (.data[] | [.period, .income, .expenses, .net, (if .partial then "partial" else "" end), $cur] | @tsv)' |
awk -F'\t' 'NR==1 {printf "%-9s%12s%12s%12s (%s)\n", "month", "income", "expenses", "net", $6}
{printf "%-9s%12.2f%12.2f%12.2f%s\n", $1, $2, $3, $4, ($5 ? " " $5 : "")}'

The run covered 2025 for the same household. The first six months follow; the full run printed all twelve.

month income expenses net (USD)
2025-01 8340.00 8442.66 -102.66
2025-02 5560.00 9240.96 -3680.96
2025-03 5560.00 9118.23 -3558.23
2025-04 5560.00 9193.43 -3633.43
2025-05 5560.00 13463.67 -7903.67
2025-06 5560.00 9004.20 -3444.20

One request, no cursor. Only /transactions and /balances paginate. /cashflow returns every period in one answer with next_cursor null, so the script makes a single call and has no retry loop. granularity takes month, quarter or year, up to 60 months, 40 quarters or 20 years per request. Every figure is in the envelope’s home_currency.

The partial flag. Periods before the first recorded flow and after the envelope’s as_of day are left out. A period that lacks some of its data has partial true, and the script marks that row; partial_start, excluded_count and excluded_currencies say what is missing. Read reference lists the fields.

The table maps the read concepts of the Lunch Money API and the YNAB API to the Taiga Finance API.

Lunch Money YNAB Taiga Finance /api/v1
Access token (Bearer) Personal access token (Bearer) Personal token taiga_pat_…, in the Authorization: Bearer header only, expiring after 30, 90 or 365 days
GET /transactions with start and end dates, offset paging GET /budgets/{id}/transactions with since_date; delta requests with server_knowledge GET /transactions?from=&to=, both required and inclusive, with an opaque cursor. No delta or changes feed, no webhooks
Assets, Plaid accounts Accounts GET /accounts, including a partner’s accounts shared at balance only; GET /balances for dated balance history
Categories, category groups Category groups, categories parent_category and category (the sub-category) on each transaction row
Payee Payee merchant on each transaction row; no payee list endpoint
Tags Flags tags on each transaction row, a list of names
Split transactions subtransactions One row per leg, id <id>-s<slot>, with split_of, split_slot and split_note
Budgets Months, budgeted amounts per category GET /budget?month=YYYY-MM
Recurring items Scheduled transactions GET /recurring
— — GET /cashflow, GET /holdings
Transaction groups — No equivalent: the API has no transaction groups
Decimal strings Integer amounts in thousandths of a currency unit Decimal JSON numbers in the row’s currency, and amount_home in the household’s home currency

Scripts that change data, and the write rows of this map, are on Write recipes.