A Gripe About API’s.

My site that I’ve been working on for a few months, and the problems I have encountered

“The first step in exceeding your customer’s expectations is to know those expectations.”
-Roy H. Williams, Author Wizard of Ads Triology

Throughout the past 6 months of me working on my website Cephei I have had numerous learning experiences. With these experiences I have come to learn what to expect and what not to expect, and nothing has been more infuriating than dealing with information that is not feasible/available to retrieve. Of course I am referring the what the title of this post entails, API’s.

Now typically when working with a project you scour for API’s as needed from the source you are referencing/using and everything is roses and sunshine. This isn’t about a typical day though, in fact this is about the rage-inducing moments when you realize that an API is not providing you effective means to accomplish your goal and you have to jump over ropes just to continue. However, even the above is tolerable, but I’ll go even more in depth here, this is about the moments when the API is not providing you effective means, and the developers are not willing to help you out.

For Cephei the entire service is built off API usage. REST and WebSocket calls are my site’s bread and butter. What should make life even easier is that all of my API calls are being made to services that are all similar. Cryptocurrency exchanges all do the same thing, with a few features give/take. You trade a cryptocurrency for another cryptocurrency, and for the buy/sell functions most of the exchanges provide and excellent and easy-to-use API that will accompany all of your needs. As for more advanced functions that vary from exchange-to-exchange, I honestly don’t expect each and every exchange to have it in their API (but sometimes I am surprised). As of me typing this and working with 5 exchange API’s (Poloniex, Bittrex, Binance, Bitfinex, GDAX(In order from best to worst API)) I can say that they do a pretty okay job overall with most data being easily available.

The Good, the Bad, and the Infuriating:

Good:
Poloniex- Honestly I don’t enjoy their layout but I’ll be damned if their API isn’t the most convenient, well put together API I have ever witnessed. Everything is read out of the box and they have documentation for every call and function, they also keep all of this updated! 10/10.
Bittrex- Just like Poloniex, it is nice and well put together with all calls in place. The only problem I encountered was that their API didn’t allow for market trades (it was removed some time ago), but that was easy to get around but getting a list of the open buy/sells for a market and setting a limit buy/sell to do the job via backend. 9/10.

Bad:
GDAX- Coinbase did an amazing job with the design… I actually had my account suspended from Coinbase years ago due to “suspicious activity” but since they followed up to 0 of my emails with real responses I’m stuck in dev limbo, not being able to test out the private API calls with an API key needed. 3/10. **** Coinbase.

Infuriating:
Bitfinex- The epitome of a beautiful turd. Their API had many, many things but fell short on the most usefulness of utilizing an API. I want my data, and I want it fast. From here on out the main issue with the “infuriating tab” will all have one thing in common. Symbol locked calls. When I want to get an entire markets data, the easiest way is with a generic call that provides all the information in a nice multi-dimensional array that I can hook up to a recursive function to separate and utilize. Now, for some reason (maybe resource usage?) important calls tend to be Symbol locked. So instead of doing “return all of my recent trades with an optional ‘symbol’ and ‘amounts’ variable” we get “return all recent trades of symbol” which takes away a lot of flexibility in the way we can utilize the data, especially if your running a service that utilizes the entire exchange. I would explain in more depth detail, but you can read about my troubles with Bitfinex here, and here (notice how I never receive a reply). 6.66/10
Binance- This one is hard for me because I love the exchange, and everything about the API is beautiful and well put-together (they utilize git-hub to host official API documentation and to point to “official” API wrappers) except for the fact that they utilize symbol locked calls. I can not get my users historical orders data or the 24 hour price. Currently I am coding a function to get the markets 24 hour price, the problem is that instead of getting the entire markets 24 hour price in one call, I have to make a call for each market. What really doesn’t make sense is that getting the current price of the market returns an array with all of the coins, so basically the same thing, but one is symbol locked. I’ve been able to speak to the developers, but currently the only answer I’ve gotten is “You’ll have manage your service and stay within the rate limits; how you do that is up to you.”. 6.66/10

This is an ongoing battle that I will write more about, but for now let’s have our fingers crossed that magically this can get improved.