Create Fast Swap

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

Query Parameters

Headers

Request Body

Raw request

curl -X 'POST' \
  'https://localhost:9669/api/swaps/fast?clientId=f10853b323b94e10b2d9a2cddbe105a6' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "destination_address": "{YOUR_DESTINATION_ADRESS}",
  "destination_network": "ARBITRUM_GOERLI",
  "destination_asset": "ETH"
}'

Raw response

{
  "data": [
    {
      "source_address": "0x5368029018cb9f7d7d92c51d19d86835573c7679",
      "networks": [
        {
          "name": "ETHEREUM_GOERLI",
          "network_currencies": [
            {
              "asset": "ETH",
              "contract": null,
              "min_amount": 0.00073,
              "precision": 6
            }
          ]
        }
      ]
    },
    {
      "source_address": "0xfae8acb3b8243303565636aeb336c985dba9a552",
      "networks": [
        {
          "name": "IMMUTABLEX_GOERLI",
          "network_currencies": [
            {
              "asset": "ETH",
              "contract": null,
              "min_amount": 0.000121,
              "precision": 6
            }
          ]
        }
      ]
    }
  ],
  "error": null
}

Last updated

© 2023 Bransfer, Inc. All rights reserved.