Cross-chain bridge quote endpoint — get estimated output, gas cost, and execution time via x402 micropayment.
What it does
The `/defi/bridge/quote` endpoint is part of the DeFi Intelligence API hosted at defi.hugen.tokyo. It returns a cross-chain bridge quote given source and destination chain, token pair, amount, and sender address. The response includes the estimated output amount, execution duration, gas cost in USD, and the bridge tool used (e.g., Stargate). Payment is $0.02 USDC on Base per call via the x402 protocol — no API key or account setup required.
This endpoint is one of 26 DeFi-focused endpoints on the same API surface, which also covers token security audits, rugpull detection, phishing checks, NFT security, protocol TVL, DEX volume, gas prices, and more. The bridge subsystem includes companion endpoints for listing supported chains (`/defi/bridge/chains`), tokens (`/defi/bridge/tokens`), available bridge tools (`/defi/bridge/tools`), advanced route computation (`/defi/bridge/routes`), and transaction status tracking (`/defi/bridge/status`).
The endpoint accepts six required query parameters: `fromChain` (source chain ID or key), `toChain` (destination chain ID or key), `fromToken` and `toToken` (token symbol or contract address), `fromAmount` (amount in smallest unit, e.g., wei), and `fromAddress` (sender wallet address). The sample 402 challenge response shows a Stargate-routed quote bridging USDC from Ethereum to Polygon with an estimated output of 9,950,000 base units (i.e., ~$9.95 USDC), 120-second execution, and $2.50 gas cost. Alternative access methods include a broker API key, an MCP server at mcp.hugen.tokyo, and a Python SDK (`x402-pay`).
Capabilities
Use cases
- —Get a price quote before executing a cross-chain token bridge
- —Compare bridge output amounts across different chain pairs
- —Estimate gas costs for bridging assets between EVM chains
- —Automate bridge selection in an AI agent or trading bot workflow
- —Pre-flight validation of bridge parameters before submitting a transaction
Fit
Best for
- —AI agents needing programmatic cross-chain bridge quotes without API key setup
- —DeFi dashboards displaying real-time bridge cost estimates
- —Automated trading systems that route assets across chains
Not for
- —Executing the actual bridge transaction (this endpoint only returns quotes)
- —Non-EVM chains not supported by the underlying bridge tools
- —High-frequency quote polling where per-call micropayments become significant
Quick start
# Using the x402-pay Python SDK
pip install x402-pay
import x402_pay
resp = x402_pay.get(
'https://defi.hugen.tokyo/defi/bridge/quote'
'?fromChain=1&toChain=137'
'&fromToken=USDC&toToken=USDC'
'&fromAmount=10000000'
'&fromAddress=0xYourWalletAddress'
)
print(resp.json())Example
Request
{
"url": "https://defi.hugen.tokyo/defi/bridge/quote",
"method": "GET",
"query_params": {
"toChain": "137",
"toToken": "USDC",
"fromChain": "1",
"fromToken": "USDC",
"fromAmount": "10000000",
"fromAddress": "0x1234567890abcdef1234567890abcdef12345678"
}
}Response
{
"tool": "stargate",
"toChain": "Polygon",
"toToken": "USDC",
"fromChain": "Ethereum",
"fromToken": "USDC",
"gasCostUSD": "2.50",
"estimatedOutput": "9950000",
"executionDuration": 120
}Endpoint
Quality
The endpoint is live (402 challenge captured) with a full OpenAPI spec and clear parameter definitions. However, the response schema is untyped (empty schema object), there are no documented response field descriptions, and the example response is inferred from the 402 challenge sample rather than actual API output. No dedicated pricing page or detailed docs beyond the auto-generated Swagger UI.
Warnings
- —Response schema is empty in the OpenAPI spec — actual response fields are inferred from the 402 challenge sample only
- —No dedicated documentation or examples beyond the auto-generated /docs page
- —Root URL returns 404; no landing page or README available
- —Price ($0.02 USDC per call) is stated in the 402 challenge but not confirmed on a pricing page
Citations
- —The endpoint requires six query parameters: fromChain, toChain, fromToken, toToken, fromAmount, fromAddresshttps://defi.hugen.tokyo/docs
- —The API contains 26 DeFi security and data endpoints with x402 payment per callhttps://defi.hugen.tokyo/docs
- —Payment is $0.02 USDC on Base per callhttps://defi.hugen.tokyo/defi/bridge/quote
- —Sample response shows Stargate bridge from Ethereum to Polygon with estimatedOutput 9950000 and gasCostUSD 2.50https://defi.hugen.tokyo/defi/bridge/quote
- —Alternative access via broker API key, MCP server, and x402-pay Python SDKhttps://defi.hugen.tokyo/defi/bridge/quote