Query holding details of the plan(USER_DATA)
API Description
Query holding details of the plan
HTTP Request
GET /sapi/v1/lending/auto-invest/plan/id
Request Weight(IP)
1
Request Parameters
Name | Type | Mandatory | Description |
---|---|---|---|
planId | LONG | NO | Plan identifier |
requestId | STRING | NO | requestId when create |
recvWindow | LONG | NO | no more than 60000 |
timestamp | LONG | YES |
Response Example
{
"planId": 111212,
"planType": "INDEX", // this is the plan type: "SINGLE","PORTFOLIO","INDEX"
"editAllowed": "true", //whether this plan is allowed to be modified
"flexibleAllowedToUse": "false",
"creationDateTime": 1648378800000, // date time that this plan is created. YYYY-MM-DD HH:mm:SS e.g 2022-01-07 08:00:00
"firstExecutionDateTime": 1648378800000, //first subscription date time
"nextExecutionDateTime": 1648378800000, //next subscription date time
"status": "ONGOING", //plan status of the selected plan
"targetAsset": "BTC",
"sourceAsset": "BUSD", //source asset of the plan created
"planValueInUSD": "101.2", //market value of the plan
"pnlInUSD": "101.2", // PNL of the plan in USD
"roi": "1.023", //ROI of the plan
"totalInvestedInUSD": "122", //total source asset invested in equivilent of USD
"details": [
{
"targetAsset": "ADA",
"averagePriceInUSD": "3.4", //average price of the asset in USD
"totalInvestedInUSD": "222.21", //total source asset invested for this target asset in equivilent of USD
"purchasedAmount": "122.12345678", //purchased amount of target asset
"purchasedAmountUnit": "ADA",
"pnlInUSD": "109.2", //PNL denominated in USD
"roi": "0.1", //ROI calculated in decimal
"percentage": "50", //asset allocation in the plan. If it's single plan, then it's 100
"assetStatus":"ACTIVE", // ACTIVE / INACTIVE whether this asset is still being subscribed in this plan
"availableAmount": "122.12345678", // Only for planType = INDEX
"availableAmountUnit": "ADA", // Only for planType = INDEX
"redeemedAmout": "122.12345678", // Only for planType = INDEX
"redeemedAmoutUnit": "ADA", // Only for planType = INDEX
"assetValueInUSD": "101.2" // Only for planType = INDEX
}
]
}