Layerswap API
API Explorer
  • Overview
  • Partner Setup
  • UI Integration
    • Layerswap-hosted page
    • Embedded form
    • Customization
      • Interactive Builder
  • API Integration
    • Quickstart
    • API Reference
    • Swap lifecycle
    • Webhooks
    • DEPRECATED - V1 API Reference
      • Get Available Networks
      • Get Available Routes
      • Get Swap Rate
      • Create Fast Swap
      • Create Swap
      • Prepare Source Transaction
      • Get Swap
  • Mixed Integration
    • Swap Link
  • Data
    • Object types
    • Supported Platforms
      • Supported Networks
      • Supported Fiat Providers
      • Supported CEXes
Powered by GitBook

Layerswap

  • App
  • Explorer
  • Twitter
  • Discord

© 2023 Bransfer, Inc. All rights reserved.

On this page

Was this helpful?

Export as PDF
  1. API Integration
  2. DEPRECATED - V1 API Reference

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

Name
Type
Description

client_id

String

Headers

Name
Type
Description

Content-Type*

String

application/json

Request Body

Name
Type
Description

destination_address*

String

The destination network address, where the user will receive the funds.

destination_asset*

String

destination_network*

String

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 1 year ago

Was this helpful?

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.

See available assets
Client ID
See available values.