Introduction to APIs (Application Programming Interfaces)

Poloniex
The Poloniex blog
Published in
3 min readAug 26, 2022
Heading banner for “Introduction to APIs (Application Programming Interfaces)”. A cube with the word “API” on one side and electric plugs on the another are pictured beside the title.

What is an Application Programming Interface (API)?

An application programming interface, or API, is code that two applications use to communicate and share information. In the simplest of examples, an app like your smartphone’s weather app uses an API to get the data it displays from a weather data source. Without it, and especially in more complex cases, a user would have to interact directly with the information-providing source, which would require advanced coding knowledge in order to get the same result. So in this way, an API abstracts the underlying complex code that it takes to display weather information or hosting a Twitter feed on a website.

For developers, an API provides a way to interact with another application’s existing functionality, rather than a dev having to code that functionality themselves. Developers use APIs because they make developing an app easier.

When talking about trading on an exchange like Poloniex, an API allows traders to access market data and set up an automated trading strategy with a trading bot.

Crypto glossary entry for the term “API”. Gives 3 bullets on its definition and one example sentence.
From the Poloniex Crypto Glossary

How does an API work?

An API facilitates communication between an application and a server by defining a set of rules on how to send and receive information.

How it works is that an application makes a request to receive information from a web server, which the API processes. After receiving this request, the API in turn communicates with the web server for the requested information. The web server then sends the requested information back to the API, which finally communicates with the requesting application. We can see here that the API’s role is to connect. And APIs are able to facilitate communication between applications no matter who owns the application or web server, or what programming language they might use.

What does an API let a crypto trader do?

Simply put, you can access market data to make trade decisions. With a faster, more efficient API comes a faster updating and more accurate trade display.

By using an API to plug directly into an exchange’s backend and access market data, a savvy trader can automate their entry and exit positions and easily construct a trading strategy that doesn’t require manual intervention.

By subscribing to a trading bot, a user can program parameters and rules by which the bot abides and makes trades accordingly. More than this, because bots can respond to market conditions and execute so quickly, they’re a preferred way to get better returns than the industry standard.

What’s in Poloniex’s new API

In order to facilitate the success of our users, we’ve retooled Poloniex’s APIs. What this means is that users can trade 24/7 in a more responsive, lower latency and higher bandwidth environment.

Our new RESTful API allows for high-performing communication between external programs and our back end in a way that scales very smoothly. Talking more about scalability, we’ve also adopted what’s called a microservices architecture. This splits our trading application into smaller components, making it easier to test and scale our exchange.

The WebSocket API, which updates in real-time, aids our market makers, institutional traders, and professional traders in reacting more aptly to market conditions not only because of its speed but also because it allows for users to receive push notifications about public market data. And because of the NTS’s lowered latency, trading bots can grab information more quickly and have the most accurate and up-to-date market info.

The new APIs are designed for better communication between applications regardless of their size or capabilities, meaning they can respond to professionals’ requests more quickly to provide more up-to-date market data.

We’ve also designed our API to be more user-friendly. Every user will notice the added functionalities of market and stop-market orders, as well as an optimized price chart via the third-party plugin TradingView.

The new API’s enhanced usability delivers a more comprehensive trading experience with an optimized matching service, more order types, faster market data, and a better user experience on the web and the app.

You can find more info on our APIs here.

--

--

Poloniex
The Poloniex blog

Since 2014, the legendary crypto exchange for traders to buy, sell and hodl 400+ assets, including BTC, ETH and the best altcoins on the market.