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.

Binance API Trading Example

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"

}

Bittrex API Trading Example

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.

Binance API Trading Example

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"

}

Bittrex API Trading Example

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:

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.

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.