Network Identifiers
All methods use consistent network identifiers:- EVM networks:
"ethereum:{chainId}" - Solana:
"solana" - Hyperliquid Perps:
"hypercore:perp" - Hyperliquid Spot:
"hypercore:spot"
Supported EVM Chains
| Network ID | Chain |
|---|---|
ethereum:1 | Ethereum Mainnet |
ethereum:10 | Optimism |
ethereum:56 | BNB Smart Chain |
ethereum:100 | Gnosis |
ethereum:137 | Polygon |
ethereum:146 | Sonic |
ethereum:8453 | Base |
ethereum:42161 | Arbitrum One |
ethereum:43114 | Avalanche |
ethereum:59144 | Linea |
ethereum:11155111 | Sepolia (testnet) |
Native Tokens
Native tokens are handled slightly differently depending on the surface:- In some SDK methods (e.g., Swap quoting/executing), you omit
fromToken/toTokenfor native tokens. - In config and position data, native assets are represented by a canonical “null address” per network.
Common Native Tokens
| Network | Token | Address |
|---|---|---|
ethereum:1 | ETH | 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee |
ethereum:10 | ETH | 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee |
ethereum:56 | BNB | 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee |
ethereum:100 | xDAI | 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee |
ethereum:137 | POL (formerly MATIC) | 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee |
ethereum:146 | S | 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee |
ethereum:8453 | ETH | 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee |
ethereum:42161 | ETH | 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee |
ethereum:43114 | AVAX | 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee |
ethereum:59144 | ETH | 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee |
solana | SOL | 11111111111111111111111111111111 |
hypercore:perp | USDC (Perps) | USDC (startingAsset) / 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee (positions) |
0xeeee...eeee). Position data from currentPositions / getCurrentPositions() uses these addresses. Some SDK methods (e.g., swap quoting) let you omit the token address for native tokens instead.
Amounts and Units
- Amounts are typically strings and in the smallest unit for the given network
- wei (EVM), lamports (Solana), etc.
- Hyperliquid Exception: When placing orders or fetching data from Hyperliquid’s API, amounts will be formatted (e.g. $1.5 USDC would be “1.5”). You will also need to consider Hyperliquid’s restrictions on tick and lot sizing when placing orders.
- Keep them as strings to preserve precision for large values.
Agent Context Properties
| Property | Type | Description |
|---|---|---|
sessionId | number | Unique session identifier |
sessionWalletAddress | string | Wallet address for this session |
currentPositions | CurrentPosition[] | Assets allocated at execution start |
executionMode | string | "auto" or "manual" |
Core Methods
| Method (TS) | Method (Python) | Description |
|---|---|---|
log(message, options?) | log(message, error=False, debug=False) | Send log messages. error: true for error logs, debug: true for console-only. |
getCurrentPositions() | get_current_positions() | Get live positions with pending tx status |
transactions() | transactions() | Get transaction history for the session |
clearSuggestedTransactions() | clear_suggested_transactions() | Clear pending manual mode suggestions |
Memory
| Method (TS) | Method (Python) | Description |
|---|---|---|
memory.set(key, value) | memory.set(key, value) | Store a string value |
memory.get(key) | memory.get(key) | Retrieve a value (returns { value } in data) |
memory.delete(key) | memory.delete(key) | Delete a key |
memory.list() | memory.list() | List all keys |
Swap and Bridge (agent.swidge)
| Method (TS) | Method (Python) | Description |
|---|---|---|
swidge.quote(request) | swidge.quote(request) | Get swap/bridge quote with routing |
swidge.execute(quoteData) | swidge.execute(quote_data) | Execute a quote (or array of quotes) |
from, to, amount, fromToken?, toToken?, slippage?
Execute fields: quoteData, expiresAt?
Custom Transactions
| Method (TS) | Method (Python) | Description |
|---|---|---|
signAndSend(request) | sign_and_send(request) | Sign and broadcast a transaction |
signMessage(request) | sign_message(request) | Sign a message (EVM only, EIP-191/712) |
network, request.toAddress, request.data, request.value, request.gas?, request.maxFeePerGas?, request.maxPriorityFeePerGas?, request.enforceTransactionSuccess?, message?, expiresAt?
signAndSend fields (Solana): network, request.hexTransaction, message?, expiresAt?
Hyperliquid (agent.platforms.hyperliquid)
| Method (TS) | Method (Python) | Description |
|---|---|---|
placeOrder(request) | place_order(request) | Place a perp or spot order |
balances() | balances() | Get perp account value + spot balances |
positions(dex?) | positions(dex=None) | Get open perpetual positions; pass a builder DEX name to filter by venue |
order(orderId) | order(order_id) | Get order info by ID |
deleteOrder(orderId, symbol) | delete_order(order_id, symbol) | Cancel an order |
openOrders() | open_orders() | Get all open orders |
orders() | orders() | Get historical orders |
orderFills() | order_fills() | Get fill history |
transfer(request) | transfer(request) | Transfer between spot and perp accounts |
liquidations(startTime?) | liquidations(start_time?) | Get liquidation events |
symbol, side, size, price, market, type?, triggerPrice?, reduceOnly?, postOnly?, expiresAt?
positions fields: dex? to filter positions for a specific builder DEX (for example "xyz", "cash", or "vntl"). Omit it to fetch positions across the default venue and supported builder DEXes. The currently supported builder DEX set is "xyz", "cash", and "vntl", and unsupported builder DEX names are rejected.
Symbols: Perps use "BTC", builder DEX perps use "xyz:GOLD", "cash:GOLD", or "vntl:MAG7" (currently xyz, cash, and vntl are supported; unsupported builder DEX prefixes are rejected), spot uses "BTC/USDC".
Polymarket (agent.platforms.polymarket)
| Method (TS) | Method (Python) | Description |
|---|---|---|
marketOrder(request) | market_order(request) | Buy or sell prediction market shares |
redeemPositions(request?) | redeem_positions(request?) | Redeem settled positions |
tokenId, size, side, expiresAt?
redeemPositions fields: tokenIds?
Size meaning: BUY = USD to spend, SELL = shares to sell.
Common Transaction Parameters
expiresAt is accepted by all transactional methods. Transaction confirmation is handled automatically server-side — the server waits for onchain confirmation and returns success: false with an error message if a transaction reverts.
| Parameter | Type | Description |
|---|---|---|
expiresAt | string | null | ISO 8601 expiry for suggestions in manual mode. If omitted, no time-based expiry (suggestions are auto-cleared at each run start). |
Response Pattern
Every method returns:success before using data. See Error Handling for patterns.