Request a Bridge Quote
Endpoint
Section titled “Endpoint”POST /quote
Server: https://bridge.openfish.fun (port 3004)
Tags: Bridge
Calculates the expected output amount, fee breakdown, and estimated processing time for a bridge transaction between two chains. Use this to present cost information to users before they confirm a deposit or withdrawal.
Request Body
Section titled “Request Body”| Property | Type | Required | Description |
|---|---|---|---|
fromAmountBaseUnit | string | Yes | Amount in source token base units |
fromChainId | string | Yes | Source chain ID |
fromTokenAddress | string | Yes | Source token contract address |
recipientAddress | string | Yes | Recipient wallet address |
toChainId | string | Yes | Destination chain ID |
toTokenAddress | string | Yes | Destination token contract address |
{ "fromAmountBaseUnit": "1000000", "fromChainId": "1", "fromTokenAddress": "0xa0b8...", "recipientAddress": "0xabc...", "toChainId": "137", "toTokenAddress": "0x2791..."}Response
Section titled “Response”200 — Quote generated.
{ "estCheckoutTimeMs": 120000, "estFeeBreakdown": { "appFeeLabel": "Bridge Fee", "appFeePercent": 0.1, "appFeeUsd": 0.10, "fillCostPercent": 0.05, "fillCostUsd": 0.05, "gasUsd": 0.50, "maxSlippage": 0.01, "minReceived": 0.99, "swapImpact": 0.001, "swapImpactUsd": 0.001, "totalImpact": 0.002, "totalImpactUsd": 0.002 }, "estInputUsd": 100.0, "estOutputUsd": 99.35, "estToTokenBaseUnit": "99350000", "quoteId": "q-abc123"}curl -X POST "https://bridge.openfish.fun/quote" \ -H "Content-Type: application/json" \ -d '{"fromAmountBaseUnit":"1000000","fromChainId":"1","fromTokenAddress":"0xa0b8...","recipientAddress":"0xabc...","toChainId":"137","toTokenAddress":"0x2791..."}'