What is API trading and how is it applied to crypto?

Alex Lielacher , 11 Jul 2018 - ApiHackTrading

APIs are omnipresent in today’s financial ecosystem, and yet most people don’t even realize when they’re using one. The recent “irregular” trading incident at Binance has been attributed to malicious API use — and has brought a timely focus to this integral technology.

Before the Internet, financial trading primarily took place over the phone. If you wanted to buy stocks, for example, you had to call up your broker and have them execute a trade on your behalf. In the post-internet age, the buying and selling of financial securities moved online and the application of technology has advanced the process in many ways. One of those ways has been the creation and use of trading APIs.

What is an API?

API stands for application programming interface. An API is a program that enables one software application to interact with another. In simple terms, an API is a messenger that takes requests and tells a system what you want it to do — and then returns the system’s response back to you.

An example of API use most people would be familiar with would be booking an airline flight on a flight prices comparison website like Expedia. Once you have input your desired departure and destination city, the dates you want to travel and the number of passengers, the comparison site searches through all available airline databases and serves you the options. This is done using APIs provided by each airline.

The same thing occurs when you type your information into a Hotel comparison site like  Hotels Combined or Trivago. The platform requests and serves room rate information from every possible hotel database through their respective APIs.

How traders use APIs

A trading API, as the name suggests, allows you to interact with a trading system. More specifically, it allows you to execute directly on an exchange. This is particularly useful for traders who run algorithmic models on their own trading systems and want to receive live pricing and be able to execute trades — either manually or automatically through an algorithm — once their model generates a trading signal.

Trading APIs are particularly popular among hedge funds and proprietary trading firms due to their use of algorithmic trading programs, but even private investors can make use of trading APIs provided by online brokerages and more recently by cryptocurrency exchanges.

Most leading crypto asset exchanges, such as Bitfinex, Bittrex, and Coinbase Pro, offer trading APIs to their customer base. These APIs enable live pricing feeds as well as direct trade execution.

The Binance incident

Trading APIs hit the news recently when an incident at Binance was attributed to malicious use of a Binance API, which caused exponential volume and market pressure to Syscoin trading. There was a sharp spike in the price of SYS and buy/sell order prices hit remarkable levels.

Binance stated that to “protect the safety” of its API users it took a number of actions. Primary amongst was a rollback of irregular trades and the removal of all existing API keys — with a request for all Binance API users to recreate their API keys. In addition, Binance warned API users to better safeguard their API keys going forward and to use the IP whitelist functionality to ensure keys are only accessible to authorized users.

Binance has provided a summation of the incident on its support site.

APIs and crypto trading

While the disruption at Binance API may have briefly put cryptocurrency trading APIs in a bad light, they have become an integral part of professional crypto traders’ arsenal and are a testament to the evolution of the cryptographic asset trading ecosystem.

The more sophisticated investors enter the crypto asset markets, the more the use of APIs and algorithmic trading will increase. These trading programs, which seek to exploit arbitrage opportunities, for example, will actually help to make the crypto market more liquid and efficient. This, in turn, could attract more institutional investors to this new asset class.

The more the crypto asset trading ecosystem matures, the more market entrants can be expected. Currently, we are heading in the direction of the crypto asset markets becoming a part of the established global financial markets. Once crypto regulations are in place in the world’s leading economies, more institutional money will come, and the development of sophisticated and secure trading APIs will play their small but fundamental part in that.