openbroker 1.3.1 → 1.4.0

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.
Files changed (171) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/SKILL.md +7 -4
  3. package/dist/auto/audit.d.ts +57 -0
  4. package/dist/auto/audit.d.ts.map +1 -0
  5. package/dist/auto/audit.js +407 -0
  6. package/dist/auto/cli.d.ts +2 -0
  7. package/dist/auto/cli.d.ts.map +1 -0
  8. package/dist/auto/cli.js +423 -0
  9. package/dist/auto/events.d.ts +11 -0
  10. package/dist/auto/events.d.ts.map +1 -0
  11. package/dist/auto/events.js +36 -0
  12. package/dist/auto/examples/dca.d.ts +4 -0
  13. package/dist/auto/examples/dca.d.ts.map +1 -0
  14. package/dist/auto/examples/dca.js +60 -0
  15. package/dist/auto/examples/funding-arb.d.ts +4 -0
  16. package/dist/auto/examples/funding-arb.d.ts.map +1 -0
  17. package/dist/auto/examples/funding-arb.js +81 -0
  18. package/dist/auto/examples/grid.d.ts +4 -0
  19. package/dist/auto/examples/grid.d.ts.map +1 -0
  20. package/dist/auto/examples/grid.js +114 -0
  21. package/dist/auto/examples/mm-maker.d.ts +4 -0
  22. package/dist/auto/examples/mm-maker.d.ts.map +1 -0
  23. package/dist/auto/examples/mm-maker.js +131 -0
  24. package/dist/auto/examples/mm-spread.d.ts +4 -0
  25. package/dist/auto/examples/mm-spread.d.ts.map +1 -0
  26. package/dist/auto/examples/mm-spread.js +119 -0
  27. package/dist/auto/examples/price-alert.d.ts +4 -0
  28. package/dist/auto/examples/price-alert.d.ts.map +1 -0
  29. package/dist/auto/examples/price-alert.js +85 -0
  30. package/dist/auto/keep-awake.d.ts +11 -0
  31. package/dist/auto/keep-awake.d.ts.map +1 -0
  32. package/dist/auto/keep-awake.js +70 -0
  33. package/dist/auto/loader.d.ts +22 -0
  34. package/dist/auto/loader.d.ts.map +1 -0
  35. package/dist/auto/loader.js +127 -0
  36. package/dist/auto/prune.d.ts +40 -0
  37. package/dist/auto/prune.d.ts.map +1 -0
  38. package/dist/auto/prune.js +204 -0
  39. package/dist/auto/registry.d.ts +24 -0
  40. package/dist/auto/registry.d.ts.map +1 -0
  41. package/dist/auto/registry.js +93 -0
  42. package/dist/auto/report.d.ts +3 -0
  43. package/dist/auto/report.d.ts.map +1 -0
  44. package/dist/auto/report.js +385 -0
  45. package/dist/auto/runtime.d.ts +33 -0
  46. package/dist/auto/runtime.d.ts.map +1 -0
  47. package/dist/auto/runtime.js +844 -0
  48. package/dist/auto/types.d.ts +236 -0
  49. package/dist/auto/types.d.ts.map +1 -0
  50. package/dist/auto/types.js +3 -0
  51. package/dist/core/client.d.ts +684 -0
  52. package/dist/core/client.d.ts.map +1 -0
  53. package/dist/core/client.js +2040 -0
  54. package/dist/core/config.d.ts +22 -0
  55. package/dist/core/config.d.ts.map +1 -0
  56. package/dist/core/config.js +143 -0
  57. package/dist/core/types.d.ts +221 -0
  58. package/dist/core/types.d.ts.map +1 -0
  59. package/dist/core/types.js +2 -0
  60. package/dist/core/utils.d.ts +61 -0
  61. package/dist/core/utils.d.ts.map +1 -0
  62. package/dist/core/utils.js +142 -0
  63. package/dist/core/ws.d.ts +121 -0
  64. package/dist/core/ws.d.ts.map +1 -0
  65. package/dist/core/ws.js +222 -0
  66. package/dist/info/account.d.ts +3 -0
  67. package/dist/info/account.d.ts.map +1 -0
  68. package/dist/info/account.js +198 -0
  69. package/dist/info/all-markets.d.ts +3 -0
  70. package/dist/info/all-markets.d.ts.map +1 -0
  71. package/dist/info/all-markets.js +272 -0
  72. package/dist/info/candles.d.ts +3 -0
  73. package/dist/info/candles.d.ts.map +1 -0
  74. package/dist/info/candles.js +120 -0
  75. package/dist/info/fees.d.ts +3 -0
  76. package/dist/info/fees.d.ts.map +1 -0
  77. package/dist/info/fees.js +87 -0
  78. package/dist/info/fills.d.ts +3 -0
  79. package/dist/info/fills.d.ts.map +1 -0
  80. package/dist/info/fills.js +105 -0
  81. package/dist/info/funding-history.d.ts +3 -0
  82. package/dist/info/funding-history.d.ts.map +1 -0
  83. package/dist/info/funding-history.js +98 -0
  84. package/dist/info/funding-scan.d.ts +3 -0
  85. package/dist/info/funding-scan.d.ts.map +1 -0
  86. package/dist/info/funding-scan.js +178 -0
  87. package/dist/info/funding.d.ts +3 -0
  88. package/dist/info/funding.d.ts.map +1 -0
  89. package/dist/info/funding.js +158 -0
  90. package/dist/info/markets.d.ts +3 -0
  91. package/dist/info/markets.d.ts.map +1 -0
  92. package/dist/info/markets.js +178 -0
  93. package/dist/info/order-status.d.ts +3 -0
  94. package/dist/info/order-status.d.ts.map +1 -0
  95. package/dist/info/order-status.js +85 -0
  96. package/dist/info/orders.d.ts +3 -0
  97. package/dist/info/orders.d.ts.map +1 -0
  98. package/dist/info/orders.js +162 -0
  99. package/dist/info/outcomes.d.ts +3 -0
  100. package/dist/info/outcomes.d.ts.map +1 -0
  101. package/dist/info/outcomes.js +175 -0
  102. package/dist/info/positions.d.ts +3 -0
  103. package/dist/info/positions.d.ts.map +1 -0
  104. package/dist/info/positions.js +127 -0
  105. package/dist/info/rate-limit.d.ts +3 -0
  106. package/dist/info/rate-limit.d.ts.map +1 -0
  107. package/dist/info/rate-limit.js +58 -0
  108. package/dist/info/search-markets.d.ts +3 -0
  109. package/dist/info/search-markets.d.ts.map +1 -0
  110. package/dist/info/search-markets.js +296 -0
  111. package/dist/info/spot.d.ts +3 -0
  112. package/dist/info/spot.d.ts.map +1 -0
  113. package/dist/info/spot.js +192 -0
  114. package/dist/info/trades.d.ts +3 -0
  115. package/dist/info/trades.d.ts.map +1 -0
  116. package/dist/info/trades.js +97 -0
  117. package/dist/lib.d.ts +14 -0
  118. package/dist/lib.d.ts.map +1 -0
  119. package/dist/lib.js +17 -0
  120. package/dist/operations/bracket.d.ts +28 -0
  121. package/dist/operations/bracket.d.ts.map +1 -0
  122. package/dist/operations/bracket.js +266 -0
  123. package/dist/operations/cancel.d.ts +3 -0
  124. package/dist/operations/cancel.d.ts.map +1 -0
  125. package/dist/operations/cancel.js +107 -0
  126. package/dist/operations/chase.d.ts +25 -0
  127. package/dist/operations/chase.d.ts.map +1 -0
  128. package/dist/operations/chase.js +215 -0
  129. package/dist/operations/limit-order.d.ts +3 -0
  130. package/dist/operations/limit-order.d.ts.map +1 -0
  131. package/dist/operations/limit-order.js +144 -0
  132. package/dist/operations/market-order.d.ts +3 -0
  133. package/dist/operations/market-order.d.ts.map +1 -0
  134. package/dist/operations/market-order.js +153 -0
  135. package/dist/operations/outcome-order.d.ts +3 -0
  136. package/dist/operations/outcome-order.d.ts.map +1 -0
  137. package/dist/operations/outcome-order.js +171 -0
  138. package/dist/operations/scale.d.ts +3 -0
  139. package/dist/operations/scale.d.ts.map +1 -0
  140. package/dist/operations/scale.js +212 -0
  141. package/dist/operations/set-tpsl.d.ts +3 -0
  142. package/dist/operations/set-tpsl.d.ts.map +1 -0
  143. package/dist/operations/set-tpsl.js +277 -0
  144. package/dist/operations/spot-order.d.ts +3 -0
  145. package/dist/operations/spot-order.d.ts.map +1 -0
  146. package/dist/operations/spot-order.js +173 -0
  147. package/dist/operations/trigger-order.d.ts +3 -0
  148. package/dist/operations/trigger-order.d.ts.map +1 -0
  149. package/dist/operations/trigger-order.js +177 -0
  150. package/dist/operations/twap-cancel.d.ts +3 -0
  151. package/dist/operations/twap-cancel.d.ts.map +1 -0
  152. package/dist/operations/twap-cancel.js +57 -0
  153. package/dist/operations/twap-status.d.ts +3 -0
  154. package/dist/operations/twap-status.d.ts.map +1 -0
  155. package/dist/operations/twap-status.js +81 -0
  156. package/dist/operations/twap.d.ts +3 -0
  157. package/dist/operations/twap.d.ts.map +1 -0
  158. package/dist/operations/twap.js +124 -0
  159. package/dist/setup/approve-builder.d.ts +3 -0
  160. package/dist/setup/approve-builder.d.ts.map +1 -0
  161. package/dist/setup/approve-builder.js +155 -0
  162. package/dist/setup/env.d.ts +4 -0
  163. package/dist/setup/env.d.ts.map +1 -0
  164. package/dist/setup/env.js +8 -0
  165. package/dist/setup/onboard.d.ts +10 -0
  166. package/dist/setup/onboard.d.ts.map +1 -0
  167. package/dist/setup/onboard.js +462 -0
  168. package/package.json +10 -4
  169. package/scripts/core/client.ts +13 -3
  170. package/scripts/info/all-markets.ts +18 -2
  171. package/scripts/info/search-markets.ts +18 -2
