traderclaw-v1 1.0.2 → 1.0.3
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/package.json +1 -1
- package/skills/solana-trader/SKILL.md +71 -19
package/package.json
CHANGED
|
@@ -62,6 +62,77 @@ Full processing instructions are in Step 1.5b below.
|
|
|
62
62
|
|
|
63
63
|
---
|
|
64
64
|
|
|
65
|
+
## ⚠️ MANDATORY STARTUP SEQUENCE — Run This EVERY Session
|
|
66
|
+
|
|
67
|
+
**You MUST execute these steps in order at the start of EVERY session before entering the trading loop.** Do not skip any step. Do not jump to scanning or trading until all steps complete. If any step fails, STOP and report the error — do not proceed with a broken setup.
|
|
68
|
+
|
|
69
|
+
**Exception:** If the incoming message starts with `CRON_JOB:`, skip this startup sequence entirely and go directly to the "CRON_JOB Recognition" section.
|
|
70
|
+
|
|
71
|
+
### Startup Step 1: Verify System Connectivity
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
Call solana_status()
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
This confirms the orchestrator is reachable and your session is authenticated. If this fails, STOP. Nothing else will work. Tell the user to run `traderclaw status` from their terminal to diagnose the issue.
|
|
78
|
+
|
|
79
|
+
**IF THIS FAILS → DO NOT PROCEED. Report the error and stop.**
|
|
80
|
+
|
|
81
|
+
### Startup Step 2: Gateway Registration Check
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
Call solana_gateway_credentials_get()
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
- **If credentials are returned with `active: true`** → Gateway is registered. Proceed to Step 3.
|
|
88
|
+
- **If credentials are empty or missing** → This is your first run (or credentials were deleted). You MUST register now:
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
Call solana_gateway_credentials_set({
|
|
92
|
+
gatewayBaseUrl: "<your OpenClaw Gateway's public HTTPS URL>",
|
|
93
|
+
gatewayToken: "<your Gateway bearer token>"
|
|
94
|
+
})
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
The Gateway URL and token come from the user's OpenClaw Gateway configuration. If you don't know them, ask the user. Without Gateway registration, the orchestrator cannot push high-priority signals to wake you up — you will miss critical alpha and subscription events between sessions.
|
|
98
|
+
|
|
99
|
+
After setting, verify with `solana_gateway_credentials_get()` — confirm `active: true`.
|
|
100
|
+
|
|
101
|
+
**IF THIS FAILS → DO NOT PROCEED. The agent cannot receive event-driven wake-ups without gateway credentials. Report the error.**
|
|
102
|
+
|
|
103
|
+
### Startup Step 3: Alpha Stream Subscription
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
Call solana_alpha_subscribe({ agentId: "main" })
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
This subscribes you to the SpyFly alpha signal stream via WebSocket. The `agentId: "main"` parameter enables Gateway forwarding — the orchestrator will push high-priority signals to your Gateway even when your WS session closes.
|
|
110
|
+
|
|
111
|
+
You only need to call this once per session. The subscription persists across heartbeat cycles within the same session.
|
|
112
|
+
|
|
113
|
+
**IF THIS FAILS → DO NOT PROCEED. Without an active alpha subscription, you will miss real-time signals and Gateway-forwarded events. Report the error and stop.**
|
|
114
|
+
|
|
115
|
+
### Startup Step 4: Portfolio Health Check
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
Call solana_capital_status()
|
|
119
|
+
Call solana_positions()
|
|
120
|
+
Call solana_killswitch_status()
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Know your portfolio state before making any decisions:
|
|
124
|
+
- Current capital and daily usage
|
|
125
|
+
- Open positions and unrealized PnL
|
|
126
|
+
- Kill switch status
|
|
127
|
+
|
|
128
|
+
If the kill switch is active, enter Position Defense Mode immediately (see Step 0: INTERRUPT CHECK below).
|
|
129
|
+
|
|
130
|
+
**IF THIS FAILS → DO NOT PROCEED. You cannot make safe trading decisions without knowing your portfolio state. Report the error and stop.**
|
|
131
|
+
|
|
132
|
+
**After all 4 startup steps complete → proceed to the trading loop (Step 0: INTERRUPT CHECK).**
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
65
136
|
## Mode System
|
|
66
137
|
|
|
67
138
|
You operate in exactly one mode at a time. If not explicitly set, default to `HARDENED`.
|
|
@@ -173,25 +244,6 @@ There is no context loss from this separation. Cron outputs flow into the persis
|
|
|
173
244
|
|
|
174
245
|
---
|
|
175
246
|
|
|
176
|
-
### Step 0 Pre-Requisite: GATEWAY REGISTRATION (First Run Only)
|
|
177
|
-
|
|
178
|
-
On your **very first session**, before doing anything else, register your Gateway credentials with the orchestrator so event-to-agent forwarding works:
|
|
179
|
-
|
|
180
|
-
```
|
|
181
|
-
Call solana_gateway_credentials_set({
|
|
182
|
-
gatewayBaseUrl: "<your OpenClaw Gateway's public HTTPS URL>",
|
|
183
|
-
gatewayToken: "<your Gateway bearer token>"
|
|
184
|
-
})
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
This tells the orchestrator WHERE to forward subscription events when you include `agentId` in subscribe calls. Without this, subscriptions still work but events only arrive on the WS connection (which closes when your session ends — events between sessions would be lost).
|
|
188
|
-
|
|
189
|
-
**Verify with** `solana_gateway_credentials_get` — should return your registered URL and `active: true`.
|
|
190
|
-
|
|
191
|
-
You only need to do this once. The credentials persist across sessions. If your Gateway URL or token changes, call `solana_gateway_credentials_set` again to update.
|
|
192
|
-
|
|
193
|
-
---
|
|
194
|
-
|
|
195
247
|
### Step 0: INTERRUPT CHECK (Before Every Cycle)
|
|
196
248
|
|
|
197
249
|
**How you wake up determines your path:**
|