Skip to content

Initiate a Withdrawal

POST /withdraw/preview

POST /withdraw

Server: https://bridge.openfish.me (port 3004)

Tags: Bridge

The FISH bridge withdraws only the FISH BEP-20 on BSC. Call /withdraw/preview first to show the user the amount, fee, total debit, hot-wallet liquidity, and canWithdraw result. Call /withdraw only after explicit user confirmation; it debits the user’s Openfish balance and sends the same token from the hot wallet to recipientAddr.


PropertyTypeRequiredDescription
addressstringYesYour Openfish wallet address
toChainIdstringYesMust be "56" for BSC
toTokenAddressstringYesMust match the FISH token address
recipientAddrstringYesDestination BSC wallet address
amountstringNoAmount in base units. Omit or set "all" to withdraw full available balance minus configured fee.
{
"address": "0xabc0000000000000000000000000000000000000",
"toChainId": "56",
"toTokenAddress": "0xdcc3990630eB5Ffd8914d639198cCa593e59465A",
"recipientAddr": "0xdef0000000000000000000000000000000000000",
"amount": "1000000000000000000"
}

200 — Withdrawal preview generated. No balance is debited.

{
"address": "0xabc0000000000000000000000000000000000000",
"toChainId": "56",
"chainName": "BSC",
"token": {
"name": "FISH",
"symbol": "FISH",
"address": "0xdcc3990630eB5Ffd8914d639198cCa593e59465A",
"decimals": 18
},
"recipientAddr": "0xdef0000000000000000000000000000000000000",
"clobBalance": "1.500000000000000000",
"clobBalanceBaseUnit": "1500000000000000000",
"amountBaseUnit": "1000000000000000000",
"feeBaseUnit": "1000000000000000",
"totalDebitBaseUnit": "1001000000000000000",
"hotWalletBalanceBaseUnit": "100000000000000000000",
"gasBnbWei": "1000000000000000",
"feeSource": "configured fixed FISH fee",
"canWithdraw": true
}

200 — Withdrawal submitted.

{
"address": {
"evm": "0x23566f8b2E82aDfCf01846E54899d110e97AC053"
},
"note": "Withdrawal submitted successfully."
}

Terminal window
curl -X POST "https://bridge.openfish.me/withdraw/preview" \
-H "Content-Type: application/json" \
-d '{"address":"0xabc0000000000000000000000000000000000000","toChainId":"56","toTokenAddress":"0xdcc3990630eB5Ffd8914d639198cCa593e59465A","recipientAddr":"0xdef0000000000000000000000000000000000000","amount":"1000000000000000000"}'
curl -X POST "https://bridge.openfish.me/withdraw" \
-H "Content-Type: application/json" \
-d '{"address":"0xabc0000000000000000000000000000000000000","toChainId":"56","toTokenAddress":"0xdcc3990630eB5Ffd8914d639198cCa593e59465A","recipientAddr":"0xdef0000000000000000000000000000000000000","amount":"1000000000000000000"}'