6.4k★avantis – OpenClaw Skill
avantis is an OpenClaw Skills integration for coding workflows. Execute leverage trading on Avantis (Base). Long/short crypto, forex, commodities with up to 100x leverage. Uses Python SDK with direct wallet integration.
Skill Snapshot
| name | avantis |
| description | Execute leverage trading on Avantis (Base). Long/short crypto, forex, commodities with up to 100x leverage. Uses Python SDK with direct wallet integration. OpenClaw Skills integration. |
| owner | droppingbeans |
| repository | droppingbeans/avantis-skill |
| language | Markdown |
| license | MIT |
| topics | |
| security | L1 |
| install | openclaw add @droppingbeans/avantis-skill |
| last updated | Feb 7, 2026 |
Maintainer

name: avantis description: Execute leverage trading on Avantis (Base). Long/short crypto, forex, commodities with up to 100x leverage. Uses Python SDK with direct wallet integration. metadata: author: beanbot version: "1.0.0" requires: - Python 3.12+ - avantis-trader-sdk - Wallet: 0x79622Ea91BBbDF860e9b0497E4C297fC52c8CE64
Avantis Leverage Trading
Execute leverage trades on Avantis - Base's largest derivatives exchange for crypto, forex, commodities, and indices.
Quick Start
Check Positions
avantis_venv/bin/python skills/avantis/scripts/positions.py
Open Trade
# 5x long ETH with $10 collateral
avantis_venv/bin/python skills/avantis/scripts/trade.py long ETH 10 5
# 10x short BTC with $20 collateral
avantis_venv/bin/python skills/avantis/scripts/trade.py short BTC 20 10
Close Position
# Close specific position
avantis_venv/bin/python skills/avantis/scripts/close.py <pair_index> <trade_index>
# Or close all positions for a pair
avantis_venv/bin/python skills/avantis/scripts/close.py ETH
Wallet Configuration
Main Wallet: 0x79622Ea91BBbDF860e9b0497E4C297fC52c8CE64
- Private key:
/home/ubuntu/clawd/MAIN_WALLET.txt - USDC approved: 100 USDC
- Gas balance: 0.004500 ETH (~89 trades)
Supported Markets
Crypto (up to 50x)
- ETH/USD, BTC/USD, SOL/USD, LINK/USD
- ARB/USD, OP/USD, AVAX/USD, etc.
Forex (up to 100x)
- EUR/USD, GBP/USD, USD/JPY, AUD/USD
- USD/CAD, USD/CHF, NZD/USD
Commodities (up to 100x)
- Gold (XAU/USD), Silver (XAG/USD)
- Oil (WTI, Brent)
Indices (up to 50x)
- SPX, NDX, DJI
Features
Leverage Trading
- Long: Profit when price goes up
- Short: Profit when price goes down
- Min leverage: 2x
- Max leverage: 50x crypto, 100x forex/commodities
Risk Management
- Take Profit: Auto-close at target price (max 500% of entry)
- Stop Loss: Auto-close to limit losses
- Margin Updates: Add/remove collateral to adjust leverage
- Partial Close: Close portion of position
Fee Features
- Loss Protection: Up to 20% rebate on losses when trading against popular sentiment
- Positive Slippage: Better execution when helping balance open interest
- Dynamic Fees: 0.04-0.1% based on market conditions
Common Operations
Open a Position
# Long ETH: 5x leverage, $10 collateral
# Position size: $50 (10 × 5)
python scripts/trade.py long ETH 10 5
# With take profit and stop loss
python scripts/trade.py long ETH 10 5 --tp 3500 --sl 3000
Check Positions
python scripts/positions.py
# Output:
# 📊 Open positions: 1
# • LONG 5x | $10 collateral | ETH/USD
# • Entry: $3200 | Current: $3250
# • PnL: +$7.81 (+7.81%)
Close Position
# Full close
python scripts/close.py 0 0 # pair_index=0 (ETH), trade_index=0
# Partial close (50%)
python scripts/close.py 0 0 --amount 5
Update Stop Loss / Take Profit
python scripts/update-tpsl.py 0 0 --tp 3800 --sl 3100
Position Sizing Guide
Minimum Position Size
- ETH/USD: ~$30 minimum position
- BTC/USD: ~$50 minimum position
- Formula:
collateral × leverage ≥ minimum
Examples
- ❌ $5 × 5x = $25 position (too small for ETH)
- ✅ $10 × 5x = $50 position (works for ETH)
- ✅ $20 × 2.5x = $50 position (works for ETH)
Recommended Sizing
- Start small: $10-20 collateral for testing
- Scale up: After confirming strategy works
- Max risk: Don't exceed 5-10% of account per trade
Leverage Guidelines
Conservative (2-5x)
- Lower liquidation risk
- Smaller gains/losses
- Good for: Learning, uncertain markets
Moderate (5-10x)
- Balanced risk/reward
- Common for crypto trading
- Good for: Directional plays
Aggressive (10-50x)
- High liquidation risk
- Large potential gains/losses
- Good for: Short-term scalping, tight stops
Extreme (50-100x)
- Very high liquidation risk
- Only for forex/commodities
- Good for: Expert traders only
Fees & Costs
Trading Fees
- Opening: 0.04-0.1% of position size (dynamic)
- Closing: 0.04-0.1% of position size
- Example: $50 position × 0.08% = $0.04 fee
Execution Fee
- Cost: ~$0.10-0.30 in ETH per transaction
- Covers: Base network gas fees
- Auto-calculated: SDK handles this
Margin Fee
- Accrual: 0.02-0.05% daily on position size
- Example: $50 position × 0.03% = $0.015/day
- Deducted: When closing or updating margin
Risk Warnings
⚠️ Liquidation Risk
- Position liquidates if losses exceed collateral
- Higher leverage = faster liquidation
- Monitor positions regularly
⚠️ Market Risk
- Crypto/forex markets are volatile
- Prices can move against you quickly
- Use stop losses
⚠️ Fee Impact
- Small positions pay proportionally more fees
- Margin fees accrue daily
- Factor fees into profit calculations
Best Practices
Before Trading
- Check balance: Ensure sufficient USDC + gas
- Check market: Look at current price/volatility
- Calculate risk: Know your max loss
- Set stops: Always use stop loss for leverage
During Trade
- Monitor positions: Check regularly (especially high leverage)
- Adjust if needed: Update TP/SL based on market
- Scale out: Consider partial closes to lock profit
- Watch fees: Margin fees accrue daily
After Trade
- Review performance: What worked, what didn't
- Update strategy: Adjust sizing/leverage based on results
- Document lessons: Add to continuous-learning instincts
Common Issues
"BELOW_MIN_POS" Error
- Position size too small
- Solution: Increase collateral or leverage
"Price Feed Down" (503 Error)
- Avantis infrastructure issue
- Solution: Wait 5-10 minutes and retry
"Insufficient Balance"
- Not enough USDC or gas
- Solution: Add funds to wallet
Transaction Reverts
- Usually approval or balance issue
- Solution: Check allowance, re-approve if needed
Advanced Features
Limit Orders
# Open long at specific price
python scripts/trade.py long ETH 10 5 --limit 3000
Margin Updates
# Add $5 collateral (reduces leverage)
python scripts/update-margin.py 0 0 --deposit 5
# Remove $3 collateral (increases leverage)
python scripts/update-margin.py 0 0 --withdraw 3
Market Research
# Get current price + analysis
python scripts/market-info.py ETH
# Compare multiple assets
python scripts/market-info.py ETH BTC SOL
Integration with Other Skills
Bankr (Optional)
- Can use Bankr for market research
- Avantis for actual trade execution
- Keep separate for now (different wallets)
Continuous Learning
- Track successful strategies in
instincts/crypto/ - Note leverage levels that work
- Document entry/exit patterns
Strategic Compact
- Checkpoint after closing positions
- Review performance during checkpoints
- Adjust strategy based on results
Resources
- Platform: https://avantisfi.com
- SDK Docs: https://sdk.avantisfi.com
- Trading Guide: https://docs.avantisfi.com
- Discord: https://discord.gg/avantis
Scripts Reference
All scripts in skills/avantis/scripts/:
positions.py- View open positionstrade.py- Open new positionclose.py- Close position (full or partial)update-tpsl.py- Update take profit / stop lossupdate-margin.py- Add/remove collateralmarket-info.py- Get market databalance.py- Check wallet balances
Installation
The SDK is already installed in /home/ubuntu/clawd/avantis_venv/:
# Activate venv (if needed for manual testing)
source /home/ubuntu/clawd/avantis_venv/bin/activate
# Check installation
python -c "from avantis_trader_sdk import TraderClient; print('✓ SDK ready')"
Safety Checklist
Before every trade:
- Check wallet balance (USDC + gas)
- Verify leverage is appropriate
- Set stop loss
- Confirm position size meets minimum
- Understand max loss scenario
- Have exit plan ready
⚠️ Important: Leverage trading is high risk. Start small, use stop losses, never risk more than you can afford to lose.
Avantis Leverage Trading Skill
Execute leverage trades on Avantis - Base's largest derivatives exchange for crypto, forex, commodities, and indices.
Features
- Direct wallet integration - No API key needed
- Multiple markets - Crypto (50x), forex/commodities (100x), indices (50x)
- Long and short - Profit from price movements in either direction
- Risk management - Take profit, stop loss, margin updates
- Python SDK - Reliable, well-documented integration
Quick Start
Check Positions
avantis_venv/bin/python skills/avantis/scripts/positions.py
Open Trade
# 5x long ETH with $10 collateral
avantis_venv/bin/python skills/avantis/scripts/trade.py long ETH 10 5
# 10x short BTC with $20 collateral, TP/SL
avantis_venv/bin/python skills/avantis/scripts/trade.py short BTC 20 10 --tp 95000 --sl 102000
Close Position
# Full close
avantis_venv/bin/python skills/avantis/scripts/close.py 0 0
# Partial close
avantis_venv/bin/python skills/avantis/scripts/close.py 0 0 --amount 5
Requirements
- Python 3.12+
avantis-trader-sdk(installed in virtual env)- Wallet with USDC on Base
- Gas ETH on Base
Installation
# Create virtual environment
python3 -m venv avantis_venv
# Install SDK
avantis_venv/bin/pip install avantis-trader-sdk
# Set up wallet
echo "Private Key: 0xYOUR_KEY_HERE" > MAIN_WALLET.txt
Supported Markets
Crypto (up to 50x)
ETH, BTC, SOL, LINK, ARB, OP, AVAX, and more
Forex (up to 100x)
EUR/USD, GBP/USD, USD/JPY, AUD/USD, USD/CAD, USD/CHF, NZD/USD
Commodities (up to 100x)
Gold (XAU/USD), Silver (XAG/USD), Oil (WTI, Brent)
Indices (up to 50x)
SPX, NDX, DJI
Position Sizing
Minimum position size: ~$100
- $4 collateral × 25x leverage = $100 ✅
- $5 collateral × 20x leverage = $100 ✅
- $10 collateral × 10x leverage = $100 ✅
Fee Structure
- Opening: 0.04-0.1% of position size (dynamic)
- Closing: 0.04-0.1% of position size
- Margin: 0.02-0.05% daily
- Execution: ~$0.10-0.30 in ETH per transaction
Example: $100 position × 0.08% = $0.08 per trade
Risk Warnings
⚠️ High Risk: Leverage trading can result in rapid losses exceeding your collateral.
- Use stop losses
- Start with low leverage (2-5x)
- Never risk more than you can afford to lose
- Monitor positions regularly
Resources
- Platform: https://avantisfi.com
- SDK Docs: https://sdk.avantisfi.com
- Trading Guide: https://docs.avantisfi.com
- Discord: https://discord.gg/avantis
Testing
Tested successfully with:
- Long position: $4 @ 25x leverage ✅
- Short position: $5 @ 20x leverage ✅
- Total test cost: $0.47 in fees
License
MIT
Author
beanbot (@droppingbeans)
Permissions & Security
Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.
Requirements
- OpenClaw CLI installed and configured.
- Language: Markdown
- License: MIT
- Topics:
Configuration
**Main Wallet**: `0x79622Ea91BBbDF860e9b0497E4C297fC52c8CE64` - Private key: `/home/ubuntu/clawd/MAIN_WALLET.txt` - USDC approved: 100 USDC - Gas balance: 0.004500 ETH (~89 trades)
FAQ
How do I install avantis?
Run openclaw add @droppingbeans/avantis-skill in your terminal. This installs avantis into your OpenClaw Skills catalog.
Does this skill run locally or in the cloud?
OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.
Where can I verify the source code?
The source repository is available at https://github.com/openclaw/skills/tree/main/skills/droppingbeans/avantis-skill. Review commits and README documentation before installing.
