Skip to main content

Get/Set Auto Savings Settings

Query or update Flexible Saving auto savings settings.

note
  • GET queries the auto savings switch, position limit, and APR.
  • POST enables or disables auto savings.
info
  • API key permission: Earn
  • Get Auto Savings Settings: 10 requests per second per UID
  • Set Auto Savings Settings: 5 requests per second per UID

Get Auto Savings Settings​

Query the user's Flexible Saving auto savings settings and current APR by coin. Omit coins to return all supported coins. You can specify up to 50 coins.

HTTP Request​

GET/v5/earn/flexible-saving/auto-savings

Request Parameters​

ParameterRequiredTypeComments
coinsfalsearrayCoin names to query. Pass repeated query parameters, for example coins=BTC&coins=ETH. Omit to query all supported coins. Maximum: 50

Response Parameters​

ParameterTypeComments
selectedAllbooleanWhether auto savings is enabled globally
coinsarraySupported or requested coins and their auto savings settings
> coinstringCoin name
> isSelectedbooleanWhether auto savings is enabled for this coin
> maxStakingAmountstringMaximum auto savings position amount, expressed in this coin
> aprstringCurrent APR as a decimal rate. For example, 0.05 means 5%

Request Example​

GET /v5/earn/flexible-saving/auto-savings?coins=BTC&coins=ETH HTTP/1.1
Host: api.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1672211918471
X-BAPI-RECV-WINDOW: 5000

Response Example​

{
"retCode": 0,
"retMsg": "OK",
"result": {
"selectedAll": false,
"coins": [
{
"coin": "BTC",
"isSelected": true,
"maxStakingAmount": "10",
"apr": "0.05"
},
{
"coin": "ETH",
"isSelected": false,
"maxStakingAmount": "100",
"apr": "0.04"
}
]
},
"retExtInfo": {},
"time": 1672211918471
}

Set Auto Savings Settings​

Enable or disable Flexible Saving auto savings for one coin or all supported coins. Omit coin or pass an empty string to update the global setting.

When enabling, set purchaseImmediately to true to asynchronously subscribe the available Funding Account balance. When it is false or omitted, only the setting is updated. This parameter is ignored when disabling auto savings.

HTTP Request​

POST/v5/earn/flexible-saving/auto-savings

Request Parameters​

ParameterRequiredTypeComments
coinfalsestringCoin to update. Omit or pass an empty string to update the global setting
isSelectedtruebooleanWhether to enable auto savings
purchaseImmediatelyfalsebooleanWhen enabling, asynchronously subscribe the available Funding Account balance. Default: false. Ignored when disabling

Response Parameters​

None


Request Example​

POST /v5/earn/flexible-saving/auto-savings HTTP/1.1
Host: api.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1672211918471
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json

{
"coin": "BTC",
"isSelected": true,
"purchaseImmediately": false
}

Response Example​

{
"retCode": 0,
"retMsg": "OK",
"result": {},
"retExtInfo": {},
"time": 1672211918471
}