Limit orders are one of the most basic forms of order placement. A trader will set a buy or sell price, dictating that the asset can only be sold for that price or better.
If you are on the buy side of the market, that means you can either place the order at any of the current buy order prices, in between the bid-ask spread, or at the current asking price. Placing an order above the current asking price will execute the order at the current ask price. This prevents traders from taking trades at prices which are not the best current offers.
If you're a trade currently on the sell side of the market, you will want to place a limit order at any of the current sell prices, at the bid-ask spread prices, or at the current best bid price. Placing an order below the current bid price would result in an immediate execution of the trade at the best bid price.
The options for order placements look something like the following illustration:
Immediate or Cancel (IOC) Limit Order
An IOC order is an order generally placed at the current best bid or ask price. If you are buying an asset, the order should be placed at the best ask price. If you are selling an asset, this order should be placed at the current best bid price.
IOC orders are designed in such a way that they will not stay on the order book. They will attempt to take an open order at the specified price. If there is an open order available, they will be executed. Any remaining balance after attempting to execute the full amount is canceled. If no order is available on the order book for the specified price, the order will just be canceled immediately.
Good 'Til Canceled (GTC) Limit Order
GTC limit orders will remain open on the exchange until they are either filled by another market participant or canceled by the person who placed the order.
These orders are valuable for setting boundaries on where you would like to buy or sell an asset based on the movement in the market. For example, if the current price of BTC is $10,500, you can set a GTC order at $10,000. That way if the price of BTC drops, your order will be executed once it reaches the $10,000 mark.
When placing IOC / GTC orders through the Shrimpy developer API, the baseSymbol and quoteSymbol must be specified in the request.
In order to get access to the symbols which should be used for these calls, you can refer to the "Get Exchange Assets" API endpoint which returns the asset ID, name, symbol, and tradingSymbol. The "tradingSymbol" is the one you will want to use to execute trades. This is because this is the symbol used by the exchange to identify the asset. "symbol" is the common symbol used for the asset, which may or may not be the one used by the specific exchange you are trading on.
Here is an example response from a "Get Exchange Assets" request:
Need help? Don't hesitate to reach out to our support team at [email protected].