Features

Custom Imports

We have added a "Import" wallet connection, which allows you to manually import csv transaction data. This is useful for wallets and exchanges that we do not currently support an automatic sync connection.To get started, head to the connections widget and create a new "Import" connection. Once created, click the connection menu button on the right hand side and click "Import".

To ensure Clams recognizes your transactions, format your CSV file with the correct transaction types, column names, and values. This guide explains the required formats and provides examples for each type.


Transaction Types

Your CSV file must include a type column, and each row must have a value that tells Clams how to process it. Below are the available transaction types, required/optional columns, and examples.


INVOICE

A BOLT11 or BOLT12 Lightning invoice where funds are being received to a self-custodial Lightning wallet or node.

Column Name(s)Required?Value Type
timestamp or daterequiredTimestamp
amount_btc, amount_sat, or amount_msatrequiredAmount BTC, SAT, or MSAT
id or referencerequiredID
requestoptionalInvoice Request
zapoptionalZap

Example CSV Snippet:

type,timestamp,amount_btc,id,request,zap
INVOICE,2024-10-04T15:30:45Z,0.01234567,invoice123,lnbc1p3zjth0pp5qqqsyqcyq5rqwzqf...,true

PAY

A payment to a BOLT11 or BOLT12 Lightning invoice where funds are being sent from a Lightning wallet or node that is self-custodial.

Valid Column Name(s)Required?Value Type
timestamp or daterequiredTimestamp
amount_btc, amount_sat, or amount_msatrequiredAmount BTC, SAT, or MSAT
id or referencerequiredID
requestoptionalInvoice Request
zapoptionalZap
fee_btc, fee_sat, or fee_msatoptionalAmount BTC, SAT, or MSAT

Example CSV Snippet:

type,timestamp,amount_btc,id,fee_btc
PAY,2024-10-05T12:00:00Z,0.00567890,payment456,0.00004567

DEPOSIT

A deposit into a custodial wallet. This could involve depositing Bitcoin via Lightning or on-chain, or fiat into an exchange.

Valid Column Name(s)Required?Value Type
timestamp or daterequiredTimestamp
amountrequiredAmount BTC or Fiat
id or referencerequiredID or Lightning Payment Hash
assetrequiredAsset
btc_destinationrequired if asset is BTC and id is not a valid lightning payment hashBTC Destination
feeoptionalAmount BTC or Fiat

Example CSV Snippet:

type,timestamp,amount,asset,id
DEPOSIT,2024-10-06T14:25:00Z,500,USD,deposit789

WITHDRAWAL

A withdrawal from a custodial wallet. This could involve withdrawing Bitcoin via Lightning or on-chain or withdrawing fiat from an exchange.

Valid Column Name(s)Required?Value Type
timestamp or daterequiredTimestamp
amountrequiredAmount BTC or Fiat
id or referencerequiredID or Lightning Payment Hash
assetrequiredAsset
btc_destinationrequired if asset is BTC and id is not a valid lightning payment hashBTC Destination
feeoptionalAmount BTC or Fiat

Example CSV Snippet:

type,timestamp,amount,asset,id,btc_destination
WITHDRAWAL,2024-10-07T16:45:00Z,0.5,BTC,withdrawal101,bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh

TRADE

A trade from one asset to another. This could involve buying or selling Bitcoin for fiat.

Valid Column Name(s)Required?Value Type
timestamp or daterequiredTimestamp
from_amountrequiredAmount BTC or Fiat
to_amountrequiredAmount BTC or Fiat
fee_amountoptionalAmount BTC or Fiat
id or referencerequiredID
from_assetrequiredAsset
to_assetrequiredAsset
fee_assetoptionalAsset
trade_idoptionalID
order_idoptionalID

Example CSV Snippet:

type,timestamp,from_amount,from_asset,to_amount,to_asset,fee_amount,fee_asset
TRADE,2024-10-08T18:00:00Z,0.1,BTC,3000,USD,5,USD

Value Types

Timestamp

All timestamps need to be in UTC timezone and follow a valid RFC 3339 format, unix timestamp in seconds, or one of the custom formats below: Examples:


ID

