openbroker 1.0.48 → 1.0.49

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/CHANGELOG.md CHANGED
@@ -2,11 +2,16 @@
2
2
 
3
3
  All notable changes to Open Broker will be documented in this file.
4
4
 
5
+ ## [1.0.49] - 2026-03-09
6
+
7
+ ### Fixed
8
+ - **HIP-3 Asset ID Offset**: Fixed asset ID formula from `dexIdx * 10000 + assetIdx` to `100000 + dexIdx * 10000 + assetIdx`. Orders were routing to spot asset IDs instead of HIP-3 perps, causing "Order price cannot be more than 95% away from the reference price" errors.
9
+
5
10
  ## [1.0.48] - 2026-03-09
6
11
 
7
12
  ### Fixed
8
13
  - **HIP-3 Perp Trading**: All trading commands now work with HIP-3 assets using `dex:COIN` syntax (e.g., `--coin xyz:CL`)
9
- - `getMetaAndAssetCtxs()` loads HIP-3 dex assets into asset/szDecimals maps (asset index = `10000 * dexIdx + assetIdx`)
14
+ - `getMetaAndAssetCtxs()` loads HIP-3 dex assets into asset/szDecimals maps (asset index = `100000 + dexIdx * 10000 + assetIdx`)
10
15
  - `getAllMids()` fetches and merges mid prices from all HIP-3 dexes
11
16
  - Market, limit, trigger, bracket, TWAP, scale, chase orders all work with HIP-3 assets
12
17
  - **HIP-3 Info Commands**: `funding`, `funding-history`, `candles`, `trades` now return data for HIP-3 assets (previously returned "No data" / null)
package/SKILL.md CHANGED
@@ -4,7 +4,7 @@ description: Hyperliquid trading plugin with background position monitoring. Exe
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.48", "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.49", "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 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.48",
4
+ "version": "1.0.49",
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.48",
3
+ "version": "1.0.49",
4
4
  "description": "Hyperliquid trading CLI - execute orders, manage positions, and run trading strategies",
5
5
  "type": "module",
6
6
  "bin": {
@@ -130,7 +130,7 @@ export class HyperliquidClient {
130
130
 
131
131
  /**
132
132
  * Load HIP-3 perp dex assets into the asset/szDecimals maps.
133
- * Asset index formula: 10000 * dexIdx + assetIdx
133
+ * Asset index formula: 100000 + dexIdx * 10000 + assetIdx
134
134
  * Coins are keyed as "dexName:COIN" (e.g., "xyz:CL")
135
135
  */
136
136
  private async loadHip3Assets(): Promise<void> {
@@ -161,7 +161,7 @@ export class HyperliquidClient {
161
161
  const coinName = asset.name;
162
162
  // Extract local name by stripping dex prefix if present
163
163
  const localName = coinName.startsWith(dex.name + ':') ? coinName.slice(dex.name.length + 1) : coinName;
164
- const globalIndex = 10000 * dexIdx + assetIdx;
164
+ const globalIndex = 100000 + dexIdx * 10000 + assetIdx;
165
165
 
166
166
  this.assetMap.set(coinName, globalIndex);
167
167
  this.szDecimalsMap.set(coinName, asset.szDecimals);