Live-streamed transactions for an NFT collection.
This endpoint is available on Codex Growth and Enterprise Plans
Endpoint: onNftEventsCreated
Method: POST
Arguments
Response
Name | Type | Description |
---|---|---|
aggregatorAddress | String | The contract address of the marketplace aggregator that routed the transaction. |
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 (contractAddress :tokenId :networkId ). |
individualPriceNetworkBaseToken | String | The price of each individual NFT in the network's base token. |
individualPriceUsd | String | The price of each individual NFT in USD. |
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. |
networkId | Int! | The network ID the NFT collection is deployed on. |
numberOfTokens | String | The number of assets involved in the transaction. |
orderDirection | NftEventOrderDirection | The direction of the order. One of 'BUY', 'SELL', or 'OFFER_ACCEPTED'. |
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 NO_TOKEN_DATA , NO_TOKEN_PRICE , or LOW_LIQUIDITY_PAIR . |
sortKey | String! | The sortKey for the event (blockNumber #transactionIndex #logIndex (+ #marketplaceEventLogIndex if applicable), zero padded). For example, 0000000016414564#00000224#00000413#00000414 . |
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. |
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). |
tradeOffer | [NftEventTradeItem!] | The tokens/NFTs that were offered to make this transaction occur. |
tradeReceived | [NftEventTradeItem!] | The tokens/NFTs that were received in this transaction. |
transactionHash | String! | The unique hash for the transaction. |
transactionIndex | Int! | The index of the transaction within the block. |
Example
Query
subscription MySubscription($address: String, $networkId: Int) {
onCreateNftEvents(address: $address, networkId: $networkId) {
address
id
networkId
events {
blockNumber
contractAddress
data {
buyHash
metadata
price
maker
taker
type
sellHash
}
eventType
exchangeAddress
fillSource
id
individualPriceNetworkBaseToken
individualPriceUsd
individualTradePrice
logIndex
maker
networkId
numberOfTokens
paymentTokenAddress
poolAddress
priceError
sortKey
taker
timestamp
tokenId
totalPriceNetworkBaseToken
totalPriceUsd
totalTradePrice
transactionHash
transactionIndex
}
}
}
Response
{
"id": "bayc",
"type": "data",
"payload": {
"data": {
"onCreateNftEvents": {
"address": "0x60bb1e2aa1c9acafb4d34f71585d7e959f387769",
"id": "0x60bb1e2aa1c9acafb4d34f71585d7e959f387769:1",
"networkId": 1,
"events": [
{
"blockNumber": 16414564,
"contractAddress": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
"data": {
"buyHash": "0xf2e04cc65511238148ba6e20cee69b1256a8bab0832c03821efd002896b7b0cb",
"metadata": null,
"price": "69000000000000000000",
"maker": "0x8bc110db7029197c3621bea8092ab1996d5dd7be",
"taker": "0x70bc9c82dec52c50bc17077a1b0dda5f1c7e5b64",
"type": "BlurOrdersMatched",
"sellHash": "0xeb5fcc8a086a726553720247d62f393e11bf9ae63c6954e56289eb0ce789c310"
},
"eventType": "BlurOrdersMatched",
"exchangeAddress": "0x000000000000ad05ccc4f10045630fb830b95127",
"fillSource": "BLUR",
"id": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d:1886:1",
"individualPriceNetworkBaseToken": "69",
"individualPriceUsd": "106969.830378848997",
"individualTradePrice": "69",
"logIndex": 413,
"maker": "0x8bc110db7029197c3621bea8092ab1996d5dd7be",
"networkId": 1,
"numberOfTokens": "1",
"paymentTokenAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"poolAddress": null,
"priceError": null,
"sortKey": "0000000016414564#00000224#00000413#00000414",
"taker": "0x70bc9c82dec52c50bc17077a1b0dda5f1c7e5b64",
"timestamp": 1673814263,
"tokenId": "1886",
"totalPriceNetworkBaseToken": "69",
"totalPriceUsd": "106969.830378848997",
"totalTradePrice": "69",
"transactionHash": "0xd1649f072b59a84cac3fdea46904d4c9f07820d57b35273c956ce4f8252580be",
"transactionIndex": 224
}
]
}
}
}
}
Ask questions, share what you're working on and request new features 👬👭