0
Fixed

Some sniper tool prices are wrong

Mark T 4 years ago updated by sales 4 years ago 5

On the eBay Game Sniper tool, some of the prices are being reported incorrectly. Specifically, the tens digit and ones digit of the cents are swapped. For example, if the true price is $3.50, the sniper tool will often use $3.05 instead. This happens both to game prices and shipping prices. Presumably this is a text parsing bug, where "$3.50" first gets written as "3.5" and then the "5" is split off and gets interpreted as 5 cents. (There are also lots of cases where the shipping price is incorrectly set to $2.86, but I assume that's when the shipping price just isn't available in eBay's feed, in which case there's not much you can do about it.)

Answer

Answer
Fixed

Great sleuthing Mark.  I found the parsing error in the code.  This will go live with the next server update.  Should be Monday sometime.

Thanks again.

+1

I can't replicate this digit swapping. Can you take a screenshot of it so I can see what is happening?

+1

After further testing, I think it's specific to prices that end in 0. Here's a way for me to reproduce it. Load the sniper tool in firefox, and open up the web console. Paste in the following javascript:

old_handler = on_channel_message;

on_channel_message = function(msg) {
  if ((90 + Number(msg["price"])) % 100 > 90 || (90 + Number(msg["shipping_cost"])) % 100 > 90) {
    console.log(JSON.stringify(msg));
  }
  old_handler(msg);
}

Wait a few minutes, and you'll start getting candidates. Here's one I found just now:

{"condition":"used","console_id":"G39","console_name":"Nintendo 3DS","estimated":1999,"item_id":"254500591537","listing_type":"bin","picture_url":"https://thumbs2.ebaystatic.com/m/mu-jobqHTAbY4BtMjeNNBCg/140.jpg","price":1803,"product_name":"Wario Ware Gold","savings":196,"shipping_cost":286,"title":"WarioWare Gold (Nintendo 3DS, 2018)","uid":"G49698","version":1005}

It says the price is 1803. However, if you go to https://www.ebay.com/itm/254500591537 , you'll see the price is actually $18.30 .

Great coding and analysis.  You must be a programmer too :)

I'll look into this and see what is going on to cause that.  Very odd issue for sure.

I'm more a mathematician, but I have been programming for most of my life, and I'm not afraid to dig into someone else's code.

I've recently found myself with some more time for "personal development" (don't worry, I'm still employed), so I did some more digging. I figured out how to make requests to the eBay Developer API. Here's a query for a recent example of a game whose price is interpreted incorrectly:

https://open.api.ebay.com/shopping?callname=GetSingleItem&responseencoding=JSON&siteid=0&version=1141&ItemID=233570481068&appid={YOUR_APP_ID_HERE}


You'll have to fill in your own production appID, since I don't think I should be posting mine publicly. Anyway, inside the response, we find this field:

"ConvertedBuyItNowPrice":{"Value":3.2,"CurrencyID":"USD"}

It's essentially the same if you ask for XML instead of JSON. I expect that your parsing troubles start here, perhaps by splitting at the ".", multiplying the first number by 100 and adding the second number.

Answer
Fixed

Great sleuthing Mark.  I found the parsing error in the code.  This will go live with the next server update.  Should be Monday sometime.

Thanks again.