Get Pool Events

Returns transactions for an NFT collection across all NFT pools or within a given pool.

Endpoint: getNftPoolEvents

Method: POST

Arguments

NameTypeDescription
collectionAddressString

The contract address of the NFT collection.

cursorString

The cursor to use for pagination.

eventTypes[NftPoolEventType!]

The event types to filter by.

exchangeAddressString

The NFT AMM marketplace address to filter by.

limitInt

The maximum number of NFT pool events to return.

networkIdInt!

The network ID the NFT collection is deployed on.

Required
poolAddressString

The NFT pool address to filter by.

Response

NameTypeDescription
cursorStringA cursor for use in pagination.
items[NftPoolEvent]A list of transactions for an NFT pool.

NameTypeDescription
blockHashString!The hash of the block where the transaction occurred.
blockNumberInt!The block number for the transaction.
collectionAddressString!The contract address of the NFT collection.
collectionIdString!The ID of the NFT collection (collectionAddress:networkId).
dataNftPoolEventData!The event-specific data for the transaction.
eventTypeNftPoolEventType!The event type of the transaction.
exchangeAddressString!The contract address of the NFT AMM marketplace.
idString!The ID of the NFT pool (poolAddress:networkId). For example, 0xdbea289dcc10eed8431e78753414a3d81b8e7201:1.
logIndexInt!The index of the log in the block.
makerString!The wallet address that transacted.
networkIdInt!The network ID the NFT collection is deployed on.
poolAddressString!The contract address of the NFT pool.
poolTypeNftPoolType!The type of liquidity pool.
timestampInt!The unix timestamp for the transaction.
tokenAddressString!The contract address of the liquidity token of the pool (usually WETH).
transactionHashString!The unique hash for the transaction.
transactionIndexInt!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

πŸ‘‹

Join our Discord

Ask questions, share what you're working on and request new features πŸ‘¬πŸ‘­