编辑定投计划 (TRADE)
接口描述
编辑定投计划
HTTP请求
POST /sapi/v1/lending/auto-invest/plan/edit
请求权重(IP)
1
请求参数
名称 | 类型 | 是否必需 | 描述 |
---|---|---|---|
planId | LONG | YES | 计划编号 |
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”; 如果 “subscriptionCycleNumberUnit” = “MONTHLY”则必填,数值必须为 UTC+0 |
subscriptionStartWeekday | ENUM | NO | “MON”,”TUE”,”WED”,”THU”,”FRI”,”SAT”,”SUN”; 如果 “subscriptionCycleNumberUnit” = “MONTHLY”则必填,数值必须为 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,若作为请求参数发送, 像以下格式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 |
- 单个账户每秒最多请求3次
响应示例
{
"planId": 12345, //成功创建后planId不变
"nextExecutionDateTime":1648378800000, //计划下次执行时间
}