API Reference

HTTP endpoints exposed by the CoinXUS web app. Swaps themselves are signed on-chain by the user's wallet and are not part of this API.

GET

/api/health

Deployment health check

Reports whether the router and factory addresses are configured for the default chain. Use it as a post-deploy smoke test.

Responses

  • 200Configuration is valid. Warnings may still be present.
  • 503At least one configuration error prevents swaps from working.

Example response

{
  "ok": true,
  "chain": {
    "id": 84532,
    "name": "Base Sepolia"
  },
  "contracts": {
    "router": "0x0000000000000000000000000000000000000001",
    "factory": "0x0000000000000000000000000000000000000002",
    "weth": "0x4200000000000000000000000000000000000006"
  },
  "issues": [
    {
      "level": "warning",
      "key": "NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID",
      "message": "WalletConnect is disabled until a project id is set (MetaMask and Coinbase Wallet still work)."
    }
  ]
}