Query eBay purchase history


Please note that this blog has been moved.

Now it has its own domain: mynixworld.info🙂

If you want to read the latest version of this article (recommended) please click here and I open the page for you.

eBay is great except that they don’t want to show you how much you have spent over a period of time. Maybe this is a strategic feature, I don’t know and I don’t care. I just need it!

Lately I’ve started working on some projects that requires cheap parts (in order to keep the project cost low). eBay is happening to be a good market for those Chinese cheap parts (let’s face it: almost everything is made in China, nowadays), so I began to trade on eBay quite a lot. The platform is great but some important feature is still (intentionally) missing: the summary of your purchases.

This can be accomplished quite easy if you save the HTML page on disk and then parse its content with the help of some data extraction utility (eg. awk).

My solution is using this approach, so I have two scripts for this:

Now all I have to do is to save the eBay purchase history to a file on local disk and then call the ebay_total script that will list all items and the total summary (expressed in original currency and also converted to EUR/my local currency):

ebay_total -f /tmp/My_eBay_Purchase_History.htm

The output of the command above will look like:

----------------------------------------------------------------------
Nr    Date        Shipped date    Price    Item description
----------------------------------------------------------------------
1    04/09/13    04/10/13    $2.75    35g Soldering Solder Paste Flux Cream Welding Paste NT
2    04/08/13    04/08/13    $1.59    1m Power Supply Multimeter Alligator Testing Cord Lead Clip to Banana Plug cable
3    04/08/13    04/09/13    $1.56    2 Pcs Fuse Holder FH043 10A 250V for 5x20mm Fuse NEW
...
26   03/16/13    03/18/13    $1.05    2.5FT 2.0MM Desoldering Braid Solder Remover Wick Cable
----------------------------------------------------------------------
TOTAL: 26 items => 54.38 USD (~ 41.57 EUR ; 182.18 RON)

Note: one can use a software to connect to his/her eBay account and to watch biddings/purchase history. I don’t like this approach, especially when we are talking about an eBay account!

About Eugen Mihailescu

Always looking to learn more about *nix world, about the fundamental concepts of arithmetic, algebra and geometry. I am also passionate about programming, database and systems administration.
This entry was posted in linux, shell. Bookmark the permalink.

4 Responses to Query eBay purchase history

  1. David says:

    Your scripts are not available via the links on your page.

  2. NickD says:

    Really useful, thank you.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s