Skip to main content
GET
/
v1
/
pendle
/
positions
Python (SDK)
from compass_api_sdk import CompassAPI, models


with CompassAPI(
    api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api:

    res = compass_api.pendle.pendle_positions(chain=models.V1PendlePositionsChain.ARBITRUM, user_address="0x68C314e30b543a35819e5625da563E6Da65D5dd4")

    # Handle response
    print(res)
{
  "positions": [
    {
      "chainId": 123,
      "totalOpen": 123,
      "totalClosed": 123,
      "totalSy": 123,
      "openPositions": [
        {
          "marketId": "<string>",
          "pt": {
            "valuation": 123,
            "balance": "<string>"
          },
          "yt": {
            "valuation": 123,
            "balance": "<string>"
          },
          "lp": {
            "valuation": 123,
            "balance": "<string>",
            "activeBalance": "<string>"
          }
        }
      ],
      "closedPositions": [
        {
          "marketId": "<string>",
          "pt": {
            "valuation": 123,
            "balance": "<string>"
          },
          "yt": {
            "valuation": 123,
            "balance": "<string>"
          },
          "lp": {
            "valuation": 123,
            "balance": "<string>",
            "activeBalance": "<string>"
          }
        }
      ],
      "syPositions": [
        {
          "syId": "<string>",
          "balance": "<string>"
        }
      ],
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ]
}

Authorizations

x-api-key
string
header
required

Your Compass API Key. Get your key here.

Query Parameters

chain
enum<string>
default:arbitrum
required
Available options:
arbitrum,
base,
ethereum
user_address
string
default:0x68C314e30b543a35819e5625da563E6Da65D5dd4
required

The user address of the desired position.

Response

Successful Response

positions
Position · object[]
required

A list of the user's positions on the given chain.