# Withdraw undelegated HYPE tokens to SPOT balance

## Withdraw undelegated HYPE tokens to SPOT balance

> Withdraw accumulated staking rewards from delegated HYPE tokens

```json
{"openapi":"3.0.0","info":{"title":"Staking API","version":"1.0.0"},"servers":[{"url":"https://api.p2p.org","description":"Staking API"},{"url":"https://api-test.p2p.org","description":"Testnet Staking API"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"HyperLiquidStakingWithdrawRequestDto":{"type":"object","properties":{"amount":{"type":"number","description":"HYPE amount to withdraw","minimum":0.1,"maximum":9007199254740991},"delegatorAddress":{"type":"string","description":"Delegator Hyperliquid address"}},"required":["amount","delegatorAddress"]},"SuccessResponse":{"type":"object","properties":{"error":{"type":"object","nullable":true,"default":null},"result":{"type":"object"}},"required":["error","result"]},"HyperLiquidStakingWithdrawResponseDto":{"type":"object","properties":{"amount":{"type":"string","description":"Transaction amount"},"unsignedTransaction":{"type":"string","description":"Unsigned transaction data"},"createdAt":{"format":"date-time","type":"string","description":"Creation timestamp"}},"required":["amount","unsignedTransaction","createdAt"]},"ExceptionResponse":{"type":"object","properties":{"error":{"type":"object"},"result":{"type":"object","nullable":true,"default":null}},"required":["error","result"]},"NotEnoughStakingBalanceException":{"type":"object","properties":{"code":{"type":"number","default":129109},"message":{"type":"string","default":"Not enough staking balance. Current balance: 100, required amount: 500."},"name":{"type":"string","default":"NotEnoughStakingBalanceException"}},"required":["code","message","name"]},"ValidationException":{"type":"object","properties":{"code":{"type":"number","default":100101},"message":{"type":"string","default":"The data provided is not valid. Please check the request parameters and try again."},"name":{"type":"string","default":"ValidationException"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"required":["code","message","name","errors"]},"ValidationErrorResponse":{"type":"object","properties":{"property":{"type":"string"},"constraints":{"additionalProperties":{"type":"string"},"type":"array","items":{"type":"object"}}},"required":["property","constraints"]},"NoTokenException":{"type":"object","properties":{"code":{"type":"number","default":101111},"message":{"type":"string","default":"No Bearer token has been provided. To obtain an authentication token, follow the instructions at https://docs.p2p.org/docs/authentication."},"name":{"type":"string","default":"NoTokenException"}},"required":["code","message","name"]},"WrongTokenException":{"type":"object","properties":{"code":{"type":"number","default":101109},"message":{"type":"string","default":"An invalid Bearer token has been provided. Please specify the correct authentication token."},"name":{"type":"string","default":"WrongTokenException"}},"required":["code","message","name"]},"WithdrawUnexpectedException":{"type":"object","properties":{"code":{"type":"number","default":129106},"message":{"type":"string","default":"The withdraw operation could not be completed because an unexpected error occurred."},"name":{"type":"string","default":"WithdrawUnexpectedException"}},"required":["code","message","name"]},"TokenGuardException":{"type":"object","properties":{"code":{"type":"number","default":101110},"message":{"type":"string","default":"The request could not be performed because the server authorization error occurred."},"name":{"type":"string","default":"TokenGuardException"}},"required":["code","message","name"]}}},"paths":{"/api/v1/hyperliquid/{network}/staking/withdraw":{"post":{"operationId":"hyperliquid-withdraw","summary":"Withdraw undelegated HYPE tokens to SPOT balance","description":"Withdraw accumulated staking rewards from delegated HYPE tokens","parameters":[{"name":"network","required":true,"in":"path","description":"The Hyperliquid network to use","schema":{"enum":["mainnet","testnet"],"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HyperLiquidStakingWithdrawRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessResponse"}],"properties":{"result":{"oneOf":[{"$ref":"#/components/schemas/HyperLiquidStakingWithdrawResponseDto"}]}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ExceptionResponse"}],"properties":{"error":{"allOf":[{"$ref":"#/components/schemas/NotEnoughStakingBalanceException"},{"$ref":"#/components/schemas/ValidationException"}]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ExceptionResponse"}],"properties":{"error":{"allOf":[{"$ref":"#/components/schemas/NoTokenException"},{"$ref":"#/components/schemas/WrongTokenException"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ExceptionResponse"}],"properties":{"error":{"allOf":[{"$ref":"#/components/schemas/WithdrawUnexpectedException"},{"$ref":"#/components/schemas/TokenGuardException"}]}}}}}}},"tags":["Hyperliquid"]}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hyperbeat.org/hyperbeat-staking/staking-api/withdraw-undelegated-hype-tokens-to-spot-balance.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
