askill
odos

odosSafety 90Repository

Odos smart order routing DEX aggregator. Best swap rates with patented SOR algorithm across 500+ liquidity sources.

2 stars
1.2k downloads
Updated 2/7/2026

Package Files

Loading files...
SKILL.md

Odos ๐Ÿ”ฎ

Smart Order Routing DEX aggregator. Patented algorithm for best execution across 500+ liquidity sources.

๐Ÿ’Ž Referral Fee Configuration

This skill includes a referral fee (1%) to support development.

VariableValueDescription
REFERRAL_CODE0Referral code (0 = default)
FEE_RECIPIENT0x890CACd9dEC1E1409C6598Da18DC3d634e600b45EVM wallet to receive fees
COMPACTtrueUse compact calldata for gas savings

Fee Breakdown:

  • User pays: ~1% of swap output (configurable)
  • Referrer receives: 100% of fee
  • Fees are collected on-chain directly to your wallet

Features

  • ๐Ÿ”„ 500+ Liquidity Sources - Uniswap, SushiSwap, Curve, Balancer, etc.
  • โ›“๏ธ Multi-Chain - Ethereum, Arbitrum, Optimism, Polygon, Base, Avalanche
  • ๐Ÿง  Smart Order Routing - Patented SOR algorithm
  • ๐Ÿ“Š Multi-Input Swaps - Swap multiple tokens at once
  • ๐Ÿ’ฐ Referral Program - Earn on every swap
  • โšก Gas Optimized - Compact calldata for lower gas

API Base URL

https://api.odos.xyz

Get Swap Quote

CHAIN_ID="1"  # Ethereum

# Token addresses
INPUT_TOKEN="0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"   # ETH
OUTPUT_TOKEN="0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"  # USDC
INPUT_AMOUNT="1000000000000000000"  # 1 ETH in wei
USER_ADDRESS="<YOUR_WALLET>"

# Referral configuration
REFERRAL_CODE="0"

curl -s -X POST "https://api.odos.xyz/sor/quote/v2" \
  -H "Content-Type: application/json" \
  -d "{
    \"chainId\": ${CHAIN_ID},
    \"inputTokens\": [{
      \"tokenAddress\": \"${INPUT_TOKEN}\",
      \"amount\": \"${INPUT_AMOUNT}\"
    }],
    \"outputTokens\": [{
      \"tokenAddress\": \"${OUTPUT_TOKEN}\",
      \"proportion\": 1
    }],
    \"userAddr\": \"${USER_ADDRESS}\",
    \"slippageLimitPercent\": 1,
    \"referralCode\": ${REFERRAL_CODE},
    \"compact\": true
  }" | jq '{
    inAmounts: .inAmounts,
    outAmounts: .outAmounts,
    gasEstimate: .gasEstimate,
    pathId: .pathId
  }'

Assemble Transaction

PATH_ID="<PATH_ID_FROM_QUOTE>"

curl -s -X POST "https://api.odos.xyz/sor/assemble" \
  -H "Content-Type: application/json" \
  -d "{
    \"userAddr\": \"${USER_ADDRESS}\",
    \"pathId\": \"${PATH_ID}\",
    \"simulate\": false
  }" | jq '{
    to: .transaction.to,
    data: .transaction.data,
    value: .transaction.value,
    gasLimit: .transaction.gas
  }'

Multi-Input Swap (Swap Multiple Tokens)

# Swap ETH + USDC to DAI
curl -s -X POST "https://api.odos.xyz/sor/quote/v2" \
  -H "Content-Type: application/json" \
  -d "{
    \"chainId\": ${CHAIN_ID},
    \"inputTokens\": [
      {
        \"tokenAddress\": \"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\",
        \"amount\": \"500000000000000000\"
      },
      {
        \"tokenAddress\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",
        \"amount\": \"500000000\"
      }
    ],
    \"outputTokens\": [{
      \"tokenAddress\": \"0x6B175474E89094C44Da98b954EesdeAC495271d0F\",
      \"proportion\": 1
    }],
    \"userAddr\": \"${USER_ADDRESS}\",
    \"slippageLimitPercent\": 1,
    \"referralCode\": ${REFERRAL_CODE},
    \"compact\": true
  }" | jq '.'

Multi-Output Swap (Split to Multiple Tokens)

# Swap ETH to 50% USDC + 50% DAI
curl -s -X POST "https://api.odos.xyz/sor/quote/v2" \
  -H "Content-Type: application/json" \
  -d "{
    \"chainId\": ${CHAIN_ID},
    \"inputTokens\": [{
      \"tokenAddress\": \"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\",
      \"amount\": \"${INPUT_AMOUNT}\"
    }],
    \"outputTokens\": [
      {
        \"tokenAddress\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",
        \"proportion\": 0.5
      },
      {
        \"tokenAddress\": \"0x6B175474E89094C44Da98b954EedeAC495271d0F\",
        \"proportion\": 0.5
      }
    ],
    \"userAddr\": \"${USER_ADDRESS}\",
    \"slippageLimitPercent\": 1,
    \"referralCode\": ${REFERRAL_CODE},
    \"compact\": true
  }" | jq '.'

Supported Chains

ChainIDNative Token
Ethereum1ETH
Arbitrum42161ETH
Optimism10ETH
Polygon137MATIC
Base8453ETH
Avalanche43114AVAX
BSC56BNB
Fantom250FTM
zkSync Era324ETH
Linea59144ETH
Mantle5000MNT
Mode34443ETH

Get Token List

curl -s "https://api.odos.xyz/info/tokens/${CHAIN_ID}" | jq '.tokenMap | to_entries[:10] | .[] | {symbol: .value.symbol, address: .key, decimals: .value.decimals}'

Get Liquidity Sources

curl -s "https://api.odos.xyz/info/liquidity-sources/${CHAIN_ID}" | jq '.[] | {id: .id, name: .name}'

Check Contract Info

curl -s "https://api.odos.xyz/info/contract-info/v2/${CHAIN_ID}" | jq '{
  routerAddress: .routerAddress,
  executorAddress: .executorAddress
}'

Safety Rules

  1. ALWAYS display swap details before execution
  2. WARN if price impact > 1%
  3. CHECK token allowance before swap
  4. VERIFY output amounts
  5. NEVER execute without user confirmation

Error Handling

ErrorCauseSolution
NO_PATH_FOUNDNo route availableTry different pair
INSUFFICIENT_LIQUIDITYLow liquidityReduce amount
SLIPPAGE_EXCEEDEDPrice movedIncrease slippage

Links

Install

Download ZIP
Requires askill CLI v1.0+โ–ถ

AI Quality Score

94/100Analyzed 2/12/2026

A comprehensive and highly actionable skill for interacting with the Odos DEX aggregator API, featuring multi-chain support, complex swap types, and clear safety guidelines.

90
95
90
95
95

Metadata

Licenseunknown
Version-
Updated2/7/2026
PublisherDemerzels-lab

Tags

api