Download OpenAPI specification:
Discover DeFi with LFJ, a leading decentralized exchange. Trade a wide variety of tokens, earn rewards, and engage in secure, peer-to-peer transactions. LFJ makes DeFi easy and accessible.
(Required) add http request header x-lfj-api-key: {your-key}
One of amountIn or amountOut is required. Exact out calculation is not supported by some aggregators.
| chain required | string Value: "avalanche" Chain identifier |
| agg required | string Enum: "flytrade" "jar" "kyber" "odos" "okx" Aggregator identifier |
| tokenIn required | string Input token address |
| tokenOut required | string Output token address |
| amountIn | string Input token amount |
| amountOut | string Output token amount |
{- "tokenIn": {
- "address": "string",
- "symbol": "string",
- "swaps": [
- {
- "pair": "string",
- "tokenIn": {
- "address": "string",
- "symbol": "string"
}, - "tokenOut": {
- "address": "string",
- "symbol": "string",
- "swaps": [
- { }
]
}, - "amountBp": 0
}
]
}, - "tokenOut": {
- "address": "string",
- "symbol": "string"
}, - "amountIn": "string",
- "amountOut": "string",
- "aggregator": "string"
}| chain required | string Value: "avalanche" Chain identifier |
| agg required | string Enum: "flytrade" "jar" "kyber" "odos" "okx" Aggregator identifier |
| tokenIn required | string Input token address |
| tokenOut required | string Output token address |
| amountIn required | string Input token amount |
| userAddress required | string User's wallet address |
| slippageBps required | integer <= 10000 Maximum slippage tolerance in basis points (1 bps = 0.01%) |
| feeBps required | integer <= 10000 Fee in basis points (1 bps = 0.01%). Fees can be charged on either the input or output token. |
| tokenInFeeRecipientAddress | string Fee recipient's wallet address. Required if fee is taken from the input token. |
| tokenOutFeeRecipientAddress | string Fee recipient's wallet address. Required if fee is taken from the output token. |
{- "from": "string",
- "to": "string",
- "data": "string",
- "value": "string",
- "gas": "string",
- "gasPrice": "string",
- "amountIn": "string",
- "amountOut": "string"
}