๐Ÿ”Œ API & Developers

Hyperliquid cDeposit and tokenDelegate API: Deposit Native Tokens into Staking and Delegate to Validators

โš ๏ธ Disclosure: Some links on this page are affiliate links. If you sign up through them, I may earn a commission โ€” at no extra cost to you.
To automate native-token staking on Hyperliquid, send signed JSON actions to POST https://api.hyperliquid.xyz/exchange. Use cDeposit to move native tokens from the userโ€™s spot account into staking, then use tokenDelegate to delegate or undelegate those staked tokens to or from a specific validator. The agent-signed variant cDeposit2 is the agent-signed version of the staking deposit action.

The examples below are request shapes based on the official Hyperliquid exchange endpoint documentation, not live test outputs. As of 2026-11-16, the docs describe these actions as follows.

Endpoint and common fields

All three actions use the same endpoint:

POST https://api.hyperliquid.xyz/exchange

Required header:

HeaderValue
Content-Typeapplication/json
Common request-body fields:
FieldTypeNotes
actionObjectAction-specific object described below.
nonceNumberRecommended value is the current timestamp in milliseconds.
signatureObjectRequired. The docs point to the Python SDK for signature generation.
expiresAfterNumberOptional timestamp in milliseconds where supported. cDeposit2 lists this field.
For cDeposit and tokenDelegate, the nonce inside the action object must match the outer nonce.

cDeposit: deposit native tokens into staking

cDeposit transfers native tokens from the userโ€™s spot account into staking for delegating to validators. It does not select a validator; use tokenDelegate afterward.

Required action fields

FieldTypeDescription
typeStringcDeposit.
hyperliquidChainStringMainnet on mainnet, or Testnet on testnet.
signatureChainIdStringChain ID used when signing, in hexadecimal format. Example: 0xa4b1 for Arbitrum.
weiNumberAmount of wei to transfer.
nonceNumberCurrent timestamp in milliseconds; must match the outer nonce.

Example request shape

{
  "action": {
    "type": "cDeposit",
    "hyperliquidChain": "Mainnet",
    "signatureChainId": "0xa4b1",
    "wei": 1000000000000000000,
    "nonce": 1763300000000
  },
  "nonce": 1763300000000,
  "signature": "<generated signature object>"
}

cDeposit2: agent-signed staking deposit

cDeposit2 is similar to cDeposit, but can be signed by an agent. The action object is smaller: it includes only type and wei.

Required action fields

FieldTypeDescription
typeStringcDeposit2.
weiNumberAmount of wei to transfer.
The outer request still includes nonce and signature, and may include optional expiresAfter.

Example request shape

{
  "action": {
    "type": "cDeposit2",
    "wei": 1000000000000000000
  },
  "nonce": 1763300000000,
  "signature": "<generated signature object>",
  "expiresAfter": 1763300060000
}

If you are using an agent wallet, see the Hyperliquid API Agent Wallet Setup & Permissions guide for the broader agent-wallet setup context.

๐Ÿ’ก Hyperliquid

Like what you're reading? Try it yourself โ€” this link supports ChartedTrader at no cost to you.

Create a Hyperliquid account โ†’
๐ŸŽ You receive: 4% fee discount on first $25M volume ยท per account, lifetime

tokenDelegate: delegate or undelegate to a validator

tokenDelegate delegates or undelegates native tokens to or from a validator. The docs state that delegations to a particular validator have a lockup duration of 1 day.

Required action fields

FieldTypeDescription
typeStringtokenDelegate.
hyperliquidChainStringMainnet on mainnet, or Testnet on testnet.
signatureChainIdStringChain ID used when signing, in hexadecimal format. Example: 0xa4b1 for Arbitrum.
validatorStringValidator address in 42-character hexadecimal format.
isUndelegateBooleanfalse to delegate, true to undelegate.
weiNumberAmount of wei to delegate or undelegate.
nonceNumberCurrent timestamp in milliseconds; must match the outer nonce.

Example request shape

{
  "action": {
    "type": "tokenDelegate",
    "hyperliquidChain": "Mainnet",
    "signatureChainId": "0xa4b1",
    "validator": "0x0000000000000000000000000000000000000000",
    "isUndelegate": false,
    "wei": 1000000000000000000,
    "nonce": 1763300000000
  },
  "nonce": 1763300000000,
  "signature": "<generated signature object>"
}

Deposit into staking vs delegate to a validator

ActionPurposeValidator selected?Main fields
cDepositMove native tokens from spot into staking.No.wei, hyperliquidChain, signatureChainId, nonce.
cDeposit2Agent-signed version of the staking deposit.No.wei.
tokenDelegateDelegate or undelegate staked native tokens to/from a validator.Yes.validator, isUndelegate, wei, hyperliquidChain, signatureChainId, nonce.
In a typical automation flow, cDeposit or cDeposit2 first makes native tokens available in staking, and tokenDelegate then assigns or removes delegation to a chosen validator.

Expected response shape

The docs show the same successful response shape for these actions:

{
  "status": "ok",
  "response": {
    "type": "default"
  }
}

The documentation examples use Python-style single-quoted dictionaries; the JSON equivalent is the same structure with double-quoted keys and string values.

To move native tokens from staking back into the userโ€™s spot account, use cWithdraw. The docs note that transfers from staking to the spot account go through a 7-day unstaking queue. See Hyperliquid cWithdraw: Withdraw Native Tokens From Staking for that action.

Affiliate disclosure

This article includes a Hyperliquid referral link. If you sign up through the link, supa.is may receive a commission. The linked account may receive a 4% fee discount on the first $25M of volume; Vaults and sub-accounts are excluded.

Continue with Hyperliquid

Browse the Hyperliquid guide hub for the complete user journey.

๐Ÿงฎ Free Hyperliquid calculators

Fee Calculator โ†’
Hyperliquid vs centralized exchange fee comparison
PnL & Liquidation โ†’
Perp PnL + liquidation price
Position Size โ†’
Risk-aware position sizing for HL perps
Hyperliquid

Ready to get started? Use the link below โ€” it helps support ChartedTrader at no cost to you.

Create a Hyperliquid account โ†’
๐ŸŽ You receive: 4% fee discount on first $25M volume ยท per account, lifetime
๐Ÿ“ˆ

About the author

I'm a systematic trader running live strategies on IB (USDJPY momentum) and Hyperliquid (crypto perps). Questions? Reach out.

๐Ÿ“š Related Articles

๐Ÿ”Œ
API & Developers

Hyperliquid delegatorHistory Info API: Query Staking History and Delta Fields

Use Hyperliquid's POST /info delegatorHistory request to query a user's staking history and inspect time, hash, and delta.delegate fields.

November 16, 2026 โฑ 2 min read
๐Ÿ”Œ
API & Developers

Hyperliquid cWithdraw: Withdraw Native Tokens From Staking (7-Day Unstaking Queue)

The Hyperliquid cWithdraw action moves native tokens from staking to your spot account. Transfers enter a 7-day unstaking queue before the spot balance is available.

November 14, 2026 โฑ 2 min read
๐Ÿ”Œ
API & Developers

Hyperliquid delegatorRewards Info API: Staking Rewards Request and Response Fields

Use the Hyperliquid info endpoint's delegatorRewards request to query staking rewards and inspect the documented time, source, and totalAmount response fields.

November 18, 2026 โฑ 2 min read