dexbot 1.4.15 → 1.4.16

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 (57) hide show
  1. package/README.md +21 -15
  2. package/claw/data/positions.json +2035 -1
  3. package/claw/modules/chain_broadcast.ts +4 -5
  4. package/claw/modules/credit_runtime_adapter.ts +6 -7
  5. package/claw/modules/dexbot_profiles.ts +4 -1
  6. package/claw/modules/launcher_paths.ts +4 -1
  7. package/claw/package.json +1 -1
  8. package/claw/runtimes/openclaw-plugin/openclaw.plugin.json +1 -1
  9. package/claw/runtimes/openclaw-plugin/package.json +1 -1
  10. package/claw/tests/test_claw_mcp_transport.ts +2 -2
  11. package/dist/credential-daemon.js +7 -7
  12. package/dist/credential-daemon.js.map +1 -1
  13. package/dist/market_adapter/core/market_adapter_service.d.ts.map +1 -1
  14. package/dist/market_adapter/core/market_adapter_service.js +7 -1
  15. package/dist/market_adapter/core/market_adapter_service.js.map +1 -1
  16. package/dist/market_adapter/inputs/fetch_cex_synthetic_data.js +1 -2
  17. package/dist/market_adapter/inputs/fetch_cex_synthetic_data.js.map +1 -1
  18. package/dist/market_adapter/inputs/fetch_lp_data.d.ts.map +1 -1
  19. package/dist/market_adapter/inputs/fetch_lp_data.js +2 -3
  20. package/dist/market_adapter/inputs/fetch_lp_data.js.map +1 -1
  21. package/dist/market_adapter/market_adapter.d.ts.map +1 -1
  22. package/dist/market_adapter/market_adapter.js +1 -0
  23. package/dist/market_adapter/market_adapter.js.map +1 -1
  24. package/dist/market_adapter/utils/data_discovery.js +2 -2
  25. package/dist/market_adapter/utils/data_discovery.js.map +1 -1
  26. package/dist/modules/chain_keys.d.ts.map +1 -1
  27. package/dist/modules/chain_keys.js +7 -1
  28. package/dist/modules/chain_keys.js.map +1 -1
  29. package/dist/modules/credential_policy.js +1 -1
  30. package/dist/modules/credential_policy.js.map +1 -1
  31. package/dist/modules/credential_runtime.d.ts +0 -3
  32. package/dist/modules/credential_runtime.d.ts.map +1 -1
  33. package/dist/modules/credential_runtime.js +5 -27
  34. package/dist/modules/credential_runtime.js.map +1 -1
  35. package/dist/modules/key_store.js +1 -1
  36. package/dist/modules/key_store.js.map +1 -1
  37. package/dist/modules/launcher/credential_daemon.d.ts.map +1 -1
  38. package/dist/modules/launcher/credential_daemon.js +3 -3
  39. package/dist/modules/launcher/credential_daemon.js.map +1 -1
  40. package/dist/modules/launcher/monolithic_runtime.d.ts.map +1 -1
  41. package/dist/modules/launcher/monolithic_runtime.js +2 -2
  42. package/dist/modules/launcher/monolithic_runtime.js.map +1 -1
  43. package/dist/modules/order/utils/system.d.ts.map +1 -1
  44. package/dist/modules/order/utils/system.js +11 -1
  45. package/dist/modules/order/utils/system.js.map +1 -1
  46. package/dist/modules/paths.d.ts +42 -13
  47. package/dist/modules/paths.d.ts.map +1 -1
  48. package/dist/modules/paths.js +140 -30
  49. package/dist/modules/paths.js.map +1 -1
  50. package/dist/pm2.js +3 -3
  51. package/dist/pm2.js.map +1 -1
  52. package/dist/scripts/update.d.ts +14 -5
  53. package/dist/scripts/update.d.ts.map +1 -1
  54. package/dist/scripts/update.js +335 -172
  55. package/dist/scripts/update.js.map +1 -1
  56. package/package.json +3 -3
  57. package/scripts/lib/dexbot-paths.sh +71 -20
package/README.md CHANGED
@@ -31,15 +31,13 @@ DEXBot2 is the first open source trading bot with zero runtime dependencies and
31
31
 
32
32
  ```bash
33
33
  # Requires Node.js v22.12 or newer
34
- # Option A — Global install
35
34
  npm i -g dexbot
36
35
 
37
- # Option B — Clone + npm link
38
- git clone https://github.com/froooze/DEXBot2.git && cd DEXBot2 && npm install && npm link
39
-
40
36
  dexbot key # Set up master password and import keys
41
37
  dexbot bot # Create and manage bot configurations
42
38
  dexbot start # Start DEXBot2
39
+
40
+ # Developing on DEXBot2? See Install from source below — same commands, same data.
43
41
  ```
44
42
 
