solana-traderclaw 1.0.19

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.
@@ -0,0 +1,6 @@
1
+ import {
2
+ AlphaBuffer
3
+ } from "../chunk-3UQIQJPQ.js";
4
+ export {
5
+ AlphaBuffer
6
+ };
@@ -0,0 +1,6 @@
1
+ import {
2
+ AlphaStreamManager
3
+ } from "../chunk-3YPZOXWE.js";
4
+ export {
5
+ AlphaStreamManager
6
+ };
@@ -0,0 +1,6 @@
1
+ import {
2
+ orchestratorRequest
3
+ } from "../chunk-T4YWGIIR.js";
4
+ export {
5
+ orchestratorRequest
6
+ };
@@ -0,0 +1,6 @@
1
+ import {
2
+ SessionManager
3
+ } from "../chunk-RQZVD6TH.js";
4
+ export {
5
+ SessionManager
6
+ };
@@ -0,0 +1,104 @@
1
+ {
2
+ "id": "solana-trader",
3
+ "name": "Solana Trader",
4
+ "description": "Autonomous Solana memecoin trading agent plugin — connects OpenClaw to a trading orchestrator for scanning, analysis, risk management, and execution.",
5
+ "skills": ["skills/solana-trader"],
6
+ "configSchema": {
7
+ "type": "object",
8
+ "additionalProperties": false,
9
+ "required": ["orchestratorUrl"],
10
+ "properties": {
11
+ "orchestratorUrl": {
12
+ "type": "string",
13
+ "description": "Base URL of the trading orchestrator API"
14
+ },
15
+ "walletId": {
16
+ "type": "string",
17
+ "description": "Wallet ID for this agent's trading account (UUID string from the orchestrator API)"
18
+ },
19
+ "apiKey": {
20
+ "type": "string",
21
+ "description": "API key from traderclaw signup / setup or https://traderclaw.ai/register — set on this machine via CLI, not by the agent"
22
+ },
23
+ "externalUserId": {
24
+ "type": "string",
25
+ "description": "Optional external user ID for CLI signup (traderclaw signup); auto-generated if omitted"
26
+ },
27
+ "refreshToken": {
28
+ "type": "string",
29
+ "description": "Refresh token from last session (auto-populated after authentication)"
30
+ },
31
+ "walletPublicKey": {
32
+ "type": "string",
33
+ "description": "Solana wallet public key (auto-populated after session establishment)"
34
+ },
35
+ "apiTimeout": {
36
+ "type": "integer",
37
+ "minimum": 1000,
38
+ "maximum": 120000,
39
+ "default": 80000,
40
+ "description": "HTTP request timeout in milliseconds"
41
+ },
42
+ "agentId": {
43
+ "type": "string",
44
+ "description": "Agent ID for event-to-agent forwarding (e.g., 'main'). When set, subscriptions automatically include this agentId so the orchestrator forwards stream events to your Gateway via /v1/responses."
45
+ },
46
+ "gatewayBaseUrl": {
47
+ "type": "string",
48
+ "description": "Public HTTPS URL of your OpenClaw Gateway used by orchestrator event forwarding."
49
+ },
50
+ "gatewayToken": {
51
+ "type": "string",
52
+ "description": "Bearer token used by orchestrator when calling your Gateway /v1/responses."
53
+ }
54
+ }
55
+ },
56
+ "uiHints": {
57
+ "orchestratorUrl": {
58
+ "label": "Orchestrator URL",
59
+ "placeholder": "https://api.traderclaw.ai"
60
+ },
61
+ "walletId": {
62
+ "label": "Wallet ID",
63
+ "placeholder": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
64
+ },
65
+ "apiKey": {
66
+ "label": "API Key",
67
+ "placeholder": "oc_xxx",
68
+ "sensitive": true
69
+ },
70
+ "externalUserId": {
71
+ "label": "External User ID",
72
+ "placeholder": "agent_user_123",
73
+ "advanced": true
74
+ },
75
+ "refreshToken": {
76
+ "label": "Refresh Token",
77
+ "sensitive": true,
78
+ "advanced": true
79
+ },
80
+ "walletPublicKey": {
81
+ "label": "Wallet Public Key",
82
+ "advanced": true
83
+ },
84
+ "apiTimeout": {
85
+ "label": "API Timeout (ms)",
86
+ "advanced": true
87
+ },
88
+ "agentId": {
89
+ "label": "Agent ID",
90
+ "placeholder": "main",
91
+ "advanced": true
92
+ },
93
+ "gatewayBaseUrl": {
94
+ "label": "Gateway Base URL",
95
+ "placeholder": "https://gateway.example.com",
96
+ "advanced": true
97
+ },
98
+ "gatewayToken": {
99
+ "label": "Gateway Token",
100
+ "sensitive": true,
101
+ "advanced": true
102
+ }
103
+ }
104
+ }
package/package.json ADDED
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "solana-traderclaw",
3
+ "version": "1.0.19",
4
+ "description": "TraderClaw V1 — autonomous Solana memecoin trading agent plugin for OpenClaw",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "exports": {
8
+ ".": "./dist/index.js"
9
+ },
10
+ "bin": {
11
+ "traderclaw": "bin/traderclaw.cjs"
12
+ },
13
+ "files": [
14
+ "dist/",
15
+ "bin/*.mjs",
16
+ "bin/*.cjs",
17
+ "skills/",
18
+ "config/",
19
+ "openclaw.plugin.json",
20
+ "README.md"
21
+ ],
22
+ "scripts": {
23
+ "build": "node build.mjs",
24
+ "prepublishOnly": "npm run build"
25
+ },
26
+ "keywords": [
27
+ "traderclaw",
28
+ "openclaw",
29
+ "solana",
30
+ "memecoin",
31
+ "trading",
32
+ "agent",
33
+ "plugin"
34
+ ],
35
+ "license": "MIT",
36
+ "engines": {
37
+ "node": ">=22"
38
+ },
39
+ "dependencies": {
40
+ "@sinclair/typebox": "0.34.48",
41
+ "ws": "^8.18.0"
42
+ },
43
+ "devDependencies": {
44
+ "@types/ws": "^8.5.0",
45
+ "esbuild": "^0.24.0"
46
+ },
47
+ "peerDependencies": {
48
+ "openclaw": "*"
49
+ },
50
+ "peerDependenciesMeta": {
51
+ "openclaw": {
52
+ "optional": true
53
+ }
54
+ },
55
+ "openclaw": {
56
+ "extensions": [
57
+ "./dist/index.js"
58
+ ]
59
+ }
60
+ }
@@ -0,0 +1,51 @@
1
+ # Trading Heartbeat
2
+
3
+ **Installer:** `traderclaw install --wizard` and `traderclaw setup` copy this file into your OpenClaw **agent workspace root** (default `~/.openclaw/workspace/HEARTBEAT.md`). OpenClaw only loads `HEARTBEAT.md` from that directory (next to `AGENTS.md`), not from a nested `.openclaw` folder or from the plugin package alone. If you already have a non-empty `HEARTBEAT.md` there, the installer leaves it unchanged.
4
+
5
+ Execute your full trading cycle from your solana-trader skill on every heartbeat. Never skip. Never reply HEARTBEAT_OK.
6
+
7
+ ## First: Check Startup State
8
+
9
+ Read MEMORY.md (auto-loaded). If it is empty or missing your wallet/tier/strategy info, you have NOT completed the Mandatory Startup Sequence yet. Run it now before doing anything else (see SKILL.md § Mandatory Startup Sequence).
10
+
11
+ If startup is already complete (MEMORY.md has your wallet, tier, mode, strategy version), proceed to the trading cycle below.
12
+
13
+ ## Memory Context Load (every cycle, before trading)
14
+
15
+ 1. **Layer 1 — MEMORY.md** (already in context): Read your durable state — tier, wallet, mode, strategy version, watchlist, regime canary, permanent learnings.
16
+ 2. **Layer 2 — Daily log**: Check today's `memory/YYYY-MM-DD.md` (auto-loaded) to know what scans, trades, and analysis already happened today. Do not repeat work already done this cycle.
17
+ 3. **Layer 3 — Server-side memory**: Call `solana_memory_search` for:
18
+ - `"source_reputation"` — know which alpha sources to trust before processing signals
19
+ - `"strategy_drift_warning"` — any recent drift alerts to be aware of
20
+ - `"pre_trade_rationale"` — your last few trade decisions for strategy integrity check
21
+ - `"meta_rotation"` — current hot vs cooling narratives
22
+
23
+ ## Trading Cycle
24
+
25
+ Run the full fast loop from your skill:
26
+ - Step 0: Interrupt check — positions, kill switch, capital, strategy integrity, dead money
27
+ - Step 1: Scan for opportunities
28
+ - Step 1.5: Poll alpha signals buffer, check subscriptions for new events
29
+ - Step 2: Analyze candidates (token snapshot, holders, flows, liquidity, risk, social/community enrichment if X credentials configured)
30
+ - Step 3: Risk assessment and scoring
31
+ - Step 4: Decision — apply strategy weights, check memory for past outcomes on this token
32
+ - Step 5: Execute trade (pre-trade journal FIRST, then execute)
33
+ - Step 6: Monitor open positions for SL/TP triggers, social exhaustion check on held positions (if X configured)
34
+ - Step 7: Exit management — execute exits, post-trade review
35
+
36
+ ## Memory Write-Back (after trading)
37
+
38
+ 1. **Layer 1**: `solana_state_save` if any durable state changed (strategy weights, watchlist, regime, counters)
39
+ 2. **Layer 2**: `solana_daily_log` with session summary (what you scanned, signals processed, trades made, positions monitored)
40
+ 3. **Layer 3**: `solana_memory_write` for any new lessons, reputation observations, pre-trade rationale, or trade reviews
41
+
42
+ ## Report to User
43
+
44
+ After every cycle, send a brief summary to the user:
45
+ - What you scanned and how many candidates were found
46
+ - Any alpha signals processed and their scores
47
+ - Trades executed (entries/exits) with token, size, and rationale
48
+ - Open position status (PnL, any SL/TP approaching)
49
+ - If nothing qualified for a trade, say what you checked and why nothing passed
50
+
51
+ Never run a silent cycle. Always communicate what you did.