I’ve been playing around with the listAssets API and noticed that the produced results are different from the ones I can see on immutascan.
Look at this example:
I want to query all currently listed on-sale assets, similar to immutascan
In order to achieve that I’m using the following query, note the sell_orders=true part. if I change it to buy_orders=true API returns internal_server_error
What I see in API response it way different from what I see on immutascan
If you’re still experiencing issues with this specific API, please submit a support ticket https://support.immutable.com/hc/en-us/requests/new. The team should be able to help clarify what is expected output.
Immutascan only shows what’s traded(bought/sold)/transferred/deposited/minted/withdrew. I don’t think you can track the active/live orders. But if you want to get a list of trades, you can use the ‘get a list of trade’ endpoint to pull that information.
I’m pretty sure it can as I can see it here - it shows all the currently listed assets (there is even a Buy Now button). If immutascan can do it there must be an API for it - either not public or not documented?
The ‘get a list of orders’ API returns a view from Activity page here and that’s not what I need.
Great catch. I wasn’t aware that people can buy NFTs on immutascan.
If I understand you correctly, you are trying to build a marketplace functionality with us, where traders/users can see all active orders and potentially buy the order live?
I am very sure that Immutascan is using the ‘orders’ endpoint to get a list of assets that are on sale (if you filter the status = active). The /orders end point shows who put their assets on sale, and the /trade endpoint shows who bought those active sell orders. The activity page shows more about the 'trade" activity.
Actually, I’m thinking of building a bot to notify about potentially underpriced items
status=active is what I was missing it seems, thanks for the help!
do you know why the price in the response is different compared to the price on immutascan?
e.g. Brightland Steppes (566,335) #79609 costs 7.9929 on immutascan but API returns
I couldn’t find the transaction for #79609 that costs 7.9929ETH. The only thing I found on Immutascan for this particular asset is: Immutascan - Immutable X Blockchain Explorer
It was traded for 3900 USDC.
But on immutascan it has a price of 1.007 ETH
My assumption is that the quantity_with_fees is not returning a correct result - as the number is the same as quantity
I think the API is showing the right result for this particular order. I understand you are a bit confused, because quantity and quantity with fees represent different things in active vs filled orders.
If you scroll down all active orders on our platform, you’ll see quantity = quantity with fees. However if you filter for filled orders only, you will see quantity with fees != quantity anymore.
In active orders, quantity and quantity with fees both represents “sell price + already known fees (seller marketplace fee + royalty fee + protocol fee)”. In filled orders, quantity is the base price (what the seller would get) and quantity with fees = base price + all fees (royalty + protocol + seller marketplace + buyer marketplace).
In your example, since the order is still active, both quantity and quantity + fees are the same. It’s different to what’s shown on the marketplace because the price on the marketplace also includes buyer marketplace fee. On immutable x marketplace, the buyer marketplace fee = 1%. The way to calculate is probably not intuitive as you’ll need to calculate the base price from the quantity first:
Then use this base price to calculate price buyer needs to pay to get this item = base price * 1.07 (protocol fee + royalty fee + seller marketplace fee + buyer marketplace fee 1%) = 1.007 ETH
I must say I find this API behaviour very inconsistent. It is the same endpoint /orders but it behaves differently based on the status query param. Plus it is not even documented in the specs.
And I do believe that the logic of the “final” price (aka quantity with fees) of the given asset should reside in your backend. Since all those fees and the way you apply them can change on your end it doesn’t make much sense to force this calculation on your API users.
Do you think it is realistic to expect this kinda API change from your side?
I can submit a feature request. But this is a big ask that I am not sure if you’d see a change any time soon even if the product team accepted the feature request
Will submit a feature request nonetheless. Can I clarify with you what you meant by “Final price should reside in our backend”? Do you mean that we shouldn’t show the final price at all? and instead, the API should only show listing price?
Thank you for that!
Since API is stable now I’d imagine that you would rather introduce a new field instead of changing the logic for the existing one, but that’s up to your product team ofc
I said “the logic of the “final” price” calculation should reside in your backend, so basically this quote of yours
In your example, since the order is still active, both quantity and quantity + fees are the same. It’s different to what’s shown on the marketplace because the price on the marketplace also includes buyer marketplace fee. On immutable x marketplace, the buyer marketplace fee = 1%. The way to calculate is probably not intuitive as you’ll need to calculate the base price from the quantity first:
Then use this base price to calculate price buyer needs to pay to get this item = base price * 1.07 (protocol fee + royalty fee + seller marketplace fee + buyer marketplace fee 1%) = 1.007 ETH
As a user of your API I expect to it to return a price I see on immutascan, as it is what a potential buyer of the given asset would pay. Currently I cannot get this price at all and have to calculate it based on this very forum thread discussion