Auto-Invest Unknown Error

Hello everyone, and good evening from Korea!

I’ve been using Binance API for years and haven’t encountered circumstances like today’s.
The main reason might be that I started to using the Auto-Invest API endpoints.

Today, I spent several hours very focused and tried to resolve the issue myself, and now I’m here, just after signing up for this community. It’s great to be a member here.

I faced two types of troubles:

  1. Converting parameters into a querystring format from a nested object.
  • Nodejs doesn’t have built-in functions that can do this, so I created a function with outputs like this: details[0][targetAsset]=BTC&details[0][percentage]=100
  • This attempt seems to have ended ok, I believe.
  1. I believe my request was made correctly after encoutering various errors, but it still doesn’t work.
    Please review my request and the Unknown error response.
  • request
  https://api.binance.com/sapi/v1/lending/auto-invest/plan/edit?planId=6100000&subscriptionAmount=1&subscriptionCycle=DAILY&subscriptionStartTime=1&sourceAsset=USDT&details[0][targetAsset]=BTC&details[0][percentage]=100&timestamp=1694183179933&signature=1b951XXXX {
    method: 'POST',
    headers: {
      'X-MBX-APIKEY': 'ABcd...'
    }
  }
  • response
  Binance API error response: {
    code: -1000,
    msg: 'An unknown error occurred while processing the request.'
  }

Thanks for the feedback, please find the document for how to pass the parameters.

I think for the details, they should be passed as: details[0].targetAsset=

https://binance-docs.github.io/apidocs/spot/en/#investment-plan-creation-user_data

Same issue here too