Aave V3
Aerodrome Slipstream
Morpho
Uniswap V3
Universal
Pendle
Transaction Batching
Smart Account
Pendle
Buy Principal Token (PT)
Buy Principal Token (PT) with market’s Underlying Token.
POST
/
v0
/
pendle
/
buy_pt
from compass_api_sdk import CompassAPI, models
with CompassAPI(
api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api:
res = compass_api.pendle.buy_pt(market_address="0x08a152834de126d2ef83d612ff36e4523fd0017f", amount=1.5, chain=models.Chain.ARBITRUM_MAINNET, sender="0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B")
# Handle response
print(res)
{
"chainId": 123,
"data": "<string>",
"from": "<string>",
"gas": 123,
"to": "<string>",
"value": 123,
"nonce": 123,
"maxFeePerGas": 123,
"maxPriorityFeePerGas": 123,
"authorizationList": []
}
Body
application/json
Response
200
application/json
Successful Response
The response is of type object
.
The response is of type object
.
The response is of type object
.
The response is of type object
.
Was this page helpful?
from compass_api_sdk import CompassAPI, models
with CompassAPI(
api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api:
res = compass_api.pendle.buy_pt(market_address="0x08a152834de126d2ef83d612ff36e4523fd0017f", amount=1.5, chain=models.Chain.ARBITRUM_MAINNET, sender="0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B")
# Handle response
print(res)
{
"chainId": 123,
"data": "<string>",
"from": "<string>",
"gas": 123,
"to": "<string>",
"value": 123,
"nonce": 123,
"maxFeePerGas": 123,
"maxPriorityFeePerGas": 123,
"authorizationList": []
}
Assistant
Responses are generated using AI and may contain mistakes.