Match Transfers
match_transfersPair withdrawals with the deposits that received them between your own accounts. FREE.
Typical input {"ledger": , "window_minutes": 1440} returns {"pairs": [{"out": "kr91", "in": "cb14", "asset": "BTC", "from": "kraken", "to": "coinbase", "network_fee": "0.0001", "minutes": 42.0}], "unmatched": {"transfer_out": [...], "transfer_in": [...]}}. A pair needs the same asset, a different account, the deposit inside the window after the withdrawal, and a quantity within tolerance_pct of the amount sent net of the fee. Use before build_lots so basis and holding period move with the coins instead of being treated as a sale. Not for transfers to third parties: those stay unmatched and should be typed gift_out or sell. Errors: on invalid, missing, or malformed input this tool never raises a protocol error — it returns {"error": ""}. Every call is read-only and idempotent, so after correcting the input it is always safe to retry.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ledger | Yes | canonical rows. | |
| tolerance_pct | No | allowed quantity difference in percent after the fee (default 1). | |
| window_minutes | No | how long after the withdrawal the deposit may land (default one day). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||