I am using the binance-connector api.
I am trying to redeem flexible savings products using client.savings_flexible_redeem.
I first use client.savings_flexible_products() to get a list of all flexible products. then i loop over each
product to check ‘canRedeem’ and purchasedAmount’. if both are not zero, I get the daily quota of the product using client.savings_flexible_user_redemption_quota and if the ‘leftQuota’ of the result is not zero i attempt to redeem the product using client.savings_flexible_redeem.
The amount I specify in the call to client.savings_flexible_redeem() is the ‘purchasedAmount’ returned from the call to client.savings_flexible_products()
Unfortunately, no matter how i specify the amount, i get error (400, -6006, ‘redeem amount error’, ) 6006 DAILY_REDEEM_AMOUNT_ERROR.
It doesn’t matter if i use it directly or convert it using Decimal(product[‘purchasedAmount’]) or Decimal(product[‘purchasedAmount’].replace(’,’,’.’))
The error always comes up.
Kindly advice me please.
You can’t redeem an amount if you didn’t purchase that amount in the 1st place, that’s why you’re getting the “redeem amount error”
As I specified earlier, I check the ‘purchasedAmount’ returned from client.savings_flexible_products() to be sure it’s not zero
Hi @kalotxa,
the ‘purchasedAmount’ from https://binance-docs.github.io/apidocs/spot/en/#get-flexible-product-list-user_data it’s not your purchased amount, it’s a value that’s same for everyone.
You only purchase when doing https://binance-docs.github.io/apidocs/spot/en/#purchase-flexible-product-user_data. I understand how the field name can be misleading, so I believe this might be your situation.
then how do i get the amount which can be redeemed? I expect that the amount would be in https://binance-docs.github.io/apidocs/spot/en/#get-flexible-product-list-user_data
what i want to do is to list all flexible savings product of MINE and redeem them
https://binance-docs.github.io/apidocs/spot/en/#get-flexible-product-position-user_data
“freeAmount”: “75.46000000”,
“freezeAmount”: “0.00000000”, // abandoned
“lockedAmount”: “0.00000000”, // abandoned
“redeemingAmount”: “0.00000000”,
“totalAmount”: “75.46000000”,
how do i calculate the total amount available for redeeming?
freeAmount ?
totalAmount - redeemingAmount ?
totalAmount - redeemingAmount - lockedAmount ?