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
Name | Type | Mandatory | Description |
---|---|---|---|
sourceType | ENUM | YES | "MAIN_SITE" for Binance,“TR” for Binance Turkey |
requestId | STRING | NO | if not null, must follow sourceType + unique string, e.g: TR12354859 |
planType | ENUM | YES | “SINGLE”,”PORTFOLIO”,”INDEX” |
indexId | LONG | NO | Only for planType = INDEX , value = 1 |
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 | 如 “USDT” |
flexibleAllowedToUse | BOOLEAN | NO | true/false;true:使用 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, //plan next excute timestamp
}