Poloniex API – Beginner – s Guide To Poloniex API Programming
Creating Your Own Spreadsheets and Charts Using Poloniex API – Part 1
If I do this right, when you are done reading through it you should have an automated process pulling information you want to see in an effortless to read chart from the Poloniex Exchange, even if you have never programmed anything before. The process will also alert you via Email when it meets criteria you specify. I am providing this information loosely and publicly, but it took me weeks to figure it all out, and it took me many hours more to put together a guide elementary and comprehensive enough for anyone to use… one that will save you the same weeks worth of work.
For that reason, I am going to request a puny voluntary donation if you find this guide effortless to understand and useful. I am fresh to Crypto and learning as I go. Figuring out how to pull this information and use it is one way I am personally attempting to better understand this market. I hope it will help you also, and give you the data to make better investment decisions.
I appreciate your contribution. My Bitcoin Address for any support is:
I tend to get wordy, and I am going to go into a lot of detail. I don’t just want to give you code to copy and paste. I also want you to understand what you are doing so you can create a table of your own design using any of the available information Poloniex offers in their API feed.
I am going to break this into many chunks and explain each one. At the end of these lessons you should end up with a chart demonstrating the relationship inbetween the Buy Order Total and the Price of any Altcoin on Poloniex you choose. I would recommend using one with a lot of act for your very first attempt. For my examples, I am going to use Monero (XMR). In addition, your finished program is going to send you an Email notification when the Total Buy Orders exceed a value you assign.
Step one is to set up a Google Drive Account if you do not already have one. If you have a GMAIL account you already have a Drive. You need this account because you need access to Google Scripts (applications) and Sheets (spreadsheets). This is mainly because the API information from Poloniex is in JSON format, which Microsoft Excel and Access have trouble deciphering, but Google Scripts treats lightly. Everything I go through in this tutorial will be based on using these Google devices. If you are opposed to using Google, I don’t blame you, but I do not know how to make this work any other way. I spent days attempting to do the same thing I am about to demonstrate you using Excel and Access, and could not get the raw data from the API to pull in correctly.
Step two is to familiarize yourself with the Poloniex API data you can pull, and even manipulate. I am not going to go into, or even recommend you use, the API to trade with. Tho’ I am planning to experiment with it, I am not familiar enough with these features to give you accurate information on how it is done, and I don’t want to be responsible for causing you to lose any investments based on my incomplete information.
Pay particular attention to the ‘returnOrderBook’ API in the Public API Methods section. To use these Public APIs you do not need to activate the API Feature within your Poloniex account, or even have an account for that matter. Anyone can use these. Even if you only trade on another exchange such as Bittrex, you can still use the Poloniex Public APIs to gather information free of charge.
Attempt following this link:
What you see returned from Poloniex should look like the data pasted below and is a accomplish list of all the current Buy (bid) orders and Sell (ask) orders for Ethereum in JSON format. It is relatively effortless to understand visually. In the screen shot I pasted below, notice the very first line starts with “asks” and about halfway down I have circled the word “bids.” Everything after “bids” are the Buy orders, and everything before is the “asks” or Sell orders.
If you look on the Poloniex Exchange at the ETH Buy Orders and Sell Orders, then compare these to the results you see in your own JSON data, you will see the same information in both places. The very first “ask” order is also the lowest Sell price, so when I retrieved the data below, this order was suggesting 1.1 ETH for 0.01510990 BTC each. The Highest Buy order (just after “bids”) was suggesting to purchase Two.65584403 ETH for 0.01510989 BTC each.
The numbers on a coin with as much volume as ETH are permanently fluctuating. You could hit refresh every ten seconds and they would be different. I don’t want to be perplexed with data every ten seconds, and Poloniex will not be blessed if I pull too much data, so I have to determine on how often I want to pull the information. The chart I am going to showcase you how to create is going to pull data every ten minutes, and keep twenty four hours at any one time. I will also explain how to switch those times to meet the needs for your own charts.
The very first challenge we will overcome is pulling the data you see on the screen into a Google Sheet where we can work with it. We do this using a Google Script. I will begin to cover this significant step in the next lesson.
About Me: I have been employed as a programmer for twenty years now, tho’ I do not program in the same language I am going to train in this lesson. This programming practice has helped me understand the logic necessary, but the syntax is very different than what I am used to (RPGLE). On the side, I like to write and document. If you searched the web for me you would find articles and interviews on everything from Poker to Prepping… from Blockchain to Boolberry. You might also find some mindless Zombie brief stories I wrote a few years ago. I would be open to doing some side work for you if you like my style and are in need of someone to write for you… Will work for Crypto.