yex-trader
Skill521 starsChanged 7 months agoMITView on GitHub
Autonomous Hyperliquid trading — 14 strategies (MM, momentum, arbitrage, LLM) with APEX multi-slot orchestrator, REFLECT performance review, DSL trailing stops, and builder fee revenue collection.
- Reads credentials
- Installs packages
In this repository6 other files it gives its agents.
- apex-strategySkill
- guard-trailing-stopSkill
- agent-onboardingSkill
- pulseSkill
- opportunity-radarSkill
- reflect-performance-reviewSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 234
Run hl reflect run after a trading session.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
YEX Trader
Autonomous Hyperliquid trading via agent-cli. 14 strategies across market making, momentum, arbitrage, and LLM-powered trading. APEX multi-slot orchestrator. REFLECT nightly performance review. Builder fee revenue collection.
Quick Start (Agent-Friendly)
cd ~/agent-cli
bash scripts/bootstrap.sh # Creates venv, installs, validates
hl wallet auto --save-env # Creates wallet, saves creds to ~/.hl-agent/env
hl setup claim-usdyp # Claim testnet USDyP
hl builder approve # Approve builder fee (one-time)
hl run avellaneda_mm --mock --max-ticks 3 # Validate
hl run engine_mm -i ETH-PERP --tick 15 --max-ticks 5 # First live tradeFor full step-by-step onboarding, see skills/onboard/SKILL.md.
Setup (Manual)
cd ~/agent-cli && pip install -e .
hl setup check # Validate environmentGetting Started — YEX Testnet
- Set your private key (or use
hl wallet auto):
export HL_PRIVATE_KEY=0x...
export HL_TESTNET=true # default- Claim testnet USDyP (required for YEX markets):
hl setup claim-usdyp- Approve builder fee (one-time):
hl builder approve- Start trading:
hl run avellaneda_mm -i VXX-USDYP --tick 15 # YEX yield market
hl run engine_mm -i ETH-PERP --tick 10 # Standard perp
hl apex run --mock --max-ticks 5 # APEX multi-slotGetting Started — Mainnet
- Set your private key and network:
export HL_PRIVATE_KEY=0x...
export HL_TESTNET=false- Approve builder fee (one-time):
hl builder approve --mainnet- Start trading:
hl run engine_mm -i ETH-PERP --tick 10 --mainnet # ETH perp
hl run avellaneda_mm -i BTC-PERP --tick 10 --mainnet # BTC perp
hl apex run --mainnet # APEX multi-slotEnvironment Variables
| Variable | Required | Description |
HL_PRIVATE_KEY | Yes* | Hyperliquid private key |
HL_KEYSTORE_PASSWORD | Alt* | Password for encrypted keystore |
HL_TESTNET | No | true (default) or false for mainnet |
BUILDER_ADDRESS | No | Override builder fee address (default: hardcoded) |
BUILDER_FEE_TENTHS_BPS | No | Override fee rate (default: 100 = 10 bps) |
ANTHROPIC_API_KEY | No | For claude_agent strategy |
GEMINI_API_KEY | No | For claude_agent with Gemini |
* Either HL_PRIVATE_KEY or a keystore with HL_KEYSTORE_PASSWORD is required.
Commands
Core Trading
# Start autonomous trading
hl run <strategy> [-i INSTRUMENT] [-t TICK] [--config FILE] [--mainnet] [--dry-run] [--mock] [--max-ticks N]
# Single manual order
hl trade <instrument> <side> <size>
# Account info
hl account [--mainnet]
# Check positions and PnL
hl status [--watch] [--interval 5]
# List all strategies
hl strategiesAPEX Multi-Slot Orchestrator
hl apex run [-t 60] [--preset conservative|default|aggressive] [--mock] [--budget 1000] [--slots 5]
hl apex once [--mock]
hl apex status
hl apex presetsREFLECT Performance Review
hl reflect run [--since 2026-03-01] [--data-dir data/cli]
hl reflect report [--date 2026-03-03]
hl reflect history [-n 10]Dynamic Stop Loss (DSL)
hl dsl start <instrument> [--entry-price 2500] [--direction long] [--preset tight|standard|wide]
hl dsl check <instrument>
hl dsl status
hl dsl presetsRadar & Movers
hl radar run [--top 10] [--min-score 7.0]
hl radar history [-n 5]
hl movers run [--top 10]Builder Fee
hl builder status
hl builder approve [--mainnet]Wallet (Encrypted Keystore)
hl wallet auto # Non-interactive wallet creation (agent-friendly)
hl wallet create # Interactive wallet creation
hl wallet import --key <hex>
hl wallet list
hl wallet export [--address 0x...]Environment Setup
hl setup check # Validate environment
hl setup bootstrap # Auto-create venv and install
hl setup claim-usdyp # Claim testnet USDyP tokensMCP Server (24 Tools)
hl mcp serve # Start MCP server (stdio transport)
hl mcp serve --transport sse # Start MCP server (SSE transport)Tools: strategies, builder_status, wallet_list, wallet_auto, setup_check, funding_hedge_info, funding_hedge_propose, funding_hedge_backtest, account, status, trade, run_strategy, radar_run, apex_status, apex_run, reflect_run, schedule_cancel, emergency_close_all, order_status, funding_rates, agent_memory, trade_journal, judge_report, obsidian_context
Strategies (14)
| Name | Type | Description |
| simple_mm | MM | Symmetric bid/ask quoting around mid |
| avellaneda_mm | MM | Inventory-aware Avellaneda-Stoikov model |
| engine_mm | MM | Production quoting engine — composite FV, dynamic spreads, multi-level ladder |
| regime_mm | MM | Vol-regime adaptive — switches behavior by volatility regime (calm/normal/volatile/extreme) |
| grid_mm | MM | Fixed-interval grid levels above and below mid |
| liquidation_mm | MM | Provides liquidity during cascade/liquidation events |
| funding_arb | Arb | Cross-venue funding rate arbitrage |
| basis_arb | Arb | Trades implied basis from funding rate (contango/backwardation) |
| mean_reversion | Signal | Trades when price deviates from SMA |
| momentum_breakout | Signal | Enters on volume + price breakout above/below N-period range |
| aggressive_taker | Taker | Directional spread crossing with bias |
| hedge_agent | Risk | Inventory exposure reducer; BTCSWP funding hedge lives under hl hedge |
| rfq_agent | RFQ | Block-size dark RFQ liquidity |
| claude_agent | LLM | Claude/Gemini-powered autonomous trading agent |
Instruments
- Standard perps: ETH-PERP, BTC-PERP, SOL-PERP, etc.
- YEX yield markets: VXX-USDYP (yex:VXX), US3M-USDYP (yex:US3M)
Workflow
- Setup:
hl setup check - Claim USDyP (testnet only):
hl setup claim-usdyp - Approve builder fee:
hl builder approve(testnet) orhl builder approve --mainnet - Mock test:
hl run avellaneda_mm --mock --max-ticks 5 - Dry run:
hl run engine_mm --dry-run --max-ticks 10 - Live testnet:
hl run engine_mm -i ETH-PERP --tick 10 - Live mainnet:
hl run engine_mm -i ETH-PERP --tick 10 --mainnet - APEX mode:
hl apex run --mainnetorhl apex run --mock --max-ticks 5 - Monitor:
hl status --watch - Review:
hl reflect run
Builder Fee Revenue
Set BUILDER_ADDRESS and BUILDER_FEE_TENTHS_BPS to collect fees on every trade. Users must approve once via hl builder approve. Fee is collected natively by Hyperliquid — no extra gas, no contract calls.
REFLECT Self-Improvement
Run hl reflect run after a trading session. REFLECT computes win rate, fee drag ratio (FDR), direction analysis, holding period buckets, monster trade dependency, and generates actionable recommendations. Reports saved to data/reflect/.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

