curl --request PATCH \
--url https://api.sandbox.services.payward.com/v1/accounts/{account_id}/earn/auto \
--header 'API-Key: <api-key>' \
--header 'API-Nonce: <api-key>' \
--header 'API-Sign: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"staking": "enabled"
}
'{
"data": {}
}Set Auto Earn preferences
Sets Auto Earn preferences for the specified account.
All body fields are optional. Only fields that are present are updated; omitted yield sources are left unchanged.
The change is applied asynchronously, so a 200 response means the request was accepted. Poll Get Auto Earn preferences until the yield source leaves pending_enabled or pending_disabled. Enabling a yield source the account is not eligible for fails with not_eligible; disabling is always allowed. Only one change can be in progress per account: a second request while one is pending fails with allocation_in_progress.
curl --request PATCH \
--url https://api.sandbox.services.payward.com/v1/accounts/{account_id}/earn/auto \
--header 'API-Key: <api-key>' \
--header 'API-Nonce: <api-key>' \
--header 'API-Sign: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"staking": "enabled"
}
'{
"data": {}
}Authorizations
Your public API key. Identifies the partner making the request.
HMAC signature over the request, computed with your private key.
Monotonically increasing nonce included in the request signature.
Path Parameters
Globally unique public identifier for an account.
14 - 42Body
Request to set Auto Earn preferences for an account.
Staking Auto Earn preference. Omit to leave unchanged.
enabled, disabled Base-rewards Auto Earn preference. Omit to leave unchanged.
enabled, disabled Opt-in-rewards Auto Earn preference. Omit to leave unchanged.
enabled, disabled Response
Successful response
Response data for updated Auto Earn preferences.