While you did provide the skeleton for doing this, it's important to note that you should cache the item value or something.
Firstly, it's not like the item's price will change that much over the course of the script running. Secondly and most importantly, you don't want to be bombarding their server with requests as well as stopping the thread from running until the page has loaded. Of course using asynch methods would be better for this.