A unique ID for this transaction. This can be any value as long as it is unique to the transaction and wallet. Examples:


Amount BTC

Bitcoin denominated amount with up to 8 decimal places. Examples:


Amount SAT

SATS denominated Bitcoin amount. Examples:


Amount Fiat

Fiat amount as a decimal. Examples:


Invoice Request

A BOLT11 or BOLT12 Lightning invoice request. Example:


BTC Destination

An on-chain address, BOLT11 invoice, or BOLT12 invoice. Examples:


Zap

Boolean indicating if this is a NOSTR zap. Examples:


Asset

The asset being transacted. Examples:


Checklist Before Uploading

If your file meets these requirements, you’re ready to upload it to Clams.

Transaction Details

Click on a transaction row in the transactions widget to display it's details: Transaction details modal

General Details

Included are general details like the date and time, connection and id (hash/txid) that are associated with the transaction for cross referencing to the full details in your wallet.

Exclude

You can switch the toggle to exclude this transaction from any of the calculations displayed in the widgets. This can be useful if you might have been temporarily custodying funds for a friend or family, and it is not really related to your transaction activity.

Tags

Tags are a way of categorizing transactions so that you can easily filter and quickly recognize them. Clams will try to add intelligent default tags when possible. The tags section allows for adding and removing tags to a particular transaction, as well as managing tags in general by creating new ones or deleting existing ones. Tag filtering has also been added to the filters widget for filtering to particular tags.

Note

You can add a text note for a transaction to provide additional context that might not be covered by tags and accounts.

Balance Changes and Cost Basis

This section will give a summary that is similar to the Fiat widget, but at a per transaction level. You can see the balance changes in sats, the cost basis, the current value in fiat and the exchange rate at the time of the transaction.

Entries and Custom Accounts

This section shows how the transaction is represented in double entry accounting journal entries with debits and credits and the accounts affected. You can think of accounts as being like a category. All credits and debits must go in to at least one of the top level accounts: Income, Expenses, Assets, Liabilities and Equity. Clams will automatically do this for you at the most granular level it can. The entries section allows you customise the account for each debit/credit to further categorize them. You cannot change the top level account (eg change income to expense), but you can create new sub accounts and select them to make them more specific. For example a transaction might be in the "Income" account. You might want to create a sub account called "Day Job" and select that which will then indicate that income came from your day job, whereas a zap transaction you might add a sub account "Nostr" indicating that income was derived from Nostr. For an Expense, maybe you create a sub account called "Rent" which indicates this transaction was paying your rent. Or maybe a new sub category like "Payroll" etc. By adding more specific accounts and categorizing your credits and debits, this allows you to use the filters to answer questions like "How much did I spend on food in the last month?". Or "what was our payroll for the last quarter?",

DB Backup and Restore

Now that you can manually import data and add custom metadata via tags, custom accounts and notes, it is important to be able to back up your data. There are a couple of additions to the settings modal (click the wrench at the bottom right to open) that will allow you to backup and restore your data. Click the "Backup data" button to take a snapshot of your data. It will be saved to the data directory for the Clams app. Doing this regularly, especially after adding new connections or data is good practice. If you ever mess something up and want to go back to a previous snapshot, then click the "Restore from backup" button. This will display all of your data snapshots (and the location if you want to copy and store on a separate hard drive for redundancy) and you will notice the filename includes the date and a timestamp. Select the DB file that you would like to load and Clams will then run on the selected DB file. For safety Clams will also keep a copy of your current data snapshot just in case you do want to go back to that state.

Filter Widget Updates

There is a new section that allows for filtering by tags which is extra useful if you have added tags to your transactions or to make use of the default tags that Clams automatically adds for you. It is also now possible to select multiple items in the dropdown to allow filtering for multiple accounts or tags.

Cashu NIP60 Connection

We built this connection whilst participating in the btc++ Ecash conference hackathon in Berlin last year and decided to go ahead and release it for anyone who is on the bleeding edge of Ecash and Nostr. NIP60 is a standard for having a Cashu Ecash wallet where the Ecash is stored on Nostr relays, makling a user balance accessible in any Nostr app.