opensea-js icon indicating copy to clipboard operation
opensea-js copied to clipboard

getAssets() silently ignores seaport_sell_orders when using include_orders param

Open reaganchisholm opened this issue 4 years ago • 4 comments

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:

  1. call getAssets, process JSON assets returned from API
  2. each asset is mapped and only legacy sell_orders is accounted for, seaport_sell_orders gets ignored/not mapped to object
  3. Assets get returned silently excluding any seaport_sell_orders, even though they were included in API JSON response

Expected behaviour:

  1. Call getAssets
  2. Assets are mapped and account for seaport_sell_orders
  3. Assets object is returned with seaportSellOrders

Please let me know if I can provide any other details.

reaganchisholm avatar Aug 12 '22 16:08 reaganchisholm

You can't use include_orders with OpenSea SDK, they are not supporting it yet. Just call the API directly via http call

Rotemy avatar Aug 14 '22 11:08 Rotemy

@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?

reaganchisholm avatar Aug 14 '22 14:08 reaganchisholm

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.

Rotemy avatar Aug 14 '22 16:08 Rotemy

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.

github-actions[bot] avatar May 23 '23 18:05 github-actions[bot]