{
  "openapi": "3.1.0",
  "info": {
    "title": "DevX Multichain Balances",
    "version": "1.1.0",
    "description": "Wallet balances in one call on 9 chains: native + USDC, USDT, DAI, EURC, bridged USDC, WETH, WBTC/cbBTC on Base, Ethereum, Arbitrum, Optimism, Polygon, Avalanche, BNB Chain; SOL + USDC/USDT on Solana; TRX + USDT on Tron. Pass 0x, Solana and/or Tron addresses, plus up to 10 custom tokens. Live reads, block numbers, stablecoin total. 0.002 USDC.",
    "termsOfService": "https://wallet-balances.nextill-pos.workers.dev/terms",
    "contact": {
      "name": "DevX",
      "email": "madebydevx@gmail.com",
      "url": "https://madebydevx.com"
    },
    "x-guidance": "Call GET /v1/balances?address=<addr>[,<addr>] with up to one EVM 0x address, one Solana base58 address and one Tron T... address (comma list). Optional chains=base,ethereum,arbitrum,optimism,polygon,avalanche,bsc,solana,tron and tokens=chain:token (max 10 custom ERC-20/SPL/TRC-20). Returns per-chain native + major token balances with block numbers and a stablecoin face-value total. Use it when an agent needs a wallet's holdings across chains in one request. Free single-chain lookup: GET /api/basic?address=0x...&chain=base."
  },
  "servers": [
    {
      "url": "https://wallet-balances.nextill-pos.workers.dev"
    }
  ],
  "paths": {
    "/api/basic": {
      "get": {
        "summary": "Free: native + USDC balance of an address on one chain",
        "parameters": [
          {
            "name": "address",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "chain",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ethereum",
                "base",
                "arbitrum",
                "optimism",
                "polygon",
                "avalanche",
                "bsc",
                "solana",
                "tron"
              ],
              "default": "base"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "result"
          }
        },
        "security": []
      }
    },
    "/v1/balances": {
      "get": {
        "summary": "Paid (0.002 USDC, x402): native + major token balances on 7 EVM chains + Solana + Tron in one call, plus custom tokens",
        "parameters": [
          {
            "name": "address",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "comma list, max one each: EVM 0x, Solana base58, Tron T..."
          },
          {
            "name": "chains",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ethereum,base,arbitrum,optimism,polygon,avalanche,bsc,solana,tron, or evm (default: all chains matching the addresses)"
          },
          {
            "name": "tokens",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "custom tokens: chain:token,... (ERC-20 0x, SPL mint, TRC-20 T...; max 10; bare 0x applies to all selected EVM chains)"
          }
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.002"
          },
          "protocols": [
            {
              "x402": {}
            }
          ],
          "protocol": "x402",
          "x402Version": 2,
          "scheme": "exact",
          "network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "amount": "2000",
          "price_usd": 0.002,
          "payTo": "0xB3cDDccEe6B150c8efFD55B961afc0Ecefe7f247",
          "facilitator": "Coinbase CDP facilitator (api.cdp.coinbase.com/platform/v2/x402)"
        },
        "responses": {
          "200": {
            "description": "balances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "address": {
                      "type": "string"
                    },
                    "chains": {
                      "type": "object",
                      "properties": {
                        "base": {
                          "type": "object",
                          "properties": {
                            "chain_id": {
                              "type": "number"
                            },
                            "block": {
                              "type": "number"
                            },
                            "native": {
                              "type": "object",
                              "properties": {
                                "symbol": {
                                  "type": "string"
                                },
                                "balance": {
                                  "type": "string"
                                }
                              }
                            },
                            "tokens": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "symbol": {
                                    "type": "string"
                                  },
                                  "address": {
                                    "type": "string"
                                  },
                                  "raw": {
                                    "type": "string"
                                  },
                                  "decimals": {
                                    "type": "number"
                                  },
                                  "balance": {
                                    "type": "string"
                                  },
                                  "stablecoin": {
                                    "type": "boolean"
                                  }
                                }
                              }
                            },
                            "stablecoins_usd_face_value": {
                              "type": "number"
                            },
                            "ok": {
                              "type": "boolean"
                            }
                          }
                        }
                      }
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "stablecoins_usd_face_value_total": {
                          "type": "number"
                        },
                        "chains_with_funds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "chains_failed": {
                          "type": "array"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
                  "chains": {
                    "base": {
                      "chain_id": 8453,
                      "block": 53299201,
                      "native": {
                        "symbol": "ETH",
                        "balance": "3.128822813472737"
                      },
                      "tokens": [
                        {
                          "symbol": "USDC",
                          "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                          "raw": "79528679",
                          "decimals": 6,
                          "balance": "79.528679",
                          "stablecoin": true
                        }
                      ],
                      "stablecoins_usd_face_value": 94.92,
                      "ok": true
                    }
                  },
                  "summary": {
                    "stablecoins_usd_face_value_total": 94.92,
                    "chains_with_funds": [
                      "base"
                    ],
                    "chains_failed": []
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required (x402 v1 body + v2 PAYMENT-REQUIRED header)"
          }
        },
        "tags": [
          "wallet",
          "balances",
          "onchain-data",
          "erc20",
          "multichain",
          "solana",
          "tron",
          "usdc",
          "usdt",
          "base",
          "ethereum",
          "portfolio"
        ]
      }
    }
  },
  "tags": [
    {
      "name": "wallet"
    },
    {
      "name": "balances"
    },
    {
      "name": "onchain-data"
    },
    {
      "name": "erc20"
    },
    {
      "name": "multichain"
    },
    {
      "name": "solana"
    },
    {
      "name": "tron"
    },
    {
      "name": "usdc"
    },
    {
      "name": "usdt"
    },
    {
      "name": "base"
    },
    {
      "name": "ethereum"
    },
    {
      "name": "portfolio"
    }
  ]
}