Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
https://api.layerswap.io/swagger
For accessing Layerswap Partner API endpoints your app(s) API KEY (retrieved from Partner Setup) should be provided in X-LS-APIKEY
header:
--header 'X-LS-APIKEY: {YOUR_APP_APIKEY}'
Name | Method | Auth | Url |
---|---|---|---|
GET
No
https://api.layerswap.io/api/available_networks
GET
No
https://api.layerswap.io/api/available_routes
GET
No
https://api.layerswap.io/api/swap_rate
POST
Yes
https://api.layerswap.io/api/swaps
POST
No
https://api.layerswap.io/api/swaps/fast
POST
Yes
https://api.layerswap.io/api/swaps/{id}/prepare
GET
Yes
https://api.layerswap.io/api/swaps/{id}
Cancel Swap
DELETE
Yes
https://api.layerswap.io/api/swaps/{id}
This endpoint return all the neccessary information to execute source transaction.
GET
https://api.layerswap.io/api/swaps/{id}/prepare_src_transaction
Prepare swap deposit for execution
Note that you should execute this transaction manually. You should compose it based on the response and send to your wallet for execution. (Ex. User's Metamask, wallet managed by Fireblocks)
This endpoint provides the ability to create a swap with as few parameters as possible - destination network, asset and amount. Then, the endpoint will return all the possible source networks which can be used for transferring the funds to the destination network. The returned source networks are tracked for a possible deposit.
POST
https://api.layerswap.io/api/swaps/fast
Create fast swap
In order to initiate the process of bridging assets across blockchains, CEXes, and fiat, a Swap should be created. Swap has all the necessary information required to be able to process transfers from the source to the destination.
POST
https://api.layerswap.io/api/swaps
Create swap
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
version
String
Possible values “sandbox” | any. If a sandbox value is provided, only the Testnet networks will be returned. For any other values - only the Mainnet networks will be returned.
id* | String | The Swap response data.id received in the create swap endpoint |
from_address | String | Address from which the transaction is going to be executed |
Content-Type* | String | application/json |
X-LS-APIKEY* |
client_id | String |
destination_address* | String | The destination network address, where the user will receive the funds. |
destination_asset* | String |
destination_network* | String |
X-LS-APIKEY* | String |
Content-Type* | application/json |
destination* | String |
source* | String |
amount* | Number | The predefined amount. Note that this is NOT the final amount sent by the user since the user can specify another amount while transferring. |
source_asset* | String |
destination_address* | String | The destination network address, where the user will receive the funds. |
refuel* | Bool | If set to true, the user will receive an additional refuel transaction in the native currency to the specified |
reference_id | String | Partner specified ID that could be used for the future reference to retrieve the swap. |
destination_asset | String |
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.
To check transaction status, you can retrieve created swap.
GET
https://api.layerswap.io/api/swaps/
Get swap by Id or ReferenceId
A detailed explanation of Swap Object is available here.
API Key retrieved from
Optionally can be passed to the application .
The swap currency name. .
The supported blockchain network name, where the funds should be sent by the user.
API Key retrieved from
The supported blockchain network name, where the funds should be sent by the user.
The supported blockchain network name, where the funds should be sent by the user.
The swap currency name. .
The swap currency name. .
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
version
String
Possible values “sandbox” | any. If a sandbox value is provided, only the Testnet networks will be returned. For any other values - only the Mainnet networks will be returned.
sourceAsset
String
The currency name to be filtered. Example: USDT.
destination
String
The supported blockchain network name to be filtered. See available values.
source
String
The supported blockchain network name to be filtered. See available values.
destinationAsset
String
The currency name to be filtered. Example: USDT.
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
id*
String
ID can be either the Swap response data.id received in the create swap endpoint or a partner provided reference_id from the create swap request
X-LS-APIKEY*
API Key Retrived from Partner Setup