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
| Parameter | Example Value | Description |
|---|
accesstoken | xx789x | Access 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.
| Parameter | Example Value | Description |
|---|
srcChainId | 56 | Internal chainId of the supported source chain. |
srcChainTokenIn | 0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d | Input asset address (what the user sells). |
dstChainId | 43114 | Internal chainId of the supported destination chain. |
dstChainTokenOut | 0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7 | Output 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.
| Parameter | Example Value | Description |
|---|
srcChainTokenInAmount | 100000000000000000000 or auto | Amount of input token (with decimals). Can be auto if dstChainTokenOutAmount is specified. |
dstChainTokenOutAmount | auto or 100000000000000000000 | Amount of output token. Recommended to use auto for optimal solver matching. |
prependOperatingExpense | true | Adds 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.
| Parameter | Example Value | Description |
|---|
srcChainOrderAuthorityAddress | 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 | Can patch the order and receive refund if cancelled. Typically the user’s address. |
dstChainOrderAuthorityAddress | 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 | Can patch/cancel order on destination chain. Must be controlled by the user. |
dstChainTokenOutRecipient | 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 | Recipient of funds on destination chain after fulfillment. Typically the user’s address. |
Affiliate Fee Parameters
These settings define the affiliate fee recipient and amount.
| Parameter | Example Value | Description |
|---|
affiliateFeePercent | 0.1 | Percentage of input amount to assign as affiliate fee. |
affiliateFeeRecipient | 0xd8dA6BF... or 862oLANN... | Address (EVM) or pubkey (Solana) that will receive affiliate fees once order reaches ClaimUnlocked state. |
Referral Code
Optional tracking and reward parameter.
| Parameter | Example Value | Description |
|---|
referralCode | 31805 | Integrator’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.
- 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.