Appearing on Bitcoinity

So far I'm only adding well established exchanges. It means that I may be missing many small exchanges in order to avoid a few of them that are scams. I really would like to avoid leading users to places where they can easily lose money. Even with best intentions, fresh exchanges can cause that due to poor security.

There are no altcoins on Bitocinity for now. It may change in the future, but for now it's only BTC/fiat pairs.

Only direct trading pairs for now, so no options, swaps and other derivatives

I try to make sure that for all exchanges I add I can ensure that the data is accurate, so it's good to have some sane API. It's important to me that I can catch up with trades, it's nice if they can be as realtime as possible. Details below in the API section.

It doesn't cost anything to be added to Bitcoinity, I'm glad to have as many exchanges as possible as long as they meet those basic conditions.

Becoming a sponsor does not influence adding exchange to Bitcoinity, also it's not possible to buy some special appearance for your exchange on bitcoinity, exchanges are ordered automatically.

Note that the price and amounts as provided as strings, to avoid float rounding errors. It's not necessary, but probably a good idea. Example url for fetching trades could look like this:

http://example.com/api/v1/trades.json?currency=USD&since=234242

Properly working since param is very important

. It only provides trades that occured after given txid.

it allows me to fetch all your historical trades

it minimizes amount of exchanged data on updates (a lot!)

in case we have connectivity problems I can catch up and be sure that I didn't miss any trade

Ticker

Personally I don't care about the ticker because I already have all necessary data coming from trades and order book.

Rate limiting

If there are any limits on how often can I query the API (or how ofter you update the cache), let me know and I will adjust. I'm also happy to provide IPs from which I'm doing the fetching if you can add them to some white list.

Websocket

If you can provide a websocket with live trades and order book changes, you're awesome. This is how data from the biggest exchanges is updated on bitcoinity. Consider not using socket.io but a pure websocket implementation for which there are more clients across different languages.

General API hints

provide example client imlpmentation in at least one language

include API version in the url so that you can introduce changes without breaking existing clients

make sure that timestamps are UTC and not your local timezone

for fetching trades, always add some limit (1000 trades seems reasonable). ?=since=0 should return your first N trades, not your whole trading history (which will fail once you grow)

syncing your server clock often is a must

adding API method which returns your current server time is not a bad idea

if you are separating responses into results/error fields, make sure to document possible error strings

clearly state rate limits in your API docs

you probably can't serve your latest trades list from the db query because it won't scale, but try not to use fixed time cache. Biggest exchanges can avoid it, so you can do it too. You can expire cache on every new trade, use redis lists etc.