{"id":50731414,"url":"https://github.com/taprwhiz/hyperliquid-ai-agent","last_synced_at":"2026-06-10T09:01:28.519Z","repository":{"id":359307745,"uuid":"1245132749","full_name":"taprwhiz/hyperliquid-ai-agent","owner":"taprwhiz","description":"hyperliquid ai trading agent with LLM models","archived":false,"fork":false,"pushed_at":"2026-05-21T09:33:45.000Z","size":499,"stargazers_count":1,"open_issues_count":0,"forks_count":268,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-21T16:13:54.656Z","etag":null,"topics":["hyperliquid","hyperliquid-agent","hyperliquid-ai-agent","hyperliquid-perp-dex"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taprwhiz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-21T00:14:25.000Z","updated_at":"2026-05-21T09:33:51.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/taprwhiz/hyperliquid-ai-agent","commit_stats":null,"previous_names":["taprwhiz/hyperliquid-ai-agent"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/taprwhiz/hyperliquid-ai-agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taprwhiz%2Fhyperliquid-ai-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taprwhiz%2Fhyperliquid-ai-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taprwhiz%2Fhyperliquid-ai-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taprwhiz%2Fhyperliquid-ai-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taprwhiz","download_url":"https://codeload.github.com/taprwhiz/hyperliquid-ai-agent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taprwhiz%2Fhyperliquid-ai-agent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34144680,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hyperliquid","hyperliquid-agent","hyperliquid-ai-agent","hyperliquid-perp-dex"],"created_at":"2026-06-10T09:01:27.699Z","updated_at":"2026-06-10T09:01:28.511Z","avatar_url":"https://github.com/taprwhiz.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Taprwhiz: AI Trading Agent on Hyperliquid\n\u003cimg width=\"1424\" height=\"720\" alt=\"image\" src=\"https://github.com/user-attachments/assets/256241a1-a2ed-4830-96d4-6ffbbda75a77\" /\u003e\n\nThis project implements an AI-powered trading agent that leverages LLM models to analyze real-time market data from TAAPI, make informed trading decisions, and execute trades on the Hyperliquid decentralized exchange. The agent runs in a continuous loop, monitoring specified cryptocurrency assets at configurable intervals, using technical indicators to decide on buy/sell/hold actions, and manages positions with take-profit and stop-loss orders.\n\n## Table of Contents\n\n- [Disclaimer](#disclaimer)\n- [Architecture](#architecture)\n- [Taprwhiz Live Agents](#taprwhiz-live-agents)\n- [Structure](#structure)\n- [Env Configuration](#env-configuration)\n- [Usage](#usage)\n- [Tool Calling](#tool-calling)\n- [Deployment to EigenCloud](#deployment-to-eigencloud)\n\n## Disclaimer\n\nThere is no guarantee of any returns. This code has not been audited. Please use at your own risk.\n\n## Architecture\n\nSee the full [Architecture Documentation](docs/ARCHITECTURE.md) for subsystems, data flow, and design principles.\n\n## Taprwhiz Live Agents \n\n- GPT-5 Pro: [Portfolio Dashboard](https://hypurrscan.io/address/0xa049db4b3dfcb25c3092891010a629d987d26113) | [Live Logs](https://35.190.43.182/logs/0xC0BE8E55f469c1a04c0F6d04356828C5793d8a9D) (Seeded with $200)\n- DeepSeek R1: [Portfolio Dashboard](https://hypurrscan.io/address/0xa663c80d86fd7c045d9927bb6344d7a5827d31db) | [Live Logs](https://35.190.43.182/logs/0x4da68B78ef40D12f378b8498120f2F5A910Af1aD) (Seeded with $100) -- PAUSED\n- Grok 4: [Portfolio Dashboard](https://hypurrscan.io/address/0x3c71f3cf324d0133558c81d42543115ef1a2be79) | [Live Logs](https://35.190.43.182/logs/0xe6a9f97f99847215ea5813812508e9354a22A2e0) (Seeded with $100) -- PAUSED\n\n## Structure\n- `src/index.ts`: Entry point, CLI parsing, API server, and trading loop bootstrap.\n- `src/agent/decision-maker.ts`: LLM logic for trade decisions (OpenRouter with tool calling for TAAPI indicators).\n- `src/indicators/taapi-client.ts`: Fetches indicators from TAAPI.\n- `src/trading/hyperliquid-api.ts`: Executes trades on Hyperliquid.\n- `src/config/settings.ts`: Centralized config loaded from `.env`.\n\n## Env Configuration\nPopulate `.env` (use `.env.example` as reference):\n- TAAPI_API_KEY\n- HYPERLIQUID_PRIVATE_KEY (or LIGHTER_PRIVATE_KEY)\n- OPENROUTER_API_KEY\n- LLM_MODEL \n- Optional: OPENROUTER_BASE_URL (`https://openrouter.ai/api/v1`), OPENROUTER_REFERER, OPENROUTER_APP_TITLE\n\n### Obtaining API Keys\n- **TAAPI_API_KEY**: Sign up at [TAAPI.io](https://taapi.io/) and generate an API key from your dashboard.\n- **HYPERLIQUID_PRIVATE_KEY**: Generate an Ethereum-compatible private key for Hyperliquid. Use tools like MetaMask or `eth_account` library. For security, never share this key.\n- **OPENROUTER_API_KEY**: Create an account at [OpenRouter.ai](https://openrouter.ai/), then generate an API key in your account settings.\n- **LLM_MODEL**: No key needed; specify a model name like \"x-ai/grok-4\" (see OpenRouter models list).\n\n## Usage\nRun: `npm run dev -- --assets BTC ETH --interval 1h`\n\nOr after building:\n```bash\nnpm install\nnpm run build\nnpm start -- --assets BTC ETH --interval 1h\n```\n\n### Local API Endpoints\nWhen the agent runs, it also serves a minimal API:\n- `GET /diary?limit=200` — returns recent JSONL diary entries as JSON.\n- `GET /logs?path=llm_requests.log\u0026limit=2000` — tails the specified log file.\n\nConfigure bind host/port via env:\n- `API_HOST` (default `0.0.0.0`)\n- `API_PORT` or `APP_PORT` (default `3000`)\n\nDocker:\n```bash\ndocker build --platform linux/amd64 -t trading-agent .\ndocker run --rm -p 3000:3000 --env-file .env trading-agent\n# Now: curl http://localhost:3000/diary\n```\n\n## Tool Calling\nThe agent can dynamically fetch any TAAPI indicator (e.g., EMA, RSI) via tool calls. See [TAAPI Indicators](https://taapi.io/indicators/) and [EMA Example](https://taapi.io/indicators/exponential-moving-average/) for details.\n\n## Deployment to EigenCloud\n\nEigenCloud (via EigenX CLI) allows deploying this trading agent in a Trusted Execution Environment (TEE) with secure key management.\n\n### Prerequisites\n- Allowlisted Ethereum account (Sepolia for testnet). Request onboarding at [EigenCloud Onboarding](https://onboarding.eigencloud.xyz).\n- Docker installed.\n- Sepolia ETH for deployments.\n\n### Installation\n#### macOS/Linux\n```bash\ncurl -fsSL https://eigenx-scripts.s3.us-east-1.amazonaws.com/install-eigenx.sh | bash\n```\n\n#### Windows\n```bash\ncurl -fsSL https://eigenx-scripts.s3.us-east-1.amazonaws.com/install-eigenx.ps1 | powershell -\n```\n\n### Initial Setup\n```bash\ndocker login\neigenx auth login  # Or eigenx auth generate --store (if you don't have a eth account, keep this account separate from your trading account)\n```\n\n### Deploy the Agent\nFrom the project directory:\n```bash\ncp .env.example .env\n# Edit .env: set ASSETS, INTERVAL, API keys\neigenx app deploy\n```\n\n### Monitoring\n```bash\neigenx app info --watch\neigenx app logs --watch\n```\n\n### Updates\nEdit code or .env, then:\n```bash\neigenx app upgrade \u003capp-name\u003e\n```\n\nFor full CLI reference, see the [EigenX Documentation](https://github.com/Layr-Labs/eigenx-cli).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaprwhiz%2Fhyperliquid-ai-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaprwhiz%2Fhyperliquid-ai-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaprwhiz%2Fhyperliquid-ai-agent/lists"}