Skip to main content
GET
/
asset
Get assets
curl --request GET \
  --url https://api.onswitch.xyz/asset \
  --header 'x-service-key: <api-key>'
{
  "success": true,
  "message": "Assets fetched successfully",
  "timestamp": "2024-01-01T00:00:00.000Z",
  "data": [
    {
      "id": "base:usdc",
      "name": "USD Coin",
      "code": "USDC",
      "decimals": 6,
      "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
      "blockchain": {
        "id": 8453,
        "name": "Base"
      },
      "offramp_supported": true,
      "onramp_supported": true,
      "swap_supported": true,
      "wallet_supported": true
    },
    {
      "id": "ethereum:usdc",
      "name": "USD Coin",
      "code": "USDC",
      "decimals": 6,
      "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
      "blockchain": {
        "id": 1,
        "name": "Ethereum"
      },
      "offramp_supported": true,
      "onramp_supported": true,
      "swap_supported": true,
      "wallet_supported": true
    }
  ]
}

Authorizations

x-service-key
string
header
required

Service key for API authentication

Response

200 - application/json

Successfully retrieved assets

success
boolean
required
status
integer
required
message
string
required
timestamp
string<date-time>
required
data
object[]
required