W

Workers · Valuate

by Workers

POSTBase

$0.02

per call · USD Coin on Base

Value a wallet's native balance and specified ERC-20 token holdings in USD.

Endpoint

POST https://crypto-portfolio-valuator.pdfextractapi.workers.dev/valuate

1

Calls / 30d

1

Unique payers / 30d

Aug 27

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://crypto-portfolio-valuator.pdfextractapi.workers.dev/valuate", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "address": "0x...",
    "chain": "ethereum",
    "tokens": [
      "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
    ]
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://crypto-portfolio-valuator.pdfextractapi.workers.dev/valuate" \
  -H "Content-Type: application/json" \
  -d '{"address":"0x...","chain":"ethereum","tokens":["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"]}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "address": "0x...",
  "chain": "ethereum",
  "holdings": [
    {
      "balance": "1.5",
      "symbol": "ETH",
      "token_address": null,
      "type": "native",
      "usd_price": 3200,
      "usd_value": 4800
    },
    {
      "balance": "500",
      "symbol": "USDC",
      "token_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
      "type": "token",
      "usd_price": 1,
      "usd_value": 500
    }
  ],
  "total_usd_value": 5300,
  "unpriced_holdings": 0
}

Payment details

Pay to0xa0ac44becc6302298f01ed255b175ca1060c189e
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase
Schemesexact

Is this your API?

Pin it to the top of Onchain Data and the homepage with a featured placement.

Get featured →

More from Workers & similar services