Kiln docs
Search…
⌃K

Near (NEAR): Fetch staking rewards

Fetch Near Staking Rewards easily to make your reporting programmatically.

Stakes

API Objects

Near Stake Object

Field
Value Type
Description
account
string
Wallet account associated to the stake
validator
string
Validator account on which the stake is delegated
stake_account
string
Kiln unique identifier associated to the stake
balance
string
Active stake balance in Yocto
rewards
string
Total net rewards earned since activation in Yocto
activation_epoch
Epoch
Epoch at which the stake becomes active
net_apy
float32
Net Annual Pourcentage Yield
updated_at
string
Last stake update date (RFC3339 UTC time)

Epoch object

Field
Value Type
Description
nb
unit
Epoch Number
begin_at
string
Epoch Date (RFC3339 UTC time)

Queries

SDK

/* async getStakesByStakeAddresses(stakeAddresses: string[]): Promise<NearStake[]> */
const stakes = await k.near.getStakesByStakeAddresses(['abcd...']);
/* async getStakesByWallets(walletAddresses: string[]): Promise<NearStake[]> */
const stakes = await k.near.getStakesByWallets(['abcd...']);
/* async getStakesByAccounts(accountIds: string[]): Promise<NearStake[]> */
const stakes = await k.near.getStakesByAccounts(['abcd...']);

API

get
https://api.kiln.fi/v1
/near/stakes
Retrieve Near Stakes for stake accounts

Rewards

API Objects

Near Reward object

Field
Value Type
Description
date
string
Reward day following format "2006-01-02"
rewards
string
Net rewards received for this epoch in Yocto
active_balance
string
Active balance for this epoch in Yocto
net_apy
float32
Net Annual Pourcentage Yield

Queries

SDK

/* async getRewardsByStakeAddresses(stakeAddresses: string[]): Promise<NearReward[]> */
const rewards = await k.near.getRewardsByStakeAddresses(['abcd...']);
/* async getRewardsByWallets(walletAddresses: string[]): Promise<NearReward[]> */
const rewards = await k.near.getRewardsByWallets(['abcd...']);
/* async getRewardsByAccounts(accountIds: string[]): Promise<NearReward[]> */
const rewards = await k.near.getRewardsByAccounts(['abcd...']);

API

get
https://api.kiln.fi/v1
/near/rewards
Retrieve Near Rewards