Limit Orders - Universal APIs for Crypto Exchange Trade Execution
The crypto space is chaos. Pure unadulterated mayhem. It’s the wild west of the modern world where conventions are thrown straight out the window. Exchanges in particular are a disjointed mess. If you tried executing a limit order through the APIs of 16 different exchanges, you would find no 2 are alike. Every exchange supports odd quirks, which makes developing apps a constant struggle. We know this from experience — Our developer APIs connect 16 exchanges into a single unified API.
Trading Cryptocurrencies through APIs
The Shrimpy team is proud to announce we have solved this problem. No more living in a nightmare. Take back your sanity with a single endpoint which can execute a limit order on every major exchange. Instead of 16 different implementations, you only need to manage one simple API which is consistent for every exchange. Developing this feature was met with agonizing pain, but we know the space will appreciate a unified interface which simplifies the development process.
Limit Orders
Limit orders are a critical aspect of the cryptocurrency trading market. A limit order is an order placed with an exchange to buy or sell an asset at the specified price or better. A buy limit order would therefore be executed at the limit order price or lower, and a sell limit order will be executed at the limit order price or higher.
When it comes to trading services, limit orders are the key order type critical for building any trading functionality. Knowing this, we’ve heavily invested in providing a seamless experience for executing limit orders with Shrimpy. Anyone can collect full real-time order book data across every major exchange, place an order, and check status of orders through a uniform set of APIs. There are two primary limit order types which were integrated into the v1 of our APIs. These are “Immediate or Cancel (IOC) Orders” and “Good ’Til Cancelled (GTC) Orders”.
Immediate or Cancel (IOC) Order
IOC orders are intended to be placed at a price which immediately executes the order. Most commonly used as a way to precisely take orders which lie on the other side of the bid-ask spread from your current position. Placing this type of order ensures you will be the “taker” in the trade. That way the orders can systematically control for slippage, spread, and strategy execution. When executing an IOC order, any unfilled portions of the order are immediately canceled. No part of the order will be left on the exchange to be filled at a later time.
Let’s look at an example of how you place a IOC order on Binance with our unified limit order API.
Request:
POST https://dev-api.shrimpy.io/v1/users/<userId>/accounts/<exchangeAccountId>/orders
Request Body:
{
"baseSymbol": "ETH",
"quoteSymbol": "BTC",
"amount": "0.5",
"price": "0.0344",
"side": "BUY",
"timeInForce": "IOC"
}
Let’s look at an example of how you place a IOC order on Bittrex with our unified limit order API.
Request:
POST https://dev-api.shrimpy.io/v1/users/<userId>/accounts/<exchangeAccountId>/orders
Request Body:
{
"baseSymbol": "ETH",
"quoteSymbol": "BTC",
"amount": "0.5",
"price": "0.0344",
"side": "BUY",
"timeInForce": "IOC"
}
You might have noticed these two examples look identical. That’s because they are the same! Use the exact same call for the exact same purpose across all exchanges.
Good ’Til Cancelled (GTC) Order (aka Open Order)
GTC orders are often placed at a price point which allows a taker on the other side of the bid-ask spread from your position to execute the order. Therefore this type of order is often used by a “maker”. Once the GTC order is placed with the exchange, it remains in effect on the order books until it’s either filled or has been canceled by the trader. There is no guarantee that a GTC order will ever be executed. For example, placing a GTC order on an exchange to buy Bitcoin for a price of $1 USD is unlikely to ever be filled.
Let’s look at an example of how you place a GTC order on Binance with our unified limit order API.
Request:
POST https://dev-api.shrimpy.io/v1/users/<userId>/accounts/<exchangeAccountId>/orders
Request Body:
{
"baseSymbol": "ETH",
"quoteSymbol": "BTC",
"amount": "0.5",
"price": "0.0344",
"side": "BUY",
"timeInForce": "GTC"
}
Let’s look at an example of how you place a GTC order on Bittrex with our unified limit order API.
Request:
POST https://dev-api.shrimpy.io/v1/users/<userId>/accounts/<exchangeAccountId>/orders
Request Body:
{
"baseSymbol": "ETH",
"quoteSymbol": "BTC",
"amount": "0.5",
"price": "0.0344",
"side": "BUY",
"timeInForce": "GTC"
}
Once again, the endpoints are identical. Not only are they identical between the GTC orders across exchanges, but they are identical to the IOC order endpoints. The only difference is changing the “timeInForce” field to specify GTC orders.
Order Book Data
Real-time limit orders require real-time order book data. The Shrimpy team understands this need, so we also support the most robust real-time infrastructure for collecting full order book data across every major exchange. Learn more about these endpoints in one of our latest articles here:
Order Book - Universal APIs for Real-Time Crypto Exchange Data
Summary
These two simple order types are the most common orders present across cryptocurrency exchanges. Our team saw this as an incredible opportunity for us to simplify the way every application executes trades across exchanges.
Shrimpy | Crypto Trading APIs for Developers
That’s not all. Shrimpy is built to manage users for scalable crypto trading services. Whether you have 10 power users or 10,000 active traders, that’s no problem for our universal APIs. Scale without losing your mind. Our servers communicate directly with all of your users to manage data collection, trade execution, and exchange account management.
Which exchanges are currently supported?
The list of exchanges we support has been growing rapidly. We’ve added nearly 10 exchanges in the last few months and don’t plan on slowing down. The mission of Shrimpy is to connect every single exchange under one uniform interface. Right now, Shrimpy’s Crypto Trading APIs support the following exchanges:
About Shrimpy
Shrimpy is an automated crypto trading & portfolio management tool that lets users automate their strategy.
Shrimpy also offers trading APIs for developers looking to integrate scalable exchange trading functionality into their application.
Don’t forget to follow us on Twitter and Facebook for updates, and ask any questions to our amazing, active communities on Telegram, Discord, & Reddit.