Returns transactions for an NFT collection across all NFT pools or within a given pool.
Endpoint: getNftPoolEvents
Method: POST
Arguments
Name | Type | Description |
---|---|---|
collectionAddress | String | The contract address of the NFT collection. |
cursor | String | The cursor to use for pagination. |
eventTypes | [NftPoolEventType!] | The event types to filter by. |
exchangeAddress | String | The NFT AMM marketplace address to filter by. |
limit | Int | The maximum number of NFT pool events to return. |
networkId | Int! | The network ID the NFT collection is deployed on. Required |
poolAddress | String | The NFT pool address to filter by. |
timestamp | EventQueryTimestampInput | The time range to filter by. |
Response
Name | Type | Description |
---|---|---|
cursor | String | A cursor for use in pagination. |
items | [NftPoolEvent] | A list of transactions for an NFT pool. |
Name | Type | Description |
---|---|---|
blockHash | String! | The hash of the block where the transaction occurred. |
blockNumber | Int! | The block number for the transaction. |
collectionAddress | String! | The contract address of the NFT collection. |
collectionId | String! | The ID of the NFT collection (collectionAddress :networkId ). |
data | NftPoolEventData! | The event-specific data for the transaction. |
eventType | NftPoolEventType! | The event type of the transaction. |
exchangeAddress | String! | The contract address of the NFT AMM marketplace. |
id | String! | The ID of the NFT pool (poolAddress :networkId ). For example, 0xdbea289dcc10eed8431e78753414a3d81b8e7201:1 . |
logIndex | Int! | The index of the log in the block. |
maker | String! | The wallet address that transacted. |
networkId | Int! | The network ID the NFT collection is deployed on. |
poolAddress | String! | The contract address of the NFT pool. |
poolType | NftPoolType! | The type of liquidity pool. |
timestamp | Int! | The unix timestamp for the transaction. |
tokenAddress | String! | The contract address of the liquidity token of the pool (usually WETH). |
transactionHash | String! | The unique hash for the transaction. |
transactionIndex | Int! | The index of the transaction within the block. |
Example
Most Recent Event Query
Use this query to find the most recent event to happen on Ethereum's [ Ledger ] Market Pass
, whether it's a new pool creation, an NFT swap out, or any other pool event type.
{
getNftPoolEvents(
collectionAddress: "0x33c6eec1723b12c46732f7ab41398de45641fa42"
networkId: 1
limit: 1
) {
items {
blockHash
blockNumber
collectionAddress
collectionId
eventType
exchangeAddress
id
logIndex
maker
networkId
poolAddress
poolType
timestamp
tokenAddress
transactionHash
transactionIndex
data {
... on NewPoolEventData {
__typename
assetRecipientAddress
bondingCurveAddress
bondingCurveType
buyPriceT
collectionAddress
createdAt
delta
feeAmountT
nbtRatio
networkId
nftTokenBalance
ownerAddress
poolAddress
sellPriceT
startPriceT
tokenAddress
tokenBalanceT
type
usdRatio
}
... on SwapNftOutPoolEventData {
__typename
amountT
nbtRatio
newBuyPriceT
newDelta
newSellPriceT
newSpotPriceT
nftsTransfered {
amountT
nftTokenId
}
nftTokenBalance
poolFeeT
protocolFeeT
tokenBalanceT
tokenId
type
usdRatio
}
... on SwapNftInPoolEventData {
__typename
amountT
nbtRatio
newBuyPriceT
newDelta
newSellPriceT
newSpotPriceT
nftsTransfered {
amountT
nftTokenId
}
nftTokenBalance
poolFeeT
protocolFeeT
tokenBalanceT
tokenId
type
usdRatio
}
... on NftPoolNftDepositEventData {
__typename
nftTokenBalance
nftTokenIds
tokenBalanceT
type
}
... on NftPoolNftWithdrawalEventData {
__typename
nftTokenBalance
nftTokenIds
tokenBalanceT
type
}
... on NftPoolTokenDepositEventData {
__typename
amountT
nbtRatio
nftTokenBalance
tokenBalanceT
type
usdRatio
}
... on NftPoolTokenWithdrawalEventData {
__typename
amountT
nbtRatio
nftTokenBalance
tokenBalanceT
type
usdRatio
}
... on NftPoolSpotPriceUpdateEventData {
__typename
nbtRatio
newBuyPriceT
newSellPriceT
newSpotPriceT
type
usdRatio
}
... on NftPoolDeltaUpdateEventData {
__typename
newDelta
type
}
... on NftPoolFeeUpdateEventData {
__typename
nbtRatio
newFeeT
type
usdRatio
}
... on NftPoolAssetRecipientUpdateEventData {
__typename
newAssetRecipient
type
}
}
}
}
}
{
"data": {
"getNftPoolEvents": {
"items": [
{
"blockHash": "0x5739ee2319898e0e41e56234debb7536724b07eb097d9f1fec7a03ab7b29a265",
"blockNumber": 15733967,
"collectionAddress": "0x33c6eec1723b12c46732f7ab41398de45641fa42",
"collectionId": "0x33c6eec1723b12c46732f7ab41398de45641fa42:1",
"eventType": "SWAP_NFT_OUT_POOL",
"exchangeAddress": "0xb16c1342e617a5b6e4b631eb114483fdb289c0a4",
"id": "0xd9aa7b78a4aebc2f735b29070aa7df7324144e35:1",
"logIndex": 119,
"maker": "0x8af6e15ed513b5b73573f58158b1b0bbd5085ec7",
"networkId": 1,
"poolAddress": "0xd9aa7b78a4aebc2f735b29070aa7df7324144e35",
"poolType": "BUY_AND_SELL",
"timestamp": 1665601103,
"tokenAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"transactionHash": "0x694bfc9bd28b112de0c682f195e23147e811ecb53f5c9320733c024d96875f06",
"transactionIndex": 43,
"data": {
"__typename": "SwapNftOutPoolEventData",
"amountT": "614040870138431222",
"nbtRatio": "1",
"newBuyPriceT": "293184096224523942",
"newDelta": "72",
"newSellPriceT": "316901408450704281",
"newSpotPriceT": "21951219512195125871",
"nftsTransfered": [
{
"amountT": "302814675684705808",
"nftTokenId": "5655"
},
{
"amountT": "311226194453725413",
"nftTokenId": "5595"
}
],
"nftTokenBalance": "11",
"poolFeeT": "17798286090969020",
"protocolFeeT": "2966381015161503",
"tokenBalanceT": "2525722779581784367",
"tokenId": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2:1",
"type": "SWAP_NFT_OUT_POOL",
"usdRatio": "1.294947020511075e-15"
}
}
]
}
}
}
Explore
Ask questions, share what you're working on and request new features 👬👭