Skip to main content
Below is a succinct breakdown of the parameters used in the create-tx API endpoint. Detailed descriptions and usage examples are provided in dedicated subpages.

Authentication

ParameterExample ValueDescription
accesstokenxx789xAccess token generated by deBridge.

Directional Parameters

These parameters define the origin and destination of the transaction, including the assets being sold on the source chain and the assets being purchased on the destination chain.
ParameterExample ValueDescription
srcChainId56Internal chainId of the supported source chain.
srcChainTokenIn0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580dInput asset address (what the user sells).
dstChainId43114Internal chainId of the supported destination chain.
dstChainTokenOut0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7Output asset address (what the user buys).

Offer Parameters

These parameters specify the amounts of tokens to be sold and received. The API can also be configured to automatically determine the output amount to ensure a reasonably profitable market order.
ParameterExample ValueDescription
srcChainTokenInAmount100000000000000000000 or autoAmount of input token (with decimals). Can be auto if dstChainTokenOutAmount is specified.
dstChainTokenOutAmountauto or 100000000000000000000Amount of output token. Recommended to use auto for optimal solver matching.
prependOperatingExpensetrueAdds estimated operating expense to input token. Recommended for better UX.

Authorities and Recipient Address

Optional parameters defining entities authorized to patch/cancel the order, and the recipient of funds on fulfillment. Typically user addresses are used.
These parameters are optional. However, omitting them means the API won’t return a signable transaction payload until wallet connection.
Ensure dstChainOrderAuthorityAddress is user-accessible — otherwise funds may become inaccessible.
ParameterExample ValueDescription
srcChainOrderAuthorityAddress0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045Can patch the order and receive refund if cancelled. Typically the user’s address.
dstChainOrderAuthorityAddress0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045Can patch/cancel order on destination chain. Must be controlled by the user.
dstChainTokenOutRecipient0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045Recipient of funds on destination chain after fulfillment. Typically the user’s address.

Affiliate Fee Parameters

These settings define the affiliate fee recipient and amount.
ParameterExample ValueDescription
affiliateFeePercent0.1Percentage of input amount to assign as affiliate fee.
affiliateFeeRecipient0xd8dA6BF... or 862oLANN...Address (EVM) or pubkey (Solana) that will receive affiliate fees once order reaches ClaimUnlocked state.

Referral Code

Optional tracking and reward parameter.
ParameterExample ValueDescription
referralCode31805Integrator’s referral code. Can be generated in-app.

Example Request

The following example shows a complete create-tx API request:
https://dln.debridge.finance/v1.0/dln/order/create-tx?srcChainId=56 &srcChainTokenIn=0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d &srcChainTokenInAmount=100000000000000000000&dstChainId=43114 &dstChainTokenOut=0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7 &dstChainTokenOutAmount=auto &dstChainTokenOutRecipient=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 &srcChainOrderAuthorityAddress=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 &dstChainOrderAuthorityAddress=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 &affiliateFeePercent=0.1 &affiliateFeeRecipient=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
This request demonstrates how all core parameters are combined to generate a valid and executable cross-chain order.

Deep Dive

Reference to common and interesting use-cases. Deep dive into certain parameters.

Estimation Only

The create-tx endpoint is designed for both estimation and transaction construction. It can be safely called without specifying authority or recipient addresses when a wallet address is not yet available—for example, during early stages of interaction in a dApp. In such cases, the endpoint can still be used to suggest input or output token amounts. Once the wallet address becomes available, the same create-tx request can be repeated with the necessary parameters to retrieve a full transaction call. To maintain solver profitability and ensure the order remains valid upon submission, it is recommended to allow the API to compute a reasonable output amount. This is achieved by setting the dstChainTokenOutAmount parameter to auto in both the estimation and transaction calls.
Additionally, orders should be submitted within 30 seconds of retrieving the transaction from the API. This expiration window helps ensure the order remains profitable for solvers at the time of on-chain placement.

prependOperatingExpenses

The prependOperatingExpenses setting is a boolean. It is recommended to enable this option:
prependOperatingExpenses = true

Enabled (prependOperatingExpenses=true)

When enabled, operating expenses are calculated separately from the spread and added on top of the input token amount, making all fees fully transparent. This approach helps clarify exactly what is being paid in fees. For example, swapping 100 USDC on Arbitrum for 100 USDC on Polygon in our application displays a small fee (just over $0.03), shown above the red line in the figure below. This represents the solver’s operating expenses. Prepend Operating Expenses
  • ERC20 Approval: The total amount (including operating expenses) must be approved using the approve function. This value is provided in response.estimation.srcChainTokenIn.amount.
    • Buffer Recommendations: Estimates may need to be refreshed if there is a delay between generating the response and submitting response.tx. Updated operating expenses might require a new approval.
  • Fulfillment Likelihood: When response.tx is signed and submitted within 30 seconds, the probability of successful execution is over 99.9%.

Disabled (prependOperatingExpenses=false)

When disabled, response.estimation.srcChainTokenIn.amount equals the srcChainTokenInAmount specified in the original create-tx request. In this case, the operating expenses are subtracted directly from the spread between the input value and response.estimation.dstChainTokenOut. In this case, an additional error should be covered. It occurs when the input amount is too small to pay for the order costs.
{
    "errorCode": 12,
    "errorId": "ERROR_LOW_GIVE_AMOUNT",
    "errorMessage": "Given amount of input asset is too small to cover operational costs of Takers, cannot estimate reasonable outcome of an order",
    "reqId": "79a2c431-e52c-48c0-a12e-2a9960644a59"
}
Sample error request. Both modes produce the same execution outcome, but enabling prependOperatingExpenses typically provides a clearer breakdown of the fee structure for end users.