@@ -0,0 +1,236 @@
1
+ import type { HyperliquidClient } from '../core/client.js';
2
+ /** What an automation .ts file exports */
3
+ export type AutomationFactory = (api: AutomationAPI) => void | Promise<void>;
4
+ /** Config field descriptor for example automations */
5
+ export interface AutomationConfigField {
6
+ type: 'string' | 'number' | 'boolean';
7
+ description: string;
8
+ default: unknown;
9
+ required?: boolean;
10
+ }
11
+ /** Config metadata exported by example automations as `export const config` */
12
+ export interface AutomationConfig {
13
+ description: string;
14
+ fields: Record<string, AutomationConfigField>;
15
+ }
16
+ export type AutomationEventType = 'tick' | 'price_change' | 'funding_update' | 'position_opened' | 'position_closed' | 'position_changed' | 'pnl_threshold' | 'margin_warning' | 'order_filled' | 'order_update' | 'liquidation';
17
+ export interface AutomationEventPayloads {
18
+ tick: {
19
+ timestamp: number;
20
+ pollCount: number;
21
+ };
22
+ price_change: {
23
+ coin: string;
24
+ oldPrice: number;
25
+ newPrice: number;
26
+ changePct: number;
27
+ };
28
+ funding_update: {
29
+ coin: string;
30
+ fundingRate: number;
31
+ annualized: number;
32
+ premium: number;
33
+ };
34
+ position_opened: {
35
+ coin: string;
36
+ side: 'long' | 'short';
37
+ size: number;
38
+ entryPrice: number;
39
+ };
40
+ position_closed: {
41
+ coin: string;
42
+ previousSize: number;
43
+ entryPrice: number;
44
+ };
45
+ position_changed: {
46
+ coin: string;
47
+ oldSize: number;
48
+ newSize: number;
49
+ entryPrice: number;
50
+ };
51
+ pnl_threshold: {
52
+ coin: string;
53
+ unrealizedPnl: number;
54
+ changePct: number;
55
+ positionValue: number;
56
+ };
57
+ margin_warning: {
58
+ marginUsedPct: number;
59
+ equity: number;
60
+ marginUsed: number;
61
+ };
62
+ /**
63
+ * Fires on every trade fill — partial and terminal — sourced from the
64
+ * Hyperliquid `userFills` WS stream. `size` is the fill delta (NOT remaining
65
+ * size of the order). `fee` and `closedPnl` are in USD (converted from the
66
+ * raw fee denomination using `price` when `feeToken !== "USDC"`, which
67
+ * happens on spot buys where the fee is charged in the received asset).
68
+ * `feeToken` is the original denomination so consumers can identify legs
69
+ * that won't carry a builder fee (Hyperliquid only charges builder fees on
70
+ * USDC-denominated trades). `crossed` is true when this side was the taker.
71
+ * Fee/pnl/crossed/feeToken are optional so older consumers that only read
72
+ * coin/oid/side/size/price keep working.
73
+ */
74
+ order_filled: {
75
+ coin: string;
76
+ oid: number;
77
+ side: 'buy' | 'sell';
78
+ size: number;
79
+ price: number;
80
+ fee?: number;
81
+ feeToken?: string;
82
+ closedPnl?: number;
83
+ crossed?: boolean;
84
+ };
85
+ /** Real-time order lifecycle event via WebSocket (filled, canceled, rejected, triggered, etc.) */
86
+ order_update: {
87
+ coin: string;
88
+ oid: number;
89
+ side: 'buy' | 'sell';
90
+ size: number;
91
+ price: number;
92
+ origSize: number;
93
+ status: string;
94
+ statusTimestamp: number;
95
+ };
96
+ /** Liquidation event via WebSocket — only source for liquidation alerts */
97
+ liquidation: {
98
+ lid: number;
99
+ liquidator: string;
100
+ liquidatedUser: string;
101
+ liquidatedNtlPos: number;
102
+ liquidatedAccountValue: number;
103
+ };
104
+ }
105
+ export type AutomationEventHandler<E extends AutomationEventType> = (payload: AutomationEventPayloads[E]) => void | Promise<void>;
106
+ export interface AutomationState {
107
+ get<T = unknown>(key: string, defaultValue?: T): T | undefined;
108
+ set<T = unknown>(key: string, value: T): void;
109
+ delete(key: string): void;
110
+ clear(): void;
111
+ }
112
+ export interface AutomationLogger {
113
+ info(message: string): void;
114
+ warn(message: string): void;
115
+ error(message: string): void;
116
+ debug(message: string): void;
117
+ }
118
+ export interface AutomationAudit {
119
+ /** Record a custom audit note for later reporting. */
120
+ record(kind: string, payload?: unknown): void;
121
+ /** Record a numeric metric with optional dimensions/tags. */
122
+ metric(name: string, value: number, tags?: Record<string, unknown>): void;
123
+ }
124
+ /**
125
+ * Hook for external monitoring packages (e.g. `openbroker-monitoring`) to
126
+ * receive audit events. The runtime fans out every note, metric, and
127
+ * audited write-method call to every observer it has loaded.
128
+ *
129
+ * Observers are auto-loaded via convention dynamic-import — the runtime
130
+ * tries `await import('openbroker-monitoring')` at startup and uses the
131
+ * default export (a factory returning an observer or null).
132
+ */
133
+ export interface AutomationAuditObserver {
134
+ onNote?(kind: string, payload?: unknown): void;
135
+ onMetric?(name: string, value: number, tags?: Record<string, unknown>): void;
136
+ onAgentAction?(action: string, status: 'success' | 'error', details: Record<string, unknown>, txHash?: string): void;
137
+ }
138
+ export interface PublishOptions {
139
+ /** Human-readable name for the hook (appears in logs). Default: "ob-auto-<id>" */
140
+ name?: string;
141
+ /** Wake mode: "now" triggers immediate agent turn, "next-heartbeat" queues. Default: "now" */
142
+ wakeMode?: 'now' | 'next-heartbeat';
143
+ /** Whether to deliver the agent response to messaging channels. Default: true */
144
+ deliver?: boolean;
145
+ /** Target channel (e.g. "slack", "telegram", "last"). Default: agent decides */
146
+ channel?: string;
147
+ }
148
+ export interface AutomationAPI {
149
+ /** Full Hyperliquid client (42+ methods) */
150
+ client: HyperliquidClient;
151
+ /** Convenience utilities from core */
152
+ utils: {
153
+ roundPrice: (price: number, szDecimals: number, isSpot?: boolean) => string;
154
+ roundSize: (size: number, szDecimals: number) => string;
155
+ sleep: (ms: number) => Promise<void>;
156
+ normalizeCoin: (coin: string) => string;
157
+ formatUsd: (amount: number | string) => string;
158
+ formatPercent: (value: number | string, decimals?: number) => string;
159
+ annualizeFundingRate: (hourlyRate: number | string) => number;
160
+ };
161
+ /** Subscribe to a market/account event */
162
+ on<E extends AutomationEventType>(event: E, handler: AutomationEventHandler<E>): void;
163
+ /** Run a handler on a recurring interval (ms). Aligned to the poll loop. */
164
+ every(intervalMs: number, handler: () => void | Promise<void>): void;
165
+ /** Called after all handlers are registered and polling begins */
166
+ onStart(handler: () => void | Promise<void>): void;
167
+ /** Called when automation is stopping (SIGINT, manual stop). Use for cleanup. */
168
+ onStop(handler: () => void | Promise<void>): void;
169
+ /** Called when a handler throws. The error is already logged — use this for recovery logic. */
170
+ onError(handler: (error: Error) => void | Promise<void>): void;
171
+ /**
172
+ * Publish a message to the OpenClaw agent via webhook.
173
+ * Sends to POST /hooks/agent on the local gateway, triggering an agent turn.
174
+ * The agent receives the message and can act on it (notify user, trade, etc.).
175
+ *
176
+ * @param message — The message string the agent will receive
177
+ * @param options — Optional: name, wakeMode, deliver, channel
178
+ * @returns true if delivered, false if webhook is not configured
179
+ */
180
+ publish(message: string, options?: PublishOptions): Promise<boolean>;
181
+ /** Persisted key-value state (~/.openbroker/state/<id>.json) */
182
+ state: AutomationState;
183
+ /** Structured logger */
184
+ log: AutomationLogger;
185
+ /** Local audit trail persisted to ~/.openbroker/automation-audit.sqlite */
186
+ audit: AutomationAudit;
187
+ /** Unique automation ID (derived from filename or --id flag) */
188
+ id: string;
189
+ /** True if running in --dry mode (write methods are intercepted) */
190
+ dryRun: boolean;
191
+ }
192
+ export interface AutomationSnapshot {
193
+ prices: Map<string, number>;
194
+ positions: Map<string, PositionSnapshot>;
195
+ openOrderIds: Set<number>;
196
+ equity: number;
197
+ marginUsed: number;
198
+ marginUsedPct: number;
199
+ fundingRates: Map<string, {
200
+ rate: number;
201
+ premium: number;
202
+ }>;
203
+ timestamp: number;
204
+ }
205
+ export interface PositionSnapshot {
206
+ coin: string;
207
+ size: number;
208
+ entryPrice: number;
209
+ positionValue: number;
210
+ unrealizedPnl: number;
211
+ liquidationPx: number | null;
212
+ leverage: number;
213
+ marginUsed: number;
214
+ }
215
+ export interface ScheduledTask {
216
+ intervalMs: number;
217
+ handler: () => void | Promise<void>;
218
+ lastRun: number;
219
+ }
220
+ export interface RunningAutomation {
221
+ id: string;
222
+ scriptPath: string;
223
+ startedAt: Date;
224
+ pollCount: number;
225
+ eventsEmitted: number;
226
+ dryRun: boolean;
227
+ /**
228
+ * Stop the automation.
229
+ * @param opts.persist If false, keep the entry in the file registry so it
230
+ * restarts when the gateway comes back up. Default: true (fully remove).
231
+ */
232
+ stop: (opts?: {
233
+ persist?: boolean;
234
+ }) => Promise<void>;
235
+ }
236
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../scripts/auto/types.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAI3D,0CAA0C;AAC1C,MAAM,MAAM,iBAAiB,GAAG,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAE7E,sDAAsD;AACtD,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,+EAA+E;AAC/E,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;CAC/C;AAID,MAAM,MAAM,mBAAmB,GAC3B,MAAM,GACN,cAAc,GACd,gBAAgB,GAChB,iBAAiB,GACjB,iBAAiB,GACjB,kBAAkB,GAClB,eAAe,GACf,gBAAgB,GAChB,cAAc,GACd,cAAc,GACd,aAAa,CAAC;AAElB,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/C,YAAY,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA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AAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACvD"}
@@ -0,0 +1,3 @@
1
+ // Trading Automation Harness — Type definitions
2
+ // The API contract that automation scripts code against
3
+ export {};