Initiate a Withdrawal
Endpoint
Section titled “Endpoint”POST /withdraw
Server: https://bridge.openfish.fun (port 3004)
Tags: Bridge
Triggers a withdrawal from your Openfish trading balance to a destination address on the specified chain. You can withdraw a specific amount or your entire balance.
Request Body
Section titled “Request Body”| Property | Type | Required | Description |
|---|---|---|---|
address | string | Yes | Your Openfish wallet address |
toChainId | string | Yes | Destination chain ID |
toTokenAddress | string | Yes | Destination token contract address |
recipientAddr | string | Yes | Recipient wallet address on the destination chain |
amount | string | No | Amount in base units. Omit or set "all" to withdraw full balance. |
{ "address": "0xabc...", "toChainId": "1", "toTokenAddress": "0xa0b8...", "recipientAddr": "0xdef...", "amount": "1000000"}Response
Section titled “Response”200 — Withdrawal has been submitted for processing.
{ "address": { "evm": "0x...", "svm": "...", "btc": "..." }, "note": "Withdrawal initiated successfully."}400 — Bad request.
curl -X POST "https://bridge.openfish.fun/withdraw" \ -H "Content-Type: application/json" \ -d '{"address":"0xabc...","toChainId":"1","toTokenAddress":"0xa0b8...","recipientAddr":"0xdef...","amount":"1000000"}'