openbroker 1.0.65 → 1.0.66

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/SKILL.md CHANGED
@@ -4,7 +4,7 @@ description: Hyperliquid trading plugin with background position monitoring and
4
4
  license: MIT
5
5
  compatibility: Requires Node.js 22+, network access to api.hyperliquid.xyz
6
6
  homepage: https://www.npmjs.com/package/openbroker
7
- metadata: {"author": "monemetrics", "version": "1.0.65", "openclaw": {"requires": {"bins": ["openbroker"], "env": ["HYPERLIQUID_PRIVATE_KEY"]}, "primaryEnv": "HYPERLIQUID_PRIVATE_KEY", "install": [{"id": "node", "kind": "node", "package": "openbroker", "bins": ["openbroker"], "label": "Install openbroker (npm)"}]}}
7
+ metadata: {"author": "monemetrics", "version": "1.0.66", "openclaw": {"requires": {"bins": ["openbroker"], "env": ["HYPERLIQUID_PRIVATE_KEY"]}, "primaryEnv": "HYPERLIQUID_PRIVATE_KEY", "install": [{"id": "node", "kind": "node", "package": "openbroker", "bins": ["openbroker"], "label": "Install openbroker (npm)"}]}}
8
8
  allowed-tools: ob_account ob_positions ob_funding ob_markets ob_search ob_spot ob_fills ob_orders ob_order_status ob_fees ob_candles ob_funding_history ob_trades ob_rate_limit ob_funding_scan ob_buy ob_sell ob_limit ob_trigger ob_tpsl ob_cancel ob_twap ob_bracket ob_chase ob_watcher_status ob_auto_run ob_auto_stop ob_auto_list Bash(openbroker:*)
9
9
  ---
10
10
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "openbroker",
3
3
  "name": "OpenBroker — Hyperliquid Trading",
4
- "version": "1.0.65",
4
+ "version": "1.0.66",
5
5
  "description": "Trade on Hyperliquid DEX with background position monitoring",
6
6
  "configSchema": {
7
7
  "type": "object",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openbroker",
3
- "version": "1.0.65",
3
+ "version": "1.0.66",
4
4
  "description": "Hyperliquid trading CLI - execute orders, manage positions, and run trading strategies",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1221,8 +1221,28 @@ export class HyperliquidClient {
1221
1221
 
1222
1222
  async getOpenOrders(user?: string): Promise<OpenOrder[]> {
1223
1223
  this.log('Fetching openOrders for:', user ?? this.address);
1224
- const response = await this.info.openOrders({ user: user ?? this.address });
1225
- return response as OpenOrder[];
1224
+ await this.getMetaAndAssetCtxs(); // Ensure HIP-3 dex list is loaded
1225
+
1226
+ // Fetch main dex orders
1227
+ const orders = await this.info.openOrders({ user: user ?? this.address }) as OpenOrder[];
1228
+
1229
+ // Fetch HIP-3 dex orders
1230
+ const dexs = await this.getPerpDexs();
1231
+ for (let i = 1; i < dexs.length; i++) {
1232
+ const dex = dexs[i];
1233
+ if (!dex) continue;
1234
+ try {
1235
+ const dexOrders = await this.info.openOrders({ user: user ?? this.address, dex: dex.name }) as OpenOrder[];
1236
+ if (dexOrders.length > 0) {
1237
+ this.log(`Found ${dexOrders.length} open orders on HIP-3 dex ${dex.name}`);
1238
+ orders.push(...dexOrders);
1239
+ }
1240
+ } catch (err) {
1241
+ this.log(`Failed to fetch open orders for dex ${dex.name}:`, err instanceof Error ? err.message : String(err));
1242
+ }
1243
+ }
1244
+
1245
+ return orders;
1226
1246
  }
1227
1247
 
1228
1248
  // ============ Trading ============