Skip to main content

Query Index Linked Plan Position Details(USER_DATA)

API Description

Details on users Index-Linked plan position details

HTTP Request

GET /sapi/v1/lending/auto-invest/index/user-summary

Request Weight(IP)

1

Request Parameters

NameTypeMandatoryDescription
indexIdLONGYES
recvWindowLONGNOno more than 60000
timestampLONGYES

Response Example

{    
"indexId": 1,
"totalInvestedInUSD":"114.555",
"currentInvestedInUSD": "101.2", //current invest
"pnlInUSD": "101.2", // PNL of the plan in USD based on current amount
"roi": "1.023", //ROI of the plan based on current amount
"assetAllocation": [
{
"targetAsset": "ADA", // for pie chart
"allocation":"10"
},
{
"targetAsset": "BTC",
"allocation":"10"
}
]
"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

"currentInvestedInUSD": "101.2", //current invest
"purchasedAmount": "122.12345678", //purchased amount of target asset
"pnlInUSD": "109.2", //PNL denominated in USD
"roi": "0.1", //ROI calculated in decimal
"percentage": "10", //asset allocation in the plan. If it's single plan, then it's 100
"availableAmount": "122.12345678",
"redeemedAmount": "122.12345678",
"assetValueInUSD": "101.2"
},
{
"targetAsset": "MATIC",
"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
"currentInvestedInUSD": "101.2", //current invest
"purchasedAmount": "122.12345678", //purchased amount of target asset
"pnlInUSD": "109.2", //PNL denominated in USD
"roi": "0.1", //ROI calculated in decimal
"percentage": "10", //asset allocation in the plan. If it's single plan, then it's 100
"availableAmount": "122.12345678",
"redeemedAmount": "122.12345678",
"assetValueInUSD": "101.2"
}
]
}