TypeScript SDK — Account Services: Staking
Stake and unstake crypto, view staking balances, rates, rewards, and event history. All methods are on client.accountServices.
See the API specifications for full request/response schemas and the authentication guide for setup.
Methods
listStakingBalances
POST /v1/balances/staking · Authenticated
Returns staking balances for all staked assets in the account. The response is a bare array of StakingBalance objects.
Code
Tip:
balance,available, andavailableForWithdrawalare numbers (not strings). ThebalanceByProviderfield is an object keyed by provider UUID.
listStakingRates
GET /v1/staking/rates · Public
Returns current staking rates for all supported assets. This is the only public GET in the account services namespace — it requires no authentication and takes no arguments.
The response is a nested object keyed by provider UUID, then by currency symbol — not a flat array.
Code
Tip: As a GET operation, this is automatically retried on transient errors (429, 502, 503, 504). All other account services methods are POST mutations that are never retried.
listStakingRewards
POST /v1/staking/rewards · Authenticated
Returns staking reward history for the account. The response is a nested object keyed by provider UUID, then by currency symbol — the same nested structure as listStakingRates.
Code
This is a POST mutation — never automatically retried.
listStakingEventHistory
POST /v1/staking/history · Authenticated
Returns a chronological history of staking events (stakes, unstakes, rewards). The default sort order is newest first. The request body accepts optional since and until fields (bigint or number) for time-range filtering. The response is an array of StakingHistory objects, each containing a providerId and a transactions array.
Code
Tip:
sinceanduntilaccept bigint or number values for timestamp-based pagination. EachStakingTransactionhastransactionType(e.g."Deposit","Redeem","Interest"),amount(number), andamountCurrency.
stakeCryptoFunds
POST /v1/staking/stake · Authenticated
Stakes cryptocurrency with a staking provider. The request body is validated client-side. The SDK enforces:
providerId— required stringcurrency— required stringamount— required decimal string
Code
This is a POST mutation — never automatically retried. Staking may have lock-up periods depending on the provider and asset. Amounts must be quoted decimal strings (e.g. "10.0", not 10).
unstakeCryptoFunds
POST /v1/staking/unstake · Authenticated
Initiates an unstaking request. The request body is validated client-side with the same rules as stakeCryptoFunds:
providerId— required stringcurrency— required stringamount— required decimal string
Code
This is a POST mutation — never automatically retried. Unstaking may be subject to a cooldown period before funds become available.
What's next
- Balances & Account — check available and staking balances
- Data Types — decimal strings and bigint fields
- Request Validation — how client-side validation works