getAssets() silently ignores seaport_sell_orders when using include_orders param
Using SDK version 4.0.6
Based on the docs, it seems like include_orders is supported and should return seaport_sell_orders
When calling getAssets() with include_orders
const assets = await openseaSDK.api.getAssets({
// ...
include_orders: true
})
The API endpoints properly returns seaport_sell_orders with the asset: Testnet API example call
But it seems the issue happens when the assets are mapped from JSON, seaport_sell_orders are ignored, only the legacy sell_orders are accounted for
Current behaviour:
- call getAssets, process JSON assets returned from API
- each asset is mapped and only legacy sell_orders is accounted for, seaport_sell_orders gets ignored/not mapped to object
- Assets get returned silently excluding any
seaport_sell_orders, even though they were included in API JSON response
Expected behaviour:
- Call getAssets
- Assets are mapped and account for
seaport_sell_orders - Assets object is returned with
seaportSellOrders
Please let me know if I can provide any other details.
You can't use include_orders with OpenSea SDK, they are not supporting it yet. Just call the API directly via http call
@Rotemy thanks for the reply. I'm a bit confused because you could use include_orders as I mentioned before the recent switch to seaport_sell_orders, it would return sellOrders on the assets just like it would when calling the API directly, so it seemed to be supported (maybe indirectly?)
Are you saying the SDK never intended to support it?
Probably it got removed from the SDK in the new (4.0) version because I don't see any reference to include_orders on that project. As you can just use the API using a http call I would close this issue.
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.