81trust / 100

Onchain Solana Balance

by dt0ur.online in Onchain & crypto

x402 APIPassing, checked 1 h ago

Solana wallet balance lookup: SOL plus every SPL and Token-2022 token held (mint, symbol, amount), with live USD prices and total portfolio value.

POST https://dt0ur.online/api/onchain/solana-balance

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
196 ms typical, 196 ms slowest 5%
Last check
1 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://dt0ur.online/api/onchain/solana-balance" \
  -H "content-type: application/json" \
  -d '{"address":"6PSaCVqWbKh5oYUEpHohs8krmLsRQDrnMzKvxAySGsQX"}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fdt0ur.online%2Fapi%2Fonchain%2Fsolana-balance
const res = await pay("https://dt0ur.online/api/onchain/solana-balance", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"address":"6PSaCVqWbKh5oYUEpHohs8krmLsRQDrnMzKvxAySGsQX"}),
});
console.log(await res.json());

Example input

{
  "address": "6PSaCVqWbKh5oYUEpHohs8krmLsRQDrnMzKvxAySGsQX"
}

Example output

{
  "address": "6PSaCVqWbKh5oYUEpHohs8krmLsRQDrnMzKvxAySGsQX",
  "chain": "solana",
  "native": {
    "balance": 0,
    "balance_raw": "0",
    "price_usd": 117.91,
    "symbol": "SOL",
    "value_usd": 0
  },
  "token_count": 1,
  "tokens": [
    {
      "balance": 0.15,
      "balance_raw": "150000",
      "decimals": 6,
      "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      "price_usd": 0.9999,
      "symbol": "USDC",
      "value_usd": 0.15
    }
  ],
  "total_value_usd": 0.15
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
1 h agoPassed402181 ms$0.01
4 h agoPassed402294 ms$0.01
10 h agoPassed402196 ms$0.01