Skip to content

API Reference

Base URLs

  • Testnet: https://api-testnet.leverup.xyz/
  • Mainnet: https://service.leverup.xyz

Get User Positions

Fetches a paginated list of positions for a specific user.

Endpoint

GET /v1/user/{userAddress}/positions

Parameters

NameInTypeDescription
userAddressPathstringThe user's wallet address (0x...)
sizeQueryintegerNumber of items per page (e.g. 50)
pageQueryintegerPage number (0-indexed)

Response

The response contains a list of positions and pagination metadata.

Note: The closeInfo object is only present if the position status is CLOSED.

json
{
  "content": [
    {
      "positionHash": "0x...",
      "pair": "USD/JPY",
      "pairBase": "0x...",
      "tokenIn": "0x...",
      "marginToken": "0x...",
      "isLong": true,
      "margin": "198610087343796248914",
      "qty": "130027570225",
      "entryPrice": "152705269000000000000",
      "stopLoss": "0",
      "takeProfit": "229073300000000000000",
      "openFee": "1389912656203751086",
      "executionFee": "0",
      "longAccFundingFeePerShare": "0",
      "holdingFeeRate": "317",
      "timestamp": 1769586529,
      "status": "OPEN"
    },
    {
      "positionHash": "0x...",
      "pair": "MON/USD",
      "pairBase": "0x...",
      "tokenIn": "0x...",
      "marginToken": "0x...",
      "isLong": true,
      "margin": "19861095665546146061470",
      "qty": "1981375571697510",
      "entryPrice": "28048519765000000",
      "stopLoss": "0",
      "takeProfit": "42140000000000000",
      "openFee": "138904334453853938530",
      "executionFee": "0",
      "longAccFundingFeePerShare": "0",
      "holdingFeeRate": "3166",
      "timestamp": 1767681382,
      "status": "CLOSED",
      "closeInfo": {
        "closePrice": "27952767860000000",
        "fundingFee": "-1463189752048306575",
        "closeFee": "138488245583797461449",
        "pnl": "-677699989249776266201",
        "holdingFee": "113131466803151515"
      }
    }
  ],
  "pageNumber": 0,
  "pageSize": 50,
  "totalPages": 1,
  "totalElements": 2
}