Skip to content

Withdraw from a venue

Exit a position — partially or completely — with the same one-signature, gas-relayed mechanic as depositing. Funds return directly to the user's wallet.

Info

For Hyperliquid Core venues, the exit payload is a hypercoreAction (vaultTransfer withdrawal, or an undelegation for staking): sign its typedData and settle via Create a deposit exactly like a Core deposit. shares for Core venues means micro-USD (vaults) or 8-decimal HYPE units (staking); "max" reads your live Core position.

Prerequisites

  • A confirmed position (see Track positions for the vault address you'll reference).
  • The same signing capabilities as depositing.

1. Build the exit plan

POST /v1/withdrawals describes what to exit; Meadow returns a settlement payload to sign — structurally identical to a deposit's txPayload:

curl -X POST https://meadow.example.com/v1/withdrawals \
  -H "api-key: $EDITH_API_KEY" -H "Content-Type: application/json" \
  -d '{
    "userAddress": "0xUser…",
    "chain": 84532,
    "vault": "0xVault…",
    "shares": "max"
  }'

shares is either an exact share amount (base-10 string) or "max" for the whole position. The response carries a quoteId and a txPayload whose calls redeem your shares back to the asset.

Info

Yes — withdrawals settle through the same endpoint as deposits. The withdrawal call builds the signed plan; executing it is a POST /v1/deposits with that plan's quoteId and your signatures. One settlement path, two directions.

2. Sign and settle

Exactly as in the deposit guide: sign the authorization tuple, sign executeDigest as a raw digest, then:

curl -X POST https://meadow.example.com/v1/deposits \
  -H "api-key: $EDITH_API_KEY" -H "Content-Type: application/json" \
  -d '{
    "quoteId": "'"$WITHDRAWAL_QUOTE_ID"'",
    "authorization": '"$SIGNED_AUTH_JSON"',
    "executeSignature": "'"$EXECUTE_SIGNATURE"'"
  }'

The returned order has kind reflecting the withdrawal; poll Get an order to confirmed.

3. Verify

  • The asset is back in the user's wallet (chain balance).
  • Positions show the reduced or closed position.
  • Earnings reflect realized value — cost basis accounting updates on exit.

Notes

  • No lock-in, no queue: venues in the registry redeem on demand; a withdrawal is one settlement, not a request that waits for liquidity windows.
  • Withdrawal plans expire like deposit quotes — settle within expiresAt or rebuild.
  • Because shares live in the user's address, a user can always exit against the venue directly without Meadow; this flow just keeps it one-signature and gasless.