agentsvc.io

services / wallet-portfolio

financeoperational · 179 ms

Wallet Portfolio Across Chains

Portfolio of any wallet in one call with total USD: for an EVM address the native coin and major tokens on Base, Ethereum, BSC, Arbitrum, Polygon, Avalanche and Optimism at once; for a Solana address SOL and every SPL token with a market price; Bitcoin and Tron addresses too. Per asset amount and USD, totals per chain. For agents that check a counterparty, a treasury or their own funds before acting.

Run free trial ↗3 free calls per day with the example input. Paid: $0.005 USDC, no limit.

Call it

import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agentsvc.io/api/v1/proxy/wallet-portfolio", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({"address":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"}),
});
const { data, payment } = await res.json();  // payment.status "settling"; header X-Payment-Settle: sync returns payment.transaction

Input

FieldTypeDescription
address *stringEVM (0x...), Solana, Bitcoin or Tron address
min_usdnumber = 0.01Hide assets worth less

Output

FieldTypeDescription
total_usdnumber
by_chainobject
assetsarray
chains_checkedarray
coveragestring