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
Name | Type | Mandatory | Description |
---|---|---|---|
planId | LONG | YES | Plan identifier |
subscriptionAmount | DECIMAL | YES | Fiat&Stablecoin: 2dp, BNB/ETH/BTC: 4dp |
subscriptionCycle | ENUM | YES | "H1", "H4", "H8","H12", "WEEKLY","DAILY","MONTHLY","BI_WEEKLY" |
subscriptionStartDay | INTEGER | NO | “1”,...”31”;Mandatory if “subscriptionCycleNumberUnit” = “MONTHLY”,Must be sent in form of UTC+0 |
subscriptionStartWeekday | ENUM | NO | “MON”,”TUE”,”WED”,”THU”,”FRI”,”SAT”,”SUN”;Mandatory if “subscriptionCycleNumberUnit” = “WEEKLY” or “BI_WEEKLY”, Must be sent in form of UTC+0 |
subscriptionStartTime | INTEGER | YES | “0,1, 2,3,4,5,6,7,8,..23”; Must be sent in form of UTC+0 |
sourceAsset | STRING | YES | e.g. “USDT” |
flexibleAllowedToUse | BOOLEAN | NO | true/false;true:use flexible wallet |
details | Array<PortfolioDetail> | YES | sum(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 | |||
recvWindow | LONG | NO | no more than 60000 |
timestamp | LONG | YES |
- 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
}