45
43
  Detailed setup: [Installation](#-installation).
@@ -109,16 +107,24 @@ brew install node git
109
107
  ```
110
108
  All three should display version numbers.
111
109
 
112
- ### Install
110
+ ### Install from npm
113
111
 
114
112
  ```bash
115
- # Option A — Install globally via npm
116
- npm i -g dexbot
113
+ npm i -g dexbot # stable release from the npm registry
114
+ ```
117
115
 
118
- # Option B — Clone + npm link
119
- git clone https://github.com/froooze/DEXBot2.git && cd DEXBot2 && npm install && npm link
116
+ ### Install from source (developers)
117
+
118
+ ```bash
119
+ git clone https://github.com/froooze/DEXBot2.git && cd DEXBot2
120
+ npm install
121
+ npm link # optional: exposes `dexbot` from your checkout
120
122
  ```
121
123
 
124
+ ### Where your data lives
125
+
126
+ Both installs use the same CLI and store all user state — keys, `bots.json`, logs — in `~/.config/dexbot2/profiles` (Windows: `%USERPROFILE%\.config\dexbot2\profiles`). State lives outside the repo/package tree, so it survives reinstalls and `npm update -g`. A source checkout that already contains a populated `profiles/` directory keeps using it. Override the location with `DEXBOT_PROFILE_ROOT` (see the [developer guide](docs/developer_guide.md)).
127
+
122
128
  ## 🔧 Configuration
123
129
 
124
130
  ### Create Your Bot
@@ -135,7 +141,7 @@ git clone https://github.com/froooze/DEXBot2.git && cd DEXBot2 && npm install &&
135
141
  dexbot bot
136
142
  ```
137
143
 
138
- This stores your configuration in `profiles/bots.json`. The generated
144
+ This stores your configuration in `bots.json` in the [profiles directory](#where-your-data-lives). The generated
139
145
  defaults are a good starting point — the next step walks through the few
140
146
  options worth tuning.
141
147
 
@@ -160,7 +166,7 @@ Keep the default settings first, and tune these:
160
166
  dexbot white
161
167
  ```
162
168
 
163
- This writes `profiles/market_adapter_whitelist.json`. New AMA bots get AMA
169
+ This writes `market_adapter_whitelist.json` in the profiles directory. New AMA bots get AMA
164
170
  live writes and range scaling. Use `dexbot white --dynamic-weight` for
165
171
  newly generated dynamic-weight entries; existing entries are preserved.
166
172
 
@@ -172,7 +178,7 @@ Keep the default settings first, and tune these:
172
178
 
173
179
  ### Bot Options Reference
174
180
 
175
- Configuration options from `dexbot bot`, stored in `profiles/bots.json`:
181
+ Configuration options from `dexbot bot`, stored in `bots.json` in the profiles directory:
176
182
 
177
183
  <details><summary><mark>Full parameter reference (click to expand)</mark></summary>
178
184
 
@@ -199,7 +205,7 @@ Configuration options from `dexbot bot`, stored in `profiles/bots.json`:
199
205
 
200
206
  ### General Options (Global)
201
207
 
202
- Global settings via `dexbot bot`, stored in `profiles/general.settings.json`:
208
+ Global settings via `dexbot bot`, stored in `general.settings.json` in the profiles directory:
203
209
 
204
210
  <details><summary><mark>Global settings reference (click to expand)</mark></summary>
205
211
 
@@ -213,7 +219,7 @@ Global settings via `dexbot bot`, stored in `profiles/general.settings.json`:
213
219
 
214
220
  ### Constants and Overrides
215
221
 
216
- Defaults in [`modules/constants.ts`](modules/constants.ts) are overridable at global, pair, and bot level via `profiles/general.settings.json`, `profiles/market_profiles.json`, and `profiles/market_adapter_settings.json`. See [market_adapter/README.md](market_adapter/README.md#settings-and-overrides) for examples.
222
+ Defaults in [`modules/constants.ts`](modules/constants.ts) are overridable at global, pair, and bot level via `general.settings.json`, `market_profiles.json`, and `market_adapter_settings.json` in the profiles directory. See [market_adapter/README.md](market_adapter/README.md#settings-and-overrides) for examples.
217
223
 
218
224
  ## 🎯 Zero-Dependency Process Management
219
225
 
@@ -264,7 +270,7 @@ Always use `dexbot pm2 restart` instead of raw `pm2 restart all` — the wrapper
264
270
 
265
271
  > Repo-root users can use `./pm2` instead of `dexbot pm2`.
266
272
 
267
- Logs are written to `profiles/logs/` in all modes: the monolithic runtime uses `dexbot.log` / `dexbot-error.log`, and per-bot output uses `<bot>.log` / `<bot>-error.log`.
273
+ Logs are written to `logs/` in the profiles directory in all modes: the monolithic runtime uses `dexbot.log` / `dexbot-error.log`, and per-bot output uses `<bot>.log` / `<bot>-error.log`.
268
274
 
269
275
  ## 📚 Documentation
270
276