Before creating a swap, it's possible to programmatically retrieve data about the valid minimum/maximum swap amount and the Layerswap fee. The endpoint is public and does not require any authorization.
POST
https://api.layerswap.io/api/swap_rate
A detailed explanation of the Swap Rate Object is available here.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Content-Type*
String
application/json
source*
String
The supported blockchain network name. See available values.
destination*
String
The supported blockchain network/CEX/fiat provider name. See available values.
source_asset*
String
The currency name. Example: USDC
refuel*
String
If set to true, the user will receive an additional refuel transaction in the native currency for the swap.
destination_asset
String
The currency name. Example: USDC