Withdrawal

The withdrawal process on the Hyperliquid network using the Staking API can be done in a few steps:

  1. Undelegate the staked tokens from the P2P validator.

  2. Withdraw unstaked tokens after the lock-up period.

Request examples are provided using cURL.

1. Create Undelegate Request

  1. To tokens from being actively delegated and transfer them to the staking balance, send a POST request to /api/v1/hyperliquid/[network]/staking/undelegate.

    Example request (for testnet network):

    curl --request POST \
         --url https://api-test.p2p.org/api/v1/hyperliquid/testnet/staking/undelegate \
         --header 'accept: application/json' \
         --header 'authorization: Bearer <token>' \
         --header 'content-type: application/json' \
         --data '
    {
      "amount": 10,
      "delegatorAddress": "0x80f0cd23da5bf3a0101110cfd0f89c8a69a1384e"
    }
    '
    • amount — amount of tokens to undelegate in HYPE.
    • delegatorAddress — delegator account address on the Hyperliquid network.

    Example response:

    {
      "result": {
        "amount": "10",
        "unsignedTransaction": "string",
        "createdAt": "2025-10-01T12:00:00Z"
      },
      "error": {}
    }
    • amount — amount of tokens to undelegate in HYPE.
    • unsignedTransaction — unsigned transaction in the hexadecimal format. Sign the transaction and submit it to the blockchain to perform the called action.
    • createdAt — timestamp of the transaction in the ISO 8601 format.
  2. Use unsignedTransaction to sign and send the transaction to Hyperliquid network.

    After the transaction has been successfully executed, undelegated tokens immediately become available at the staking balance. transfer native token from staking into the user's spot account

📘

Note that it takes 7 days to prepare your tokens for withdrawal, which means that the tokens will be locked up during this period.

2. Create Withdrawal Request

  1. After the lock-upo withdraw delegated tokens, send a POST request to /api/v1/hyperliquid/[network]/staking/withdraw.

    Example request (for testnet network):

    curl --request POST \
         --url https://api-test.p2p.org/api/v1/hyperliquid/testnet/staking/undelegate \
         --header 'accept: application/json' \
         --header 'authorization: Bearer <token>' \
         --header 'content-type: application/json' \
         --data '
    {
      "amount": 10,
      "delegatorAddress": "0x80f0cd23da5bf3a0101110cfd0f89c8a69a1384e"
    }
    '
    • amount — amount of tokens to withdraw in HYPE.
    • delegatorAddress — delegator account address on the Hyperliquid network.

    Example response:

    {
      "result": {
        "amount": "10",
        "unsignedTransaction": "string",
        "createdAt": "2025-10-01T12:00:00Z"
      },
      "error": {}
    }
    • amount — amount of tokens to withdraw in HYPE.
    • unsignedTransaction — unsigned transaction in the hexadecimal format. Sign the transaction and submit it to the blockchain to perform the called action.
    • createdAt — timestamp of the transaction in the ISO 8601 format.
  2. Use unsignedTransaction to sign and send the transaction to Hyperliquid network.

    Transfers from spot to staking balance have a 7 day unstaking queue, which means that the tokens will be locked up during this period. You can check the pending withdrawals using the get delegator balances endpoint.

What's Next?