Python
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" } ] }
List the user’s SY, PT, YT and LP positions for all markets on a given chain.
Your Compass API Key. Get your key here.
arbitrum
base
ethereum
The user address of the desired position.
Successful Response
A list of the user's positions on the given chain.
Show child attributes
Was this page helpful?