# Getting started

Staking in the Hyperliquid network using the Staking API consists of several main steps:

1. Transfer HYPE from spot balance to staking balance.
2. Create a delegate transaction.
3. Sign it and send it to the network.

[Get an authentication token](https://docs.p2p.org/docs/authentication) to start using Staking API.

We provide two distinct endpoints for testing and production environments.

* PRODUCTION: [https://api.p2p.org](https://api.p2p.org/)
* TESTING: [https://api-test.p2p.org](https://api-test.p2p.org/)

For Hyperliquid, there are two networks available:

* `mainnet` — the production network.
* `testnet` — Hyperliquid testnet.

Staking on Hyperliquid happens within HyperCore, and HYPE is required to be in the staking balance. Just like USDC can be transferred between perps and spot accounts, HYPE can be transferred between spot and staking accounts.

## 1. \[Optional] Transfer HYPE from Spot to Staking balance

Send a POST request to `/api/v1/hyperliquid/{network}/staking/transfer` [endpoint](https://docs.p2p.org/reference/hyperliquid-transfer).

Use `unsignedTransaction` returned in the response, then [sign and send](https://docs.p2p.org/docs/signing-transaction-hyperliquid) the transaction to Hyperliquid network. After this transaction has been successfully executed, the delegator staking balance can use this balance to delegate to the P2P validator. Transfers from spot account to staking account are instant.

## 2. Delegate Transaction

Send a POST request to `/api/v1/hyperliquid/{network}/staking/delegate` [endpoint](https://docs.p2p.org/reference/hyperliquid-delegate).

Use `unsignedTransaction` returned in the response, then [sign and send](https://docs.p2p.org/docs/signing-transaction-hyperliquid) the transaction to Hyperliquid network. After this transaction has been successfully executed, the delegator is actively participating in staking through the P2P validator. Be aware that delegations have a lockup duration of 1 day, which means that only after this period, delegations can be partially or fully undelegated.

Rewards are accrued every minute and distributed to stakers every day. Rewards are redelegated automatically to the staked validator, i.e. compounded.

### 3. Sign and Send Transaction

The requests to [transfer hype from spot to staking balance](https://docs.p2p.org/reference/hyperliquid-transfer), [delegate](https://docs.p2p.org/reference/hyperliquid-delegate), [undelegate](https://docs.p2p.org/reference/hyperliquid-undelegate) and [withdraw](https://docs.p2p.org/reference/hyperliquid-withdraw) return an `unsignedTransaction` that needs to be signed and broadcasted using the [send transaction endpoint](https://docs.p2p.org/reference/hyperliquid-send).

### 4. Check delegator staking balances

To check the delegator active balances for HYPE spot balance, stake balance, active delegations and pending withdrawals, use the [get delegator staking information endpoint](https://docs.p2p.org/reference/hyperliquid-info).


---

# 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/getting-started.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.
