Live-streamed transactions for an NFT pool.
This endpoint is available on Codex Growth and Enterprise Plans
Endpoint: onCreateNftPoolEvents
Method: POST
Arguments
Name | Type | Description |
---|---|---|
address | String! | The NFT contract address. For example, 0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d for BAYC. |
networkId | Int! | The network that the NFT collection is deployed on. |
Response
Name | Description |
---|---|
aggregatorAddress (String) | The contract address of the marketplace aggregator that routed the transaction. |
baseTokenAddress (String!) | 🔴 DEPRECATED 🔴 |
baseTokenPrice (String) | 🔴 DEPRECATED 🔴 |
blockNumber (Int!) | The block number for the transaction. |
contractAddress (String!) | The contract address of the NFT collection. |
eventType (String!) | The event type of the transaction. |
exchangeAddress (String!) | The NFT marketplace address of the transaction. |
fillSource (String) | The name of the marketplace that processed the transaction. |
id (String!) | The ID of the NFT event ( |
individualBaseTokenPrice (String) | 🔴 DEPRECATED 🔴 |
individualNetworkBaseTokenPrice (String) | 🔴 DEPRECATED 🔴 |
individualPrice (String) | 🔴 DEPRECATED 🔴 |
individualPriceNetworkBaseToken (String) | The price of each individual NFT in the network's base token. |
individualPriceUsd (String) | The price of each individual NFT in USD. |
individualTokenPrice (String) | 🔴 DEPRECATED 🔴 |
individualTradePrice (String) | The price of each individual NFT in the purchasing token. |
logIndex (Int!) | The index of the log in the block. |
maker (String!) | The wallet address of the buyer. |
networkBaseTokenPrice (String) | 🔴 DEPRECATED 🔴 |
networkId (Int!) | The network ID the NFT collection is deployed on. |
numberOfTokens (String) | The number of assets involved in the transaction. |
paymentTokenAddress (String!) | The contract address of the purchasing token. |
poolAddress (String) | The contract address of the NFT pool, if applicable. |
priceError (String) | The reason for the price error, if applicable. Can be |
sortKey (String!) | The sortKey for the event ( |
taker (String!) | The wallet address of the seller. |
timestamp (Int!) | The unix timestamp for the transaction. |
tokenId (String!) | The token ID of the NFT asset involved in the transaction. |
tokenPrice (String!) | 🔴 DEPRECATED 🔴 |
totalPrice (String!) | 🔴 DEPRECATED 🔴 |
totalPriceNetworkBaseToken (String) | The total trade price for the transaction in the network's base token. (The transaction can include more than 1 token). |
totalPriceUsd (String) | The total trade price for the transaction in USD. (The transaction can include more than 1 token). |
totalTradePrice (String) | The total trade price for the transaction in the purchasing token. (The transaction can include more than 1 token). |
transactionHash (String!) | The unique hash for the transaction. |
transactionIndex (Int!) | The index of the transaction within the block. |
Example
Query
subscription MySubscription($poolAddress: String, $networkId: Int) {
onCreateNftPoolEvents(poolAddress: $poolAddress, networkId: $networkId) {
id
networkId
poolAddress
collectionAddress
exchangeAddress
events {
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
}
}
}
}
}
Response
{
"id": "something",
"type": "data",
"payload": {
"data": {
"onCreateNftPoolEvents": {
"address": "0x5caf332dca4e6c9e69d52f320c21e74845353db0",
"collectionAddress": "0x33c6eec1723b12c46732f7ab41398de45641fa42",
"exchangeAddress": "0xb16c1342e617a5b6e4b631eb114483fdb289c0a4",
"id": "0x5caf332dca4e6c9e69d52f320c21e74845353db0:1",
"networkId": 1,
"events": [
{
"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"
}
}
]
}
}
}
}