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
  • Swap Object
  • Network Object
  • Asset Object
  • Transaction Object
  • Swap Rate Object

Was this helpful?

Export as PDF
  1. Data

Object types

Swap Object

Field
Descripiton

id

The id of the swap

source_network

Network name like STARKNET_MAINNET

destination_network

Network name like OPTIMISM_MAINNET

amount

The amount to be sent. Note that this is NOT the final amount sent by the user since the user can specify another amount while transferring

fee

The Layerswap fee. Note that fee is recalculated based on the transaction initiated by the user

source_asset

Asset Name transfered, like USDC

destination_address

The address where the user funds will be received

reference_id (optional)

Partner specified id that could be used for future reference to retrieve the swap

status

The status of the swap. Available values: [user_transfer_pending, ls_transfer_pending, completed, failed, expired, canceled]

transactions

Network Object

Field
Description

name

The unique formatted name indicates the network and whether it is on Testnet or Mainnet

display_name

The user-friendly name for the network

logo

The URL for the network logo

Asset Object

Field
Descripiton

name

The unique formatted name for the currency (e.g: ETH)

display_name

The user-friendly name for the currency

logo

The URL for the currency logo

name

The recent price in USD for the currency

contract (optional)

The contract address for the currency

decimals

The floating decimal places for the currency

precision

The number of decimal places for the currency amount to be used in rounding

Transaction Object

Field
Description

timestamp

The timestamp of an actual blockchain transaction

type

Layerswap transaction types. Possible values: "input", "output", "refuel"

from

The sending party of the transaction

to

The receiving party of the transaction

transaction_hash

The blockchain transaction id

confirmations

The number of confirmations for the transaction

max_confirmations

The maximum number for the transaction to be confirmed at the blockchain

amount

The amount sent in the transaction

Swap Rate Object

Field
Description

min_amount

The minimal amount for the swap to be created for a given asset

max_amount

The maximal amount for the swap to be created for a given asset

fee_amount

The Layerswap fee amount

Last updated 1 year ago

Was this helpful?

Array of

Transaction object