@elizaos/plugin-hyperliquid-app 2.0.11-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +95 -0
- package/assets/hero.png +0 -0
- package/package.json +75 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Shaw Walters and elizaOS Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# @elizaos/plugin-hyperliquid-app
|
|
2
|
+
|
|
3
|
+
Adds native [Hyperliquid](https://hyperliquid.xyz) perpetual-market integration to elizaOS agents. Eliza agents can query market listings, credential readiness, account positions, and open orders through both conversational actions and HTTP routes. Order placement is disabled by design — the plugin is read-only.
|
|
4
|
+
|
|
5
|
+
## Capabilities
|
|
6
|
+
|
|
7
|
+
- **Market discovery** — list all Hyperliquid perpetual markets with max leverage, size decimals, and active/delisted status.
|
|
8
|
+
- **Account positions** — read open perp positions for a configured EVM address (size, entry price, unrealized PnL, leverage, liquidation price).
|
|
9
|
+
- **Open orders** — read working limit orders for a configured account.
|
|
10
|
+
- **Credential status** — inspect which credential mode is active (`managed_vault`, `local_key`, or `none`) and whether account reads are available.
|
|
11
|
+
- **React UI views** — standard, XR, and terminal (TUI) views shipped in the plugin bundle and surfaced as agent app tabs.
|
|
12
|
+
|
|
13
|
+
## Actions
|
|
14
|
+
|
|
15
|
+
### `PERPETUAL_MARKET`
|
|
16
|
+
|
|
17
|
+
Conversational action that routes to the Hyperliquid provider. Recognized when the message contains Hyperliquid-related keywords (in English and several other languages) or when a `finance`, `crypto`, `trading`, or `payments` context is active.
|
|
18
|
+
|
|
19
|
+
**Parameters:**
|
|
20
|
+
|
|
21
|
+
| Parameter | Values | Description |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| `action` | `read`, `place_order` | Operation type. `place_order` returns a disabled-execution notice. |
|
|
24
|
+
| `kind` | `status`, `markets`, `market`, `positions`, `funding` | Sub-kind for `action=read`. |
|
|
25
|
+
| `coin` | e.g. `BTC`, `ETH` | Asset symbol for `kind=market`. |
|
|
26
|
+
| `target` | `hyperliquid` (default) | Provider selector; only Hyperliquid is registered today. |
|
|
27
|
+
|
|
28
|
+
**Examples:**
|
|
29
|
+
- "What is the Hyperliquid trading status?" → `action=read kind=status`
|
|
30
|
+
- "Show me Hyperliquid perp markets" → `action=read kind=markets`
|
|
31
|
+
- "What are my Hyperliquid positions?" → `action=read kind=positions`
|
|
32
|
+
- "Tell me about the BTC perp on Hyperliquid" → `action=read kind=market coin=BTC`
|
|
33
|
+
|
|
34
|
+
## API routes
|
|
35
|
+
|
|
36
|
+
All routes are mounted under `/api/hyperliquid/`. Public market reads require no credentials. Account reads require an EVM address to be configured.
|
|
37
|
+
|
|
38
|
+
| Method | Path | Description |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| GET | `/api/hyperliquid/status` | Credential and readiness status |
|
|
41
|
+
| GET | `/api/hyperliquid/markets` | All perpetual markets |
|
|
42
|
+
| GET | `/api/hyperliquid/funding` | Current funding rates and asset contexts |
|
|
43
|
+
| GET | `/api/hyperliquid/positions` | Account perp positions |
|
|
44
|
+
| GET | `/api/hyperliquid/orders` | Open orders |
|
|
45
|
+
| POST | `/api/hyperliquid/orders/open` | Disabled — returns 501 |
|
|
46
|
+
| POST | `/api/hyperliquid/orders/close` | Disabled — returns 501 |
|
|
47
|
+
| POST | `/api/hyperliquid/leverage` | Disabled — returns 501 |
|
|
48
|
+
| POST | `/api/hyperliquid/margin` | Disabled — returns 501 |
|
|
49
|
+
| POST | `/api/hyperliquid/bridge` | Disabled — returns 501 |
|
|
50
|
+
| POST | `/api/hyperliquid/tpsl` | Disabled — returns 501 |
|
|
51
|
+
|
|
52
|
+
## Configuration
|
|
53
|
+
|
|
54
|
+
No env vars are required for public market reads. To enable account-specific reads, configure one of:
|
|
55
|
+
|
|
56
|
+
| Env var | Description |
|
|
57
|
+
|---|---|
|
|
58
|
+
| `HYPERLIQUID_ACCOUNT_ADDRESS` or `HL_ACCOUNT_ADDRESS` | EVM address for positions/orders reads. Must be `0x`-prefixed 40-char hex. |
|
|
59
|
+
| `STEWARD_EVM_ADDRESS` or `ELIZA_MANAGED_EVM_ADDRESS` | Managed-vault EVM address (takes priority over the explicit env account). |
|
|
60
|
+
|
|
61
|
+
Optional signing credentials (reported in status only; this app keeps order execution disabled by design):
|
|
62
|
+
|
|
63
|
+
| Env var | Description |
|
|
64
|
+
|---|---|
|
|
65
|
+
| `EVM_PRIVATE_KEY`, `HYPERLIQUID_PRIVATE_KEY`, or `HL_PRIVATE_KEY` | Local signer private key. |
|
|
66
|
+
| `HYPERLIQUID_AGENT_KEY` or `HL_AGENT_KEY` | Hyperliquid API-wallet delegation key. |
|
|
67
|
+
|
|
68
|
+
## Enabling the plugin
|
|
69
|
+
|
|
70
|
+
Load `@elizaos/plugin-hyperliquid-app` in your agent character config:
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"plugins": ["@elizaos/plugin-hyperliquid-app"]
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Or register it programmatically:
|
|
79
|
+
|
|
80
|
+
```ts
|
|
81
|
+
import { hyperliquidPlugin } from "@elizaos/plugin-hyperliquid-app";
|
|
82
|
+
|
|
83
|
+
const runtime = new AgentRuntime({
|
|
84
|
+
plugins: [hyperliquidPlugin],
|
|
85
|
+
// ...
|
|
86
|
+
});
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
The plugin also self-registers as an elizaOS overlay app and route-plugin loader when imported, so it appears as a tab in the agent dashboard.
|
|
90
|
+
|
|
91
|
+
## Notes
|
|
92
|
+
|
|
93
|
+
- Order placement (POST routes) is intentionally disabled in this version. The `place_order` action op reports the blocked-execution reason rather than submitting any transaction.
|
|
94
|
+
- Funding-rate reads (`kind=funding`) use Hyperliquid's live `metaAndAssetCtxs` Info API response.
|
|
95
|
+
- Market data is fetched from `https://api.hyperliquid.xyz/info` (the public Hyperliquid Info API). No API key is required.
|
package/assets/hero.png
ADDED
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@elizaos/plugin-hyperliquid-app",
|
|
3
|
+
"version": "2.0.11-beta.7",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"eliza-source": {
|
|
10
|
+
"types": "./src/index.ts",
|
|
11
|
+
"import": "./src/index.ts",
|
|
12
|
+
"default": "./src/index.ts"
|
|
13
|
+
},
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./plugin": {
|
|
18
|
+
"types": "./dist/plugin.d.ts",
|
|
19
|
+
"import": "./dist/plugin.js",
|
|
20
|
+
"default": "./dist/plugin.js"
|
|
21
|
+
},
|
|
22
|
+
"./*.css": "./dist/*.css",
|
|
23
|
+
"./*": {
|
|
24
|
+
"types": "./dist/*.d.ts",
|
|
25
|
+
"eliza-source": {
|
|
26
|
+
"types": "./src/*.ts",
|
|
27
|
+
"import": "./src/*.ts",
|
|
28
|
+
"default": "./src/*.ts"
|
|
29
|
+
},
|
|
30
|
+
"import": "./dist/*.js",
|
|
31
|
+
"default": "./dist/*.js"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@elizaos/app-core": "2.0.11-beta.7",
|
|
36
|
+
"@elizaos/core": "2.0.11-beta.7",
|
|
37
|
+
"@elizaos/shared": "2.0.11-beta.7",
|
|
38
|
+
"@elizaos/ui": "2.0.11-beta.7",
|
|
39
|
+
"lucide-react": "^1.0.0",
|
|
40
|
+
"react": "^19.0.0"
|
|
41
|
+
},
|
|
42
|
+
"elizaos": {
|
|
43
|
+
"app": {
|
|
44
|
+
"heroImage": "assets/hero.png"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"publishConfig": {
|
|
48
|
+
"access": "public"
|
|
49
|
+
},
|
|
50
|
+
"types": "./dist/index.d.ts",
|
|
51
|
+
"scripts": {
|
|
52
|
+
"build": "bun run build:js && bun run build:views && bun run build:types",
|
|
53
|
+
"clean": "rm -rf dist",
|
|
54
|
+
"test": "vitest run --config vitest.config.ts",
|
|
55
|
+
"build:js": "tsup --config ../tsup.plugin-packages.shared.ts",
|
|
56
|
+
"build:views": "bunx --bun vite build --config vite.config.views.ts",
|
|
57
|
+
"build:types": "tsc --noCheck -p tsconfig.build.json"
|
|
58
|
+
},
|
|
59
|
+
"files": [
|
|
60
|
+
"assets",
|
|
61
|
+
"dist"
|
|
62
|
+
],
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@testing-library/react": "^16.3.2",
|
|
65
|
+
"@types/react": "^19.0.0",
|
|
66
|
+
"@types/react-dom": "^19.0.0",
|
|
67
|
+
"jsdom": "^29.0.0",
|
|
68
|
+
"react": "^19.0.0",
|
|
69
|
+
"react-dom": "^19.0.0",
|
|
70
|
+
"tsup": "^8.5.1",
|
|
71
|
+
"vite": "^8.0.0",
|
|
72
|
+
"vitest": "^4.1.5"
|
|
73
|
+
},
|
|
74
|
+
"gitHead": "cdbc876f793d96073d7eb0d09715a031ce0cd32e"
|
|
75
|
+
}
|