Some events are missing order hash and protocol address
Component
API
Have you ensured that all of these are up to date?
- [X] opensea-js
- [X] Node (minimum v16)
What version of opensea-js are you on?
N/A
What function is the bug in?
Get Events (by collection) - https://api.opensea.io/api/v2/events/collection/{collection_slug}
Operating System
None
Describe the bug
Hi,
I noticed that some events are missing order_hash and protocol_address.
The documentation says that theses fields are required in the response https://docs.opensea.io/reference/list_events_by_collection
Reproduce:
curl --request GET \
--url 'https://api.opensea.io/api/v2/events/collection/unstoppable-domains-polygon?after=0&event_type=sale' \
--header 'accept: application/json' \
--header 'x-api-key: xxxxx'
...
{
"event_type": "sale",
"order_hash": "",
"chain": "matic",
"protocol_address": "",
"closing_date": 1716118744,
"nft": {
"identifier": "91536964291889399618341723954804464475905588715229665495699147789348738887050",
"collection": "unstoppable-domains-polygon",
"contract": "0xa9a6a3626993d487d2dbda3173cf58ca1a9d9e9f",
"token_standard": "erc721",
"name": "wg.btgape.nft",
"description": "A CNS or UNS blockchain domain. Use it to resolve your cryptocurrency addresses and decentralized websites.",
"image_url": "https://api.unstoppabledomains.com/metadata/image-src/wg.btgape.nft.svg",
"metadata_url": "https://api.unstoppabledomains.com/metadata/91536964291889399618341723954804464475905588715229665495699147789348738887050",
"opensea_url": "https://opensea.io/assets/matic/0xa9a6a3626993d487d2dbda3173cf58ca1a9d9e9f/91536964291889399618341723954804464475905588715229665495699147789348738887050",
"updated_at": "2024-05-19T11:39:05.023713",
"is_disabled": false,
"is_nsfw": false
},
"quantity": 1,
"seller": "0xd5d76d9886e290a2aeeb30d3bf87484cc45b48e4",
"buyer": "0x6846438b282ba9392886969f54b0cca68d72c295",
"payment": {
"quantity": "13000000000000000",
"token_address": "0x0000000000000000000000000000000000000000",
"decimals": 18,
"symbol": "MATIC"
},
"transaction": "0xf8b12299f0f5b9853e90d1fa970f65abc14a0da5d88b738d5291d8c837b5d0ba",
"event_timestamp": 1716118744
},
{
"event_type": "sale",
"order_hash": "",
"chain": "matic",
"protocol_address": "",
"closing_date": 1716113820,
"nft": {
"identifier": "91479848471200769315961354310023318340099283969806226282086765256972041489232",
"collection": "unstoppable-domains-polygon",
"contract": "0xa9a6a3626993d487d2dbda3173cf58ca1a9d9e9f",
"token_standard": "erc721",
"name": "064.arukbn.nft",
"description": "A CNS or UNS blockchain domain. Use it to resolve your cryptocurrency addresses and decentralized websites.",
"image_url": "https://api.unstoppabledomains.com/metadata/image-src/064.arukbn.nft.svg",
"metadata_url": "https://api.unstoppabledomains.com/metadata/91479848471200769315961354310023318340099283969806226282086765256972041489232",
"opensea_url": "https://opensea.io/assets/matic/0xa9a6a3626993d487d2dbda3173cf58ca1a9d9e9f/91479848471200769315961354310023318340099283969806226282086765256972041489232",
"updated_at": "2024-05-19T10:17:00.703501",
"is_disabled": false,
"is_nsfw": false
},
"quantity": 1,
"seller": "0xd5d76d9886e290a2aeeb30d3bf87484cc45b48e4",
"buyer": "0x1bd46c45cf50c6448bf05c1a767e3ff837d83fa6",
"payment": {
"quantity": "13000000000000000",
"token_address": "0x0000000000000000000000000000000000000000",
"decimals": 18,
"symbol": "MATIC"
},
"transaction": "0x0ad98aa5e3e8869d24ea4cf82f41d66f8d9ca5b0e50830b8ce73153dd880f32e",
"event_timestamp": 1716113820
},
...
Is this an expected behaviour? It looks like they are valid transactions:
- https://polygonscan.com/tx/0xf8b12299f0f5b9853e90d1fa970f65abc14a0da5d88b738d5291d8c837b5d0ba
- https://polygonscan.com/tx/0x0ad98aa5e3e8869d24ea4cf82f41d66f8d9ca5b0e50830b8ce73153dd880f32e
Since there can be multiple sales in the same transaction (example), we are using the order_hash to filter out duplicated events in our indexer, so it being missing in the event is causing inconsistencies.
Thanks!
this is the currently expected behavior for non-seaport events. we don't derive an order hash for other marketplaces.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.