Skip to content

Withdraw

The Bridge API manages outbound transfers from your Openfish wallet. Provide a target chain, token, and recipient address, and the bridge handles the conversion and delivery.

  1. Call POST /withdraw with your wallet address, target chain, token, and recipient.
  2. Receive deposit addresses configured for the withdrawal route.
  3. Send USDC.e from your Openfish wallet to the correct deposit address.
  4. The bridge converts and delivers funds to the destination wallet.
POST https://bridge.openfish.fun/withdraw
FieldTypeRequiredDescription
addressstringYesYour Openfish wallet address
to_chain_idstringYesDestination chain ID (e.g., "1" for Ethereum)
to_token_addressstringYesToken contract address on the destination chain
recipient_addrstringYesWallet address to receive funds
amountstringNoAmount in base units (optional pre-allocation)
{
"evm": "0xdef...456",
"svm": "7Kz...abc",
"btc": "bc1q...ghi"
}

Every withdrawal produces fresh addresses tied to the specific destination route. Do not reuse addresses from earlier withdrawal requests.

use openfish_client_sdk::BridgeClient;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let bridge = BridgeClient::new("https://bridge.openfish.fun");
let addrs = bridge
.withdraw(
"0x56687bf447db6ffa42ffe2204a05edaa20f55839",
"1", // Ethereum mainnet
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC on Ethereum
"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", // recipient
None, // no amount pre-allocation
)
.await?;
println!("Send USDC.e to: {}", addrs.evm);
Ok(())
}

Withdrawals cover the same chain families as deposits:

Chain FamilySupported Destinations
EVMEthereum, Arbitrum, Base, Optimism, Polygon, BSC
SolanaSolana mainnet
BitcoinBitcoin mainnet
  1. Check Supported Assets — Verify the destination chain and token via GET /supported-assets.
  2. Get a Quote — Preview estimated output and fees via POST /quote.
  3. Create Withdrawal Addresses — Call POST /withdraw with full routing details.
  4. Send USDC.e — Transfer from your Openfish wallet to the returned deposit address.
  5. Track Status — Monitor via GET /status/{address} until COMPLETED.
  • Only generate withdrawal addresses when you are ready to send. Each set of addresses is bound to a specific destination configuration.
  • For withdrawals above $50,000, consider splitting into smaller transfers to reduce slippage.
  • Openfish does not charge withdrawal fees. Gas and bridging costs are absorbed by the protocol.