Skip to main content

Withdraw Funds from Exchanges

Withdraw funds from exchange accounts back to your server wallet. The server handles transaction signing and withdrawal request processing.

Supported Exchanges


Aster Withdrawal

Withdraw funds from your Aster exchange account to your server wallet.

Endpoint

POST /api/trading/aster/withdraw

Request Body

Request Parameters

Important: The receiver address should match the walletAddress for signature verification. The exchange verifies that the receiver address matches the signer address.

What Happens

  1. Create Withdrawal Message - Server creates withdrawal request with transaction details
  2. Sign Request - Server signs using the wallet’s MPC key shares
  3. Verify Signature - Exchange verifies the signature matches the wallet
  4. Process Withdrawal - Exchange validates and processes the withdrawal
  5. Broadcast Transaction - Funds are sent to the blockchain
  6. Receive Funds - Funds arrive in the server wallet after confirmation

Example Request

Success Response

Response Fields


Hyperliquid Withdrawal

Withdraw funds from your Hyperliquid account to a destination address.

Endpoint

POST /api/trading/hyperliquid/withdraw

Headers

Request Body

Request Parameters

Example Request

Success Response

Response Fields


Error Responses

400 Bad Request - Missing Parameters

400 Bad Request - Insufficient Balance

404 Not Found - Wallet Not Found

500 Internal Server Error


Supported Networks


Important Notes

Signature Verification: For Aster, the receiver address must match the wallet address that signs the withdrawal request. This is a security measure to prevent unauthorized withdrawals.
Fee Buffer: For Hyperliquid, the feeBuffer parameter adds a percentage overhead to cover gas fees. A value of “1.1” means 10% extra for fees.
Withdrawal Status: Use the returned withdrawalId to track the withdrawal status. Withdrawals typically take a few minutes to complete depending on network congestion.
Account Types: For Aster, specify whether you’re withdrawing from “spot” or “perp” account. Make sure you have sufficient balance in the specified account type.

Use Cases

  • Withdraw profits from trading back to your server wallet
  • Move funds between exchanges by withdrawing to wallet then depositing elsewhere
  • Cash out positions after closing trades
  • Rebalance funds across different platforms