Exchanges

Exchange APIs swap crypto to fiat assets and vice versa. You need to have accounts for each of the asset types you are swapping.

We support 2 types of exchange orders today:

  1. Quote - In a typical quote order, you have about 15-20 seconds to accept an order. Given this is not typically possible in clients' use cases, we have designed our quote orders to operate slightly differently. In our quote order, once you accept the quote, the system will automatically get a fresh quote and only execute the trade if its within the accepted quote +/- the slippage. Its only supported on the DEPOSIT_BASIC products today.
  2. Market - In a market order, the order will get executed at the market price. This type of order is supported on the DEPOSIT_BASIC products today.

Not all supported assets are swappable with each other. Click here to see the full list of supported exchange pairs.

There are 2 steps to performing an exchange:

  1. Setup the exchange - using exchanges/quote endpoint .
  2. Execute the exchange - using exchanges/{exchange_id}/accept endpoint

You can get details of any executed Exchange using exchanges/{exchange_id} endpoint

© 2023 Layer2 Financial Inc. All Rights Reserved.