Guides
Read balances and history
Balances, limits, trades and the full ledger, read with a key that can't change anything. The usual start for trackers, dashboards and accounting exports.
Before you start
A key with account:read for balances and limits, and transactions:read for history. Both are on by default when you create a key, and neither can move money.
Balances
GET/v1/balances lists each asset with a non-zero total, and USDC always:
availablecan be traded or given as a gift card now;heldis reserved: open orders, a pending trade, loan collateral;totalisavailableplusheld;value_usdcandvalue_iskare indicative values at current prices.
# Signed by sign-headers.sh: see Authentication
curl https://public-api.myntkaup.is/v1/balances \
$(./sign-headers.sh GET /v1/balances | sed 's/^/-H /')import { Myntkaup } from "@myntkaup/api";
const client = new Myntkaup(); // reads the key from the environment
const balances = await client.balances.list();
for (const balance of balances.data) {
console.log(balance.asset, balance.available, balance.held);
}from myntkaup import Myntkaup
client = Myntkaup() # reads the key from the environment
balances = client.balances.list()
for balance in balances["data"]:
print(balance["asset"], balance["available"], balance["held"]){
"as_of": "2026-11-03T10:15:10Z",
"total_value_usdc": "1180.31",
"total_value_isk": "164210",
"data": [
{
"asset": "BTC",
"available": "0.0123",
"held": "0",
"total": "0.0123",
"value_usdc": "1180.31",
"value_isk": "164210"
}
]
}Amounts are decimal strings. Add them up with a decimal type, never as floats.
Limits
GET/v1/limits shows your trade and gift card limits, how much of today's (UTC) and the last 30
days' allowance you've used, and the key's rate limits. Check it before a large trade.
Trades or transactions?
There are two histories, for different questions:
GET/v1/trades | GET/v1/transactions | |
|---|---|---|
| What | Trades only | Every change to a balance: the ledger |
| Includes | Trades from the API, the app and the webapp (source) | Trades, deposits, withdrawals, fees, gifts and gift codes, referral bonuses, loans, holds |
| Each entry | Asset, side, amounts, price, status | A type, a label, and changes per asset with balance_after |
| Filters | asset, side, from, to | asset, type, from, to, lang |
| Good for | Trade history, average cost, P&L | Reconciling balances, accounting, tax |
Trades made before quotes existed, or in the app or webapp, have quote_id: null.
Ledger entries
A ledger entry records one event and how it changed each balance:
{
"id": "tx_01JB8X2Q4M7Z3V9K5T1N6R0P2W",
"type": "trade",
"action": "buy-btc-usdc",
"label": "Buy BTC",
"changes": [
{
"asset": "USDC",
"amount": "-100.00",
"balance_after": "900.00"
},
{
"asset": "BTC",
"amount": "0.00104210",
"balance_after": "0.00104210"
}
],
"created_at": "2026-11-03T10:15:10Z"
}typeis one oftrade,deposit,withdrawal,fee,gift,giftcode,referral_bonus,loan,holdandother.labelis a readable description, in English by default or Icelandic withlang=is.changeshas one entry per asset: the signedamountand thebalance_after.
Reading everything
listAll (list_all in Python) follows the cursor for you. See Pagination for the details.
import { Myntkaup } from "@myntkaup/api";
const client = new Myntkaup();
for await (const entry of client.transactions.listAll({ from: "2026-01-01T00:00:00Z" })) {
for (const change of entry.changes) {
console.log(entry.created_at, entry.type, change.asset, change.amount, change.balance_after);
}
}from myntkaup import Myntkaup
client = Myntkaup()
for entry in client.transactions.list_all(from_="2026-01-01T00:00:00Z"):
for change in entry["changes"]:
print(entry["created_at"], entry["type"], change["asset"], change["amount"], change["balance_after"])Keeping a copy up to date
Lists are newest first. To sync incrementally, remember the newest id you've stored, then page from the start until you reach it:
import csv
from pathlib import Path
from myntkaup import Myntkaup
client = Myntkaup()
state = Path("last_id.txt")
last_seen = state.read_text().strip() if state.exists() else None
new_entries = []
for entry in client.transactions.list_all():
if entry["id"] == last_seen:
break
new_entries.append(entry)
with open("ledger.csv", "a", newline="") as file:
writer = csv.writer(file)
for entry in reversed(new_entries): # oldest first
for change in entry["changes"]:
writer.writerow(
[entry["created_at"], entry["id"], entry["type"], entry["label"],
change["asset"], change["amount"], change["balance_after"]]
)
if new_entries:
state.write_text(new_entries[0]["id"])Run it every few minutes at most. For a first full download, ask year by year with from and to: a request covers at most 366 days.
Prices for valuation
GET/v1/prices returns buy and sell prices for every asset at your tier in one call, cached for
a second. Use it to value balances instead of asking per asset.