Skip to main content
GET
/
wallet
/
{wallet_id}
/
balance
Get balance
curl --request GET \
  --url https://api.onswitch.xyz/wallet/{wallet_id}/balance \
  --header 'x-service-key: <api-key>'
{
  "success": true,
  "message": "Wallet balance fetched successfully",
  "timestamp": "2024-01-01T00:00:00.000Z",
  "data": {
    "balance": 150.5,
    "balance_in_usd": 150.5,
    "breakdown": [
      {
        "id": "base:usdc",
        "balance": 100,
        "balance_in_usd": 100
      },
      {
        "id": "solana:usdc",
        "balance": 50.5,
        "balance_in_usd": 50.5
      }
    ]
  }
}

Authorizations

x-service-key
string
header
required

Service key for API authentication

Path Parameters

wallet_id
string
required

Unique identifier for the wallet

Pattern: ^[a-f0-9]{24}$

Response

Balance retrieved successfully

success
boolean
required
message
string
required
timestamp
string<date-time>
required
data
object
required