Skip to content
Fourohtwo

chain-data-api.agentlogic.workers.dev/cost-basis

Premium UTXO cost basis and unrealized P&L report for a Bitcoin address: current UTXOs with per-UTXO basis traced through lineage (single-input carry-forward, pro-rata fan-in blending) against Bitstamp daily BTC prices, current value at the live price, unrealized P&L, age and long/short holding flag, plus address totals. Provenance breaks (CoinJoin-like funding, untraceable inputs) are flagged per

BaseAnswering
GEThttps://chain-data-api.agentlogic.workers.dev/cost-basis

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://chain-data-api.agentlogic.workers.dev/cost-basis?address=1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa");
console.log(await res.json());

Example input

{
  "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
}

More from Chain Data APIProvider status