v1

latestOpenAPI 3.0.02026-07-223691143.2 KB
single chain swap

get/v1.0/chain/transaction

Query parameters

chainId'1' | '10' | '56' | '137' | '8453' | '42161' | '43114' | '59144' | '7565164' | '100000001' | '100000002' | '100000008' | '100000009' | '100000013' | '100000014' | '100000017' | '100000019' | '100000020' | '100000021' | '100000022' | '100000023' | '100000025' | '100000026' | '100000027' | '100000028' | '100000029' | '100000030' | '100000031' required

An ID of a chain, a chain where the swap must be performed

tokenInstring required

An address of an input token to swap

tokenInAmountstring required

An amount of input tokens to swap

slippagestring

A slippage constraint (in %) is a safeguard during swaps (on both source and destination chains, if applicable). It is also used to calculate the minimum possible outcome during estimation. This property can be set to "auto" so that the API will suggest the best possible slippage.

tokenOutstring required

An address of a target token.

tokenOutAmountstring

Amount of the target asset the market maker expects to receive upon order fulfillment. This property can be set to "auto" so that the API will suggest the best possible outcome of the order based on current market conditions and the protocol fees, keeping the order in a reasonable-to-fulfill state

tokenOutRecipientstring required
affiliateFeePercentnumber

The share of the input amount to be distributed to the affiliateFeeRecipient (if given) address as an affiliate fee.

If you are building on top of deSwap, you might want to take a small fee relative to the amount of a token a user provides for a swap. To achieve this, set this parameter to a desired % (e.g. 0.1 stands for 0.1%; the max value is 10 which stands for 10% of srcAmountInParam) and specify your wallet address in the affiliateFeeRecipient parameter.

For example, setting this parameter to 0.1 means that when the user gives 5000 USDT then you will receive 5 USDT immediately after transaction is being confirmed.

affiliateFeeRecipientstring

An address (on an origin chain) that will receive affiliate fees according to the affiliateFeePercent parameter. For solana affiliate fee you have to create & provide Jupiter's referral key (https://referral.jup.ag/dashboard).

senderAddressstring

Address (on the source chain) who submits input tokens for a cross-chain swap

srcChainPriorityLevel'normal' | 'aggressive'

Configures the priority level for transaction fee estimation.

referralCodenumber

Response

slippagenumber required
recommendedSlippagenumber required
protocolFeestring
protocolFeeApproximateUsdValuestring