v26

latestOpenAPI 3.0.2raw.githubusercontent.com2024-10-0834042975.6 KB
Auto-Invest

Query Index Linked Plan Position Details(USER_DATA)

Details on users Index-Linked plan position details

Weight(IP): 1

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

Query parameters

indexIdinteger required
recvWindowinteger
Example:5000

The value cannot be greater than 60000

timestampinteger required

UTC timestamp in ms

signaturestring required

Signature

Response

Position Details

indexIdinteger required
totalInvestedInUSDstring required
currentInvestedInUSDstring required

current invest

pnlInUSDstring required

PNL of the plan in USD based on current amount

roistring required

ROI of the plan based on current amount

Example response

{
  "indexId": 1,
  "totalInvestedInUSD": "114.555",
  "currentInvestedInUSD": "101.2",
  "pnlInUSD": "101.2",
  "roi": "1.023",
  "assetAllocation": [
    {
      "targetAsset": "ADA",
      "allocation": "10"
    }
  ],
  "details": [
    {
      "targetAsset": "ADA",
      "averagePriceInUSD": "3.4",
      "totalInvestedInUSD": "222.21",
      "currentInvestedInUSD": "101.2",
      "purchasedAmount": "122.2",
      "pnlInUSD": "109.2",
      "roi": "0.2",
      "percentage": "10",
      "availableAmount": "122.12345678",
      "redeemedAmount": "122",
      "assetValueInUSD": "101"
    }
  ]
}