Wolf Fivousix.4319:

I’m currently developing a software to work with the TP and I’m using https://api.guildwars2.com/v2/commerce/listings to retrieve all the items ID’s. BUT seems like some of those ID’s do not exist, like “29974”.
If I try to open a link with that id, https://api.guildwars2.com/v2/items/29974, I get a {"text":“no such id”} answer.

The wiki says “If the root endpoint (/v2/commerce/listings) is accessed without specifying an id, a list of all ids is returned.” , doesn’t that mean that those ID’s should be an item that is currently been traded on the TP?
If not, then probably is a list of all valid items IN the game, but then again, the item doesn’t exist!

Am I doing something wrong? Did I skipped a detail somewhere?

Thank you for any help!

Dr Ishmael.9685:

Those are “leftovers” of an old bug in the TP that allowed people to submit buy orders for items that aren’t enabled in the live game. I’m pretty sure that bug has been fixed, but these listings haven’t been removed from the TP. I think Pat has said they’re working on finding a way to do that, though.

Wolf Fivousix.4319:

Hey Dr Ishmael, thank you very much for the fast reply!
That explains a lot! I’ll make a work around for those cases then and when they patch that I’ll patch mine too.

PS: Great book! Completely changed the way I look at the world!

Pat Cavit.9234:

The listings have been removed from the TP (Notice how there’s no buys or sells for https://api.guildwars2.com/v2/commerce/listings/29974) but they weren’t re-marked as undiscovered when we cleared them out.

Seems like our fix wasn’t complete, I’ll bug somebody about that.

Wolf Fivousix.4319:

Hey Pat, thank you for the explanation too! Let us know when they fix it, as I’m doing an extra request to the item server when I first create my database, so I don’t get the invalid ID’s on it.
I know, not efficient at all, but I see no other way of requesting confirmation for the ID. At least I “fused” the step where I retrieve the item information with the ID confirmation, but still hammering the /v2/items/ more then I wanted to, as I would not request the item information for every ID.

StevenL.3761:

You’re doing the extra call to /items for each ID separately?

Wolf Fivousix.4319:

So far, yes. Since I had no need for the information before, I had no need to batch the ID’s in one request. Now with this change it is definitely a good idea, but then that’s more of a efficiency improvement than a need, so I’m leaving all efficiency changes for the “production phase” of my software, this way I don’t loose my focus on the needs of the project while the change I mentioned required only a minor tweak on the order of already implemented and working code.

But please, I would gladly accept any recommendation you could provide me for that phase!

Dr Ishmael.9685:

You could just get the full lists of IDs from /v2/items and from /v2/commerce/listings, then do a list compare.

Wolf Fivousix.4319:

Hmmm, that’s a great idea! I’ll have a list with all the valid ID’s in the game and another with all the listings in the game, if something in the listings does not match a valid ID in the first list, then it’s not a valid one.

Thank you very much!

Wolf Fivousix.4319:

Hi there again, sorry to bring back the topic, but considering it is already here I thought would be better than opening a new one just for this issue. It also has the advantage of having the previous conversation context, which might help.

I’m about to finish this software, but I have come across another “invalid ID”.
ID 29978, Ebon Vanguard Staff: This one, unlike the others, is a valid item (as Dr Ishamael Items X Prices suggestion), therefore when I do try to access the prices API I get the blank brackets “[]”.

Should this item, being an account bound item, be on the https://api.guildwars2.com/v2/commerce/listings and https://api.guildwars2.com/v2/commerce/prices ?

Thank you!