POST
/
api
/
v2
/
swaps
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

X-LS-APIKEY
string
headerrequired

Headers

X-LS-APIKEY
string
default: NDBxG+aon6WlbgIA2LfwmcbLU52qUL9qTnztTuTRPNSohf/VnxXpRaJlA5uLSQVqP8YGIiy/0mz+mMeZhLY4/Q

Body

application/json
destination_address
string
reference_id
string | null
source_exchange
string | null
destination_exchange
string | null
source_network
string
source_token
string
destination_network
string
destination_token
string
refuel
boolean
use_deposit_address
boolean
use_new_deposit_address
boolean | null
amount
number
source_address
string | null
slippage
string | null

Response

200 - application/json
error
object
data
object

Was this page helpful?