Skip to main content

Investment plan creation(USER_DATA)

API Description#

Post an investment plan creation

HTTP Request#

POST /sapi/v1/lending/auto-invest/plan/add

Request Weight#

1

Request Parameters#

NameTypeMandatoryDescription
sourceTypeENUMYES"MAIN_SITE" for Binance,“TR” for Binance Turkey
requestIdSTRINGNOif not null, must follow sourceType + unique string, e.g: TR12354859
planTypeENUMYES“SINGLE”,”PORTFOLIO”,”INDEX”
indexIdLONGNOOnly for planType = INDEX , value = 1
subscriptionAmountDECIMALYESFiat&stablecoin: 2dp, BNB/ETH/BTC: 4dp
subscriptionCycleENUMYES"H1", "H4", "H8","H12", "WEEKLY","DAILY","MONTHLY","BI_WEEKLY"
subscriptionStartDayINTEGERNO“1”,...”31”; Mandatory if “subscriptionCycleNumberUnit” = “MONTHLY”, Must be sent in form of UTC+0
subscriptionStartWeekdayENUMNO“MON”,”TUE”,”WED”,”THU”,”FRI”,”SAT”,”SUN”; Mandatory if “subscriptionCycleNumberUnit” = “WEEKLY” or “BI_WEEKLY”, Must be sent in form of UTC+0
subscriptionStartTimeINTEGERYES“0,1,2,3,4,5,6,7,8,..23”;Must be sent in form of UTC+0
sourceAssetSTRINGYES如 “USDT”
flexibleAllowedToUseBOOLEANNOtrue/false;true:使用 flexible wallet
detailsArray\<PortfolioDetail>YESsum(all node's percentage) == 100,when in request parameter, just like this details[0].targetAsset=BTC details[0].percentage=60 details[1].targetAsset=ETH
details[1].percentage=40
recvWindowLONGNOno more than 60000
timestampLONGYES
  • max one request every 3s per account

Response Example#

{  "planId": 12345, //for success creation, planId is associated. PlanId remains constant when plan is being updated  "nextExecutionDateTime":1648378800000, //plan next excute timestamp}