deBridge
  • Introduction
  • The deBridge Messaging Protocol
    • Protocol Overview
    • Fees and Supported Chains
    • 🟢Deployed Contracts
    • Development Guides
      • Building an EVM-based dApp
        • EVM smart contract interfaces
          • Interfaces
            • ICallProxy
            • IDeBridgeGate
            • IDeBridgeToken
            • IDeBridgeTokenDeployer
            • IOraclesManager
            • ISignatureVerifier
            • IWethGate
          • Libraries
            • Flags
          • Periphery
            • CallProxy
            • DeBridgeToken
            • DeBridgeTokenProxy
            • SimpleFeeProxy
          • Transfers
            • DeBridgeGate
            • DeBridgeTokenDeployer
            • OraclesManager
            • SignatureVerifier
            • WethGate
      • Sending cross-chain messages from Solana
        • On-Chain external call preparation for Solana
        • Off-chain external call preparation for Solana
      • Lifecycle of a cross-chain call
      • Gathering data for the claim
    • Development Tools
    • Security
    • Slashing and Delegated Staking
  • 🔁DLN: The deBridge Liquidity Network Protocol
    • Introduction
    • Protocol Overview
    • deBridge Hooks
    • Fees and Supported Chains
    • 🟢Deployed Contracts
    • Market and Limit Orders
    • Interacting with smart contracts
      • Introduction
      • Placing orders
      • Filling orders
      • Withdrawing Affiliate Fees
    • Interacting with the API
      • Authentication
      • Creating an Order
        • Quick Start
        • Reserve Assets
        • Bridging Reserve Assets
        • Bridging non-reserve assets
        • API Parameters
          • Estimation-Only
          • prependOperatingExpenses
        • API Response
          • JSON Example
        • Refreshing Estimates
        • Fees and operating expenses
        • Order Fulfillment
          • Detecting the Order
          • Fulfilling the Order
            • Pre-Fill-Swap
          • Claiming the Order
      • Tracking Order Status
        • Order States
      • Integrating deBridge hooks
        • Creating Hook data for Solana
      • Submitting an Order Creation Transaction
      • Cancelling the Order
      • Affiliate fees
    • Interacting with the deBridge App
      • Custom Linking
    • deBridge Widget
    • Protocol specs
      • Deterministic order ID
      • Hook data
        • Anatomy of a Hook for the EVM-based chains
        • Anatomy of a Hook for Solana
  • 💸dePort
    • Getting started
    • Transfers Flow
  • ⚡deBridge Points
    • Referrers Overview
    • Integrators Overview
  • 🌐deBridge IaaS
    • Getting started
  • 🌐Legal
    • SDK & API License Agreement
  • External Links
    • deBridge Use Cases
      • 💡Examples
    • Talks, Videos, and Articles
    • Website
    • Github
    • Twitter
    • Social channels
      • Discord
      • Facebook
      • LinkedIn
      • Medium
      • Telegram
      • YouTube
Powered by GitBook
On this page

Was this helpful?

  1. DLN: The deBridge Liquidity Network Protocol
  2. Interacting with the API
  3. Creating an Order

API Response

Detailed descriptions of the `create-tx` API response structure.

PreviousprependOperatingExpensesNextJSON Example

Last updated 12 hours ago

Was this helpful?

There are several sections to a create-tx response. You can see a full, real-world API response example . They are:

  • estimation contains gas and fee-related estimates used in the transaction planning process.

srcChainTokenIn

This response field is always present. Represents the structure of what the user wants to sell on the source chain.

Field name
Type
Description

address

string

Source chain input asset address - what the user is trying to sell on the source chain.

chainId

integer

decimals

integer

Source chain input asset decimals.

name

string

Source chain input asset name.

symbol

string

Source chain input asset symbol.

amount

string

Source chain input asset amount, taking the decimals into account.

approximateOperatingExpense

string

mutatedWithOperatingExpense

boolean

approximateUsdValue

integer

Approximate USD value of the source chain input assets. Informative purposes only - not for real-time trading.

originApproximateUsdValue

integer

Approximate USD value of the source chain input assets. Informative purposes only - not for real-time trading.

srcChainTokenOut

This response field is only present if the source chain input assets were not .

Field name
Type
Description

address

string

chainId

integer

decimals

integer

Source chain output asset decimals.

name

string

Source chain output asset name.

symbol

string

Source chain output asset symbol.

amount

string

Source chain output asset amount, taking the decimals into account.

maxRefundAmount

string

approximateUsdValue

integer

Approximate USD value of the input assets. Informative purposes only - not for real-time trading.

dstChainTokenOut

This response field is always present. Represents the structure of what the user wants to buy on the destination chain.

Field name
Type
Description

address

string

Destination chain output asset address - what the user wants to receive when the order is fulfilled.

chainId

integer

decimals

integer

Destination chain output asset decimals.

name

string

Destination chain output asset name.

symbol

string

Destination chain output asset symbol.

amount

string

Destination chain output asset amount, taking the decimals into account.

recommendedAmount

string

Destination chain output asset amount, taking the decimals into account.

approximateUsdValue

integer

recommendedApproximateUsdValue

integer

costDetails

An array describing the cost components associated with the trade. Possible entry types include:

  • PreSwap

  • PreSwapEstimatedSlippage

  • DlnProtocolFee

  • TakerMargin

  • EstimatedOperatingExpenses

  • AfterSwap

  • AfterSwapEstimatedSlippage

  • tx

    • data is the data that must be signed and submitted. It contains all necessary information to initiate a , including cases involving . It is either a calldata (for EVM-based chains) or a serialized transaction (for Solana)

    • to is a destination address for the transaction. Acts as the spender in the approve call for ERC-20 tokens. Applicable to EVM source chains only.

    • value is a in the source chain's native currency charged by the protocol. Applicable to EVM source chains only.

  • prependedOperatingExpenseCost is the estimated operating cost added to the transaction, adjusted for token decimals. Present only if the request was made with prependOperatingExpenses .

  • order is an object containing details required to facilitate the cross-chain trade.

    • approximateFulfillmentDelay

      • Estimated delay, in seconds, for the order to be fulfilled.

    • salt

      • Randomized value used to ensure uniqueness in the order hash.

    • metadata

      • Additional contextual information about the order.

  • orderId

    • A deterministic identifier for the order. The same ID is used on both source and destination chains and can be used to .

  • fixFee

    • charged in the source chain's native currency. This matches tx.value for EVM-based chains.

  • userPoints

    • The number of that the user will get for this trade.

  • integratorPoints

    • The number of that the integrator will get for this trade.

Source .

It will be different from the srcChainTokenInAmount if the request had . If it had, this will be the amount to use in the approve call.

Solver's for this swap.

Signifies if the request had .

Source chain output asset address - what the source chain input asset was swapped for in the .

This asset will be used for cross-chain settlement, and what the solver fulfilling the order will receive. This is also the asset that the user will receive if the order is .

Source .

Solver's for this swap.

Destination .

🔁
chain id
prepended operating expenses
operating expense
prepended operating expenses
pre-swap
cancelled
chain id
operating expense
chain id
here
reserve assets
cross-chain order
non-reserve assets
flat fee
DLN
enabled
Flat fee
deBridge points
deBridge points
track order status