Smart Order Routing (SOR) is the process of intelligently routing trades through asset pairs to take advantage of the best execution path. This allows developers to reduce the cost of fees, minimize market impact, and strategically place orders to optimize the outcome of the order.

With the Shrimpy Developer APIs, SOR is built directly into our trading engine. This means without any complex logic or configuration, ANY developer can leverage these industry leading endpoints within minutes.

Configuration

Request

POST https://dev-api.shrimpy.io/v1/users/701e0d16-1e9e-42c9-b6a1-4cada1f395b8/accounts/123/trades

Request Body

{
    "fromSymbol": "BTC",
    "toSymbol": "ETH",
    "amount": "0.01",
    "smartRouting": true,
}

Let's briefly go over how to configure your SOR trade:

  • fromSymbol - The asset which you want to sell in order to buy another asset.
  • toSymbol - The asset you want to purchase.
  • amount - How much of the fromSymbol you wish to trade for this order.
  • smartRouting - Enter "true" to take advantage of the smart order routing.

That's all there is to it! Those 4 simple parameters. 

If you want to add an extra layer of control, you can also use the following optional configurations:

  • maxSpreadPercent - This option allows you to specify the amount of spread you allow Shrimpy to cross. If the spread is higher than the specified amount in this field, Shrimpy will block the trade.
  • maxSlippagePercent - This control allows you to set a slippage safety. Ultimately, the purpose of this value is to prevent your trades from excessively slipping while being routed through the various pairs. If the slippage percent is exceeded, trading will be halted on that asset pair. 
Did this answer your question?