Skip to content
Fourohtwo

Use before putting any token amount into a transaction

solana-pulse-gateway-1021990235790.us-central1.run.app/api/tools/convert_amount

Use before putting any token amount into a transaction. "5 USDC" is 5,000,000 base units; getting decimals wrong sends 1,000x too much or too little. Converts between human amounts and base units using the token's real on-chain decimals.

SolanaAnswering
POSThttps://solana-pulse-gateway-1021990235790.us-central1.run.app/api/tools/convert_amount

Uptime100% of 1 check in 30 days

30 days agoToday

Call it from an agent

curl -i -X POST -H 'content-type: application/json' "https://solana-pulse-gateway-1021990235790.us-central1.run.app/api/tools/convert_amount" \
  -d '{"mint":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","amount":"5","direction":"to_base_units"}'

# 402 Payment Required comes back with the price and where to pay.

Example input

{
  "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "amount": "5",
  "direction": "to_base_units"
}

More from Solana Pulse