Querying Parabol Protocol Data - /data
The /data
endpoint provides a comprehensive integration with the Parabol, offering a flexible and powerful way to query protocol data. Key features include:
ℹ️
You can easily query the Parabol subgraph using the Parabol SDK.
- Current Positions: Users can fetch information about their current positions within the Parabol protocol.
- Earnings Data: Retrieve detailed earnings information for specific accounts or overall protocol performance.
- Subgraph Integration: This endpoint is directly connected to Parabol’s subgraph, allowing for complex queries and data retrieval.
- Public Access: While authentication is required, the subgraph itself is public, enabling anyone to utilize it for data analysis and integration purposes.
HTTP Method
POST
Endpoint URL
https://api.parabol.fi/data
Response
The response is a JSON object containing the requested data.
[{ "chain": 324, "data": { "positionInfos": [...] } }]
ℹ️
positionInfos
might be different depending on the query.
Example query
query FetchAllPositions($walletAddress: Bytes!) {
positionInfos(
where: {currentOwner: $walletAddress}
orderBy: tokenId
orderDirection: desc
) {
tokenId
owner: currentOwner
initalOwner
initiator
coupon
principal
lendTimestamp
maturityTimestamp
partnerFeeBPS
partnerId
status
lendTransactionHash
}
}
To use this query:
curl -X POST \
'https://api.parabol.fi/graphql' \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY' \
-d '{
"query": "query FetchAllPositions($walletAddress: Bytes!) { positionInfos(where: {currentOwner: $walletAddress} orderBy: tokenId orderDirection: desc) { tokenId owner: currentOwner initalOwner initiator coupon principal lendTimestamp maturityTimestamp partnerFeeBPS partnerId status lendTransactionHash } }",
"variables": {
"walletAddress": "0x...",
"chains": [324]
}
}'
ℹ️
To get API key, you need to contact with [email protected].