Skip to main content

创建定投计划 (TRADE)

接口描述#

创建定投计划

HTTP请求#

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

请求权重(IP)#

1

请求参数#

名称类型是否必需描述
sourceTypeENUMYES"MAIN_SITE" 币安,“TR”为币安土耳其
requestIdSTRINGNO若不为空, 字段规则为 sourceType + unique string e.g: TR12354859
planTypeENUMYES“SINGLE”,”PORTFOLIO”,”INDEX”
indexIdLONGNO只有当 planType = INDEX , value = 1
subscriptionAmountDECIMALYESFiat&stablecoin: 2dp, BNB/ETH/BTC: 4dp
subscriptionCycleENUMYES"H1", "H4", "H8","H12", "WEEKLY","DAILY","MONTHLY","BI_WEEKLY"
subscriptionStartDayINTEGERNO“1”,...”31”; 如果 “subscriptionCycleNumberUnit” = “MONTHLY”则必填,数值必须为 UTC+0
subscriptionStartWeekdayENUMNO“MON”,”TUE”,”WED”,”THU”,”FRI”,”SAT”,”SUN”; 如果 “subscriptionCycleNumberUnit” = “MONTHLY”则必填,数值必须为 UTC+0
subscriptionStartTimeINTEGERYES“0,1,2,3,4,5,6,7,8,..23”;数值必须为 UTC+0
sourceAssetSTRINGYES如 “USDT”
flexibleAllowedToUseBOOLEANNOtrue/false;true:使用 flexible wallet
detailsArray\<PortfolioDetail>YESsum(all node's percentage) == 100,sum(all node's percentage) == 100, When input request parameter, each entry should be like details[0].targetAsset=BTC, Example of the request parameter array:
details[0].targetAsset=BTC details[0].percentage=60 details[1].targetAsset=ETH details[1].percentage=40
recvWindowLONGNO不超过 60000
timestampLONGYES
  • 单个账户每秒最多请求3次

响应示例#

{  "planId": 12345, //成功创建后planId不变  "nextExecutionDateTime":1648378800000, //计划下次执行时间}