Approve a token
POST
https://www.allnodes.com/api/v1/staking
This endpoint allows you to get transaction params for approve tokens.
Request Body
{
network: string;
toAddress: string;
amount: string;
gasLimit: number;
gasPrice: number;
data: string;
}
{
"error": "TOKEN_ALREADY_APPROVED"
}
{
"error": "INVALID_ADDRESS"
}
Stake coins/tokens
POST
https://www.allnodes.com/api/v1/staking
This endpoint allows you to get transaction params for staking coins/tokens.
Request Body
{
network: string;
toAddress: string;
amount: string;
gasLimit: number;
gasPrice: number;
data: string;
}
{
"error": "NOT_ENOUGH_TOKENS"
}
{
"error": "INVALID_ADDRESS"
}
Withdraw rewards
POST
https://www.allnodes.com/api/v1/staking
This endpoint allows you to get transaction params for withdraw rewards earned.
Request Body
{
network: string;
toAddress: string;
amount: string;
gasLimit: number;
gasPrice: number;
data: string;
}
{
"error": "NOT_ENOUGH_REWARDS"
}
{
"error": "INVALID_ADDRESS"
}
Withdraw stake
POST
https://www.allnodes.com/api/v1/staking
This endpoint allows you to get transaction params for withdraw stake.
Request Body
{
network: string;
toAddress: string;
amount: string;
gasLimit: number;
gasPrice: number;
data: string;
}
{
"error": "INVALID_ADDRESS"
}