Swaps
Create Swap
Creates a new swap based on the provided request.
POST
/
api
/
v2
/
swaps
X-LS-APIKEY
string
*
X-LS-APIKEY
Required
string
X-LS-APIKEY
string
X-LS-APIKEY
string
object
*
destination_address
string
destination_address
string
reference_id
string
reference_id
string
source_exchange
string
source_exchange
string
destination_exchange
string
destination_exchange
string
source_network
string
source_network
string
source_token
string
source_token
string
destination_network
string
destination_network
string
destination_token
string
destination_token
string
refuel
boolean
refuel
boolean
use_deposit_address
boolean
use_deposit_address
boolean
use_new_deposit_address
boolean
use_new_deposit_address
boolean
amount
number
amount
number
source_address
string
source_address
string
slippage
string
slippage
string
curl --request POST \
--url https://api.layerswap.io/api/v2/swaps \
--header 'Content-Type: application/json' \
--header 'X-LS-APIKEY: <api-key>' \
--data '{
"destination_address": "0x",
"reference_id": null,
"source_network": "ETHEREUM_MAINNET",
"source_token": "ETH",
"destination_network": "ARBITRUM_MAINNET",
"destination_token": "ETH",
"refuel": false,
"use_deposit_address": false,
"use_new_deposit_address": null,
"amount": 0.0042,
"source_address": null,
"slippage": null
}'
Authorizations
Headers
X-LS-APIKEY
string
default: NDBxG+aon6WlbgIA2LfwmcbLU52qUL9qTnztTuTRPNSohf/VnxXpRaJlA5uLSQVqP8YGIiy/0mz+mMeZhLY4/QBody
application/json
Response
200 - application/json
Available options:
evm
, starknet
, solana
, cosmos
, starkex
, zksynclite
, ton
, paradex
, tron
, fuel
Available options:
evm
, starknet
, solana
, cosmos
, starkex
, zksynclite
, ton
, paradex
, tron
, fuel
Available options:
evm
, starknet
, solana
, cosmos
, starkex
, zksynclite
, ton
, paradex
, tron
, fuel
Available options:
evm
, starknet
, solana
, cosmos
, starkex
, zksynclite
, ton
, paradex
, tron
, fuel
Available options:
evm
, starknet
, solana
, cosmos
, starkex
, zksynclite
, ton
, paradex
, tron
, fuel
Available options:
evm
, starknet
, solana
, cosmos
, starkex
, zksynclite
, ton
, paradex
, tron
, fuel
Available options:
evm
, starknet
, solana
, cosmos
, starkex
, zksynclite
, ton
, paradex
, tron
, fuel
Available options:
evm
, starknet
, solana
, cosmos
, starkex
, zksynclite
, ton
, paradex
, tron
, fuel
Was this page helpful?
curl --request POST \
--url https://api.layerswap.io/api/v2/swaps \
--header 'Content-Type: application/json' \
--header 'X-LS-APIKEY: <api-key>' \
--data '{
"destination_address": "0x",
"reference_id": null,
"source_network": "ETHEREUM_MAINNET",
"source_token": "ETH",
"destination_network": "ARBITRUM_MAINNET",
"destination_token": "ETH",
"refuel": false,
"use_deposit_address": false,
"use_new_deposit_address": null,
"amount": 0.0042,
"source_address": null,
"slippage": null
}'