Spot REST Earn
The earn API allows interacting with all of Kraken's yield generating products. It replaces the old /staking part of the API.
The different available earn products are represented by earn strategies. This corresponds to the legacy Staking/Assets. Stake/Unstake are replaced by Allocate/Deallocate.
Overview of available endpoints under Earn
Strategies- list all earn strategies for which you are eligible or have a balance.Allocations- lists the balance in your earn account for each strategy. Requires theQuery FundsAPI key permission.Allocate/Deallocate- allocate/deallocate to an earn strategy through an async operation. Requires theEarn FundsAPI key permission.AllocateStatus/DeallocateStatus- verifies the state of the last allocation/deallocation. Requires theEarn FundsorQuery FundsAPI key permission.
Examples
Determine which funds are earning rewards
- Call
Strategiesto obtain information about the relevant strategy. Thelock_typefield shows whether bonding/unbonding funds are earning yield. The relevant fields arebonding_rewards/unbonding_rewards. - Call
Allocationsfor the relevant strategy. From the previous step, for strategies where bonding/unbonding does not earn yield, substract these balances fromamount_allocated.totalto determine which balances are currently earning.
Get allocatable balance
Call /0/private/BalanceEx, subtract hold_trading amount. Remaining balance is available for allocation to a strategy.
Geo restrictions
Some earn strategies are not available in all geographic regions. Strategies will return only strategies available to the caller.