Skip to content

Create Swap Quote

POST /bridge/swap/quote

Server: https://bridge.openfish.me

Auth: None

Tags: Bridge

Use this endpoint when a wallet has native BNB but no FISH. The quote creates or reuses the wallet’s Bridge deposit address and estimates how much FISH can be received.

The quote does not execute a transaction. It returns whether the deposit address currently has enough BNB for the swap amount plus gas buffers.


PropertyTypeRequiredDescription
addressstringYesOpenfish wallet address.
fromTokenstringYesMust be BNB.
toTokenAddressstringYesCurrent supported FISH token address from GET /supported-assets.
amountInWeistringYesNative BNB amount to swap, in wei.
slippageBpsnumberNoSlippage tolerance in basis points. Defaults to Bridge configuration when omitted.
{
"address": "0x56687bf447db6ffa42ffe2204a05edaa20f55839",
"fromToken": "BNB",
"toTokenAddress": "0xaE71fd8baCc2f17C43a01C3F4aFF6dEEbc194444",
"amountInWei": "1000000000000000",
"slippageBps": 300
}

200 — Quote returned.

{
"quoteId": "2e7cde57-466e-4e17-a7e5-3a0c2a09a142",
"address": "0x56687bf447db6ffa42ffe2204a05edaa20f55839",
"depositAddress": "0x23566f8b2E82aDfCf01846E54899d110e97AC053",
"chainId": "56",
"fromToken": "BNB",
"toTokenAddress": "0xaE71fd8baCc2f17C43a01C3F4aFF6dEEbc194444",
"amountInWei": "1000000000000000",
"estimatedAmountOutBaseUnit": "2450000000000000000000",
"minAmountOutBaseUnit": "2376500000000000000000",
"slippageBps": 300,
"priceImpactBps": 42,
"route": [
"0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
"0xae71fd8bacc2f17c43a01c3f4aff6deebc194444"
],
"depositBnbBalanceWei": "2000000000000000",
"requiredBnbWei": "1200000000000000",
"hasEnoughBnb": true,
"expiresAt": "2026-05-07T03:30:00Z"
}

Terminal window
curl -X POST "https://bridge.openfish.me/bridge/swap/quote" \
-H "Content-Type: application/json" \
-d '{
"address":"0x56687bf447db6ffa42ffe2204a05edaa20f55839",
"fromToken":"BNB",
"toTokenAddress":"0xaE71fd8baCc2f17C43a01C3F4aFF6dEEbc194444",
"amountInWei":"1000000000000000",
"slippageBps":300
}'
  • Show estimatedAmountOutBaseUnit, minAmountOutBaseUnit, slippageBps, priceImpactBps, requiredBnbWei, hasEnoughBnb, and expiresAt to the user.
  • If hasEnoughBnb is false, ask the user to fund the returned depositAddress with enough BNB for the swap and gas buffer, then request a fresh quote.
  • Do not execute without explicit user confirmation.
  • Do not use POST /quote; that legacy quote endpoint is disabled for the FISH bridge.