Type/to search
Getting Started
Platform Basics
Writing Strategies
Development Tools
Backtesting System
Advanced Topics
JavaScript Multi-threading
Communication Between Live Trading Strategies
API Rate Limiting Control
Options Trading
Web3
EVM On-chain Swaps (Uniswap, KyberSwap, 1inch)
Solana Swaps (Jupiter)
Ethereum (EVM)
TRON
Data and Research
Extended API Interface

On-chain trading: which exchange object to use.

NeedExchange objectNotes
Swap tokens on DEXs of EVM chainsUniswap (Uniswap, PancakeSwap, Aerodrome), KyberSwap, OneInch (1inch)Trade with the spot trading functions; see EVM On-chain Swaps (Uniswap, KyberSwap, 1inch)
Swap tokens on SolanaJupiterSee Solana Swaps (Jupiter)
Swap on several chains through the OKX DEX aggregatorOKX_DEXMnemonic phrase; pairs are {chainIndex}:{token}_USD (case-sensitive token names); see OKX_DEX
Read on-chain data, call smart contracts, send custom transactionsWeb3Supports Ethereum and other EVM-compatible chains (see Ethereum (EVM)) and TRON (see TRON)

On-chain exchanges such as Hyperliquid, Lighter, EdgeX, Aster and Polymarket are used with the standard trading functions just like centralized exchanges; for their configuration see the exchange pages under Decentralized Exchanges and Prediction Markets in the syntax manual.

In this sectionRead the whole section

NameDescription
EVM On-chain Swaps (Uniswap, KyberSwap, 1inch)The Uniswap exchange object (exchange.GetName() returns Uniswap) connects to the pools of Uniswap, PancakeSwap or Aerodrome on one EVM chain and maps on-chain s…
Solana Swaps (Jupiter)The Jupiter exchange object (exchange.GetName() returns Jupiter) connects to the Jupiter aggregator on Solana and maps swaps to the spot trading functions.
Ethereum (EVM)With ChainType set to ETH, the Web3 exchange object connects to nodes of Ethereum and every EVM-compatible chain (BSC, Base, Arbitrum, Optimism, Polygon and so…
TRONWith ChainType set to TRON, the Web3 exchange object connects to a TRON node.