Skip to content

Execute Swap

POST /bridge/swap/execute

Server: https://bridge.openfish.me

Auth: None

Tags: Bridge

Call this endpoint only after the user has reviewed and approved the quote. The Bridge swaps BNB held at the wallet’s deposit address into FISH, sweeps FISH, and credits the Openfish CLOB FISH ledger balance.


PropertyTypeRequiredDescription
addressstringYesOpenfish wallet address that owns the quote.
quoteIdstringYesQuote ID returned by POST /bridge/swap/quote.
{
"address": "0x56687bf447db6ffa42ffe2204a05edaa20f55839",
"quoteId": "2e7cde57-466e-4e17-a7e5-3a0c2a09a142"
}

200 — Swap completed and credited, or execution reached a trackable status.

{
"swapId": "de8c8c12-8af7-4f4e-a41e-f97a6c3c9d19",
"quoteId": "2e7cde57-466e-4e17-a7e5-3a0c2a09a142",
"address": "0x56687bf447db6ffa42ffe2204a05edaa20f55839",
"depositAddress": "0x23566f8b2E82aDfCf01846E54899d110e97AC053",
"status": "CREDITED",
"swapTxHash": "0xabc123...",
"sweepTxHash": "0xdef456...",
"amountInWei": "1000000000000000",
"minAmountOutBaseUnit": "2376500000000000000000",
"fishReceivedBaseUnit": "2450000000000000000000",
"fishCreditedBaseUnit": "2450000000000000000000"
}

Terminal window
curl -X POST "https://bridge.openfish.me/bridge/swap/execute" \
-H "Content-Type: application/json" \
-d '{
"address":"0x56687bf447db6ffa42ffe2204a05edaa20f55839",
"quoteId":"2e7cde57-466e-4e17-a7e5-3a0c2a09a142"
}'
StatusExample reason
400Quote expired, quote address mismatch, unsupported token, insufficient BNB for amount plus gas buffers.
404Quote not found.
409Quote already executed, or another swap is running for the same deposit address.
410BNB -> FISH swap is disabled.
  • Never execute a quote that the user has not reviewed.
  • Do not execute if hasEnoughBnb was false.
  • Do not retry by blindly executing the same quote; request status first.
  • After execute, call GET /bridge/swap/{swap_id} until status is CREDITED, FAILED, or MANUAL_REVIEW.
  • Verify the CLOB FISH balance before enabling live trading.