Skip to main content

Investment plan adjustment(TRADE)

API Description#

Query Source Asset to be used for investment

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

Request Weight(IP)#

1

Request Parameters#

NameTypeMandatoryDescription
planIdLONGYESPlan identifier
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
sourceAssetSTRINGYESe.g. “USDT”
flexibleAllowedToUseBOOLEANNOtrue/false;true:use 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}