@ai.weget.jp/bot 0.1.8 → 0.1.9
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/README.md +13 -4
- package/dist/src/config/systemConfig.js +1 -0
- package/dist/src/ipc/registerHandlers.js +1 -1
- package/dist/src/main.js +1 -1
- package/dist/src/preload.cjs +26 -8
- package/dist/src/renderer/app.js +1 -1
- package/dist/src/renderer/index.html +317 -13
- package/dist/src/renderer/styles.css +451 -2
- package/dist/src/services/aiChatService.js +1 -0
- package/dist/src/services/authApiService.js +1 -1
- package/dist/src/services/trade/gmoCoinGateway.js +1 -0
- package/dist/src/services/trade/gmoKlineService.js +1 -0
- package/dist/src/services/trade/gmoWindowService.js +1 -0
- package/dist/src/services/trade/tradeConfigService.js +1 -0
- package/dist/src/services/trade/tradeStatusService.js +1 -0
- package/dist/src/services/trade/types.js +1 -0
- package/dist/src/services/windowManagerService.js +1 -1
- package/dist/src/wsClient.js +1 -1
- package/package.json +1 -7
- package/dist/src/renderer/chat.css +0 -128
- package/dist/src/renderer/chat.html +0 -27
- package/dist/src/renderer/chat.js +0 -1
- package/dist/src/services/aiMemoryService.js +0 -1
- package/dist/src/services/commandOrchestratorService.js +0 -1
- package/dist/src/services/debugLogService.js +0 -1
- package/dist/src/services/taskExecutorService.js +0 -1
- package/dist/src/services/taskParsingService.js +0 -1
- package/dist/src/services/textService.js +0 -1
- package/dist/src/services/workflowService.js +0 -1
- package/scripts/backtest-loop.cjs +0 -137
- package/scripts/prepare-playwright-browsers.cjs +0 -181
- package/scripts/run-workflow.cjs +0 -381
- package/scripts/workflows/kaitori-login.json +0 -17
|
@@ -13,10 +13,11 @@
|
|
|
13
13
|
<img src="./logo.png" alt="weget logo" class="brand-logo" />
|
|
14
14
|
<div class="brand-copy">
|
|
15
15
|
<h1>WeBot</h1>
|
|
16
|
-
<span>weget
|
|
16
|
+
<span>weget trade bot</span>
|
|
17
17
|
</div>
|
|
18
18
|
</div>
|
|
19
19
|
<h1>Bot Login</h1>
|
|
20
|
+
<div id="login-notice" class="user-notice hidden"></div>
|
|
20
21
|
<form id="login-form">
|
|
21
22
|
<label>
|
|
22
23
|
<span>Bot ID</span>
|
|
@@ -42,10 +43,11 @@
|
|
|
42
43
|
</main>
|
|
43
44
|
|
|
44
45
|
<main id="app-shell" class="app-shell hidden">
|
|
46
|
+
<div id="user-notice" class="user-notice hidden"></div>
|
|
45
47
|
<header class="app-header">
|
|
46
48
|
<div class="brand-row compact">
|
|
47
49
|
<img src="./logo.png" alt="weget logo" class="brand-logo" />
|
|
48
|
-
<h1>
|
|
50
|
+
<h1>Trade Console</h1>
|
|
49
51
|
</div>
|
|
50
52
|
<div class="status-wrap">
|
|
51
53
|
<span class="label">Status</span>
|
|
@@ -54,13 +56,271 @@
|
|
|
54
56
|
</header>
|
|
55
57
|
|
|
56
58
|
<nav class="tabs">
|
|
57
|
-
<button type="button" class="tab-btn is-active" data-tab="
|
|
58
|
-
<button type="button" class="tab-btn" data-tab="
|
|
59
|
-
<button type="button" class="tab-btn" data-tab="
|
|
59
|
+
<button type="button" class="tab-btn is-active" data-tab="coin">Coin</button>
|
|
60
|
+
<button type="button" class="tab-btn" data-tab="fx">FX</button>
|
|
61
|
+
<button type="button" class="tab-btn" data-tab="ai">AI</button>
|
|
62
|
+
<button type="button" class="tab-btn" data-tab="config">Config</button>
|
|
60
63
|
</nav>
|
|
61
64
|
|
|
62
|
-
<section id="tab-
|
|
65
|
+
<section id="tab-coin" class="tab-panel is-active">
|
|
66
|
+
<section class="panel market-shell coin-theme">
|
|
67
|
+
<div class="market-layout">
|
|
68
|
+
<div class="market-main">
|
|
69
|
+
<section class="panel market-table-panel">
|
|
70
|
+
<div class="market-panel-header">
|
|
71
|
+
<h2>Coin Market</h2>
|
|
72
|
+
</div>
|
|
73
|
+
<div class="row config-actions market-pair-row">
|
|
74
|
+
<img id="coin-market-icon" class="market-icon" alt="coin pair icon" />
|
|
75
|
+
<select id="coin-symbol-select">
|
|
76
|
+
<option value="BTC_JPY" selected>BTC/JPY</option>
|
|
77
|
+
<option value="ETH_JPY">ETH/JPY</option>
|
|
78
|
+
<option value="BCH_JPY">BCH/JPY</option>
|
|
79
|
+
<option value="LTC_JPY">LTC/JPY</option>
|
|
80
|
+
<option value="XRP_JPY">XRP/JPY</option>
|
|
81
|
+
<option value="DOT_JPY">DOT/JPY</option>
|
|
82
|
+
<option value="ATOM_JPY">ATOM/JPY</option>
|
|
83
|
+
<option value="ADA_JPY">ADA/JPY</option>
|
|
84
|
+
<option value="LINK_JPY">LINK/JPY</option>
|
|
85
|
+
<option value="DOGE_JPY">DOGE/JPY</option>
|
|
86
|
+
<option value="SOL_JPY">SOL/JPY</option>
|
|
87
|
+
<option value="SUI_JPY">SUI/JPY</option>
|
|
88
|
+
</select>
|
|
89
|
+
</div>
|
|
90
|
+
</section>
|
|
91
|
+
<section class="panel market-chart-panel">
|
|
92
|
+
<div id="coin-kline-intervals" class="kline-toolbar">
|
|
93
|
+
<button type="button" class="interval-btn" data-interval="5m">5分</button>
|
|
94
|
+
<button type="button" class="interval-btn is-active" data-interval="15m">15分</button>
|
|
95
|
+
<button type="button" class="interval-btn" data-interval="30m">30分</button>
|
|
96
|
+
<button type="button" class="interval-btn" data-interval="1h">1小时</button>
|
|
97
|
+
</div>
|
|
98
|
+
<canvas id="coin-kline-canvas" width="860" height="320"></canvas>
|
|
99
|
+
</section>
|
|
100
|
+
</div>
|
|
101
|
+
<aside class="market-side">
|
|
102
|
+
<section class="panel order-panel">
|
|
103
|
+
<div class="row config-actions side-title-row">
|
|
104
|
+
<h3>Order</h3>
|
|
105
|
+
</div>
|
|
106
|
+
<div class="side-price-box">
|
|
107
|
+
<div class="side-bid">
|
|
108
|
+
<span>BID</span>
|
|
109
|
+
<strong id="coin-order-bid">-</strong>
|
|
110
|
+
</div>
|
|
111
|
+
<div class="side-spread">
|
|
112
|
+
<strong id="coin-order-spread">-</strong>
|
|
113
|
+
</div>
|
|
114
|
+
<div class="side-ask">
|
|
115
|
+
<span>ASK</span>
|
|
116
|
+
<strong id="coin-order-ask">-</strong>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
<div class="row config-actions order-qty-row">
|
|
120
|
+
<label class="side-label">取引数量</label>
|
|
121
|
+
<div class="qty-input-wrap">
|
|
122
|
+
<input id="coin-order-qty" value="1" />
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
<div class="required-amount-box">
|
|
126
|
+
<span>必要証拠金</span>
|
|
127
|
+
<strong id="coin-required-amount">- 円</strong>
|
|
128
|
+
</div>
|
|
129
|
+
<div class="row config-actions order-action-row">
|
|
130
|
+
<button id="coin-buy-btn" type="button" class="order-buy-btn">Buy</button>
|
|
131
|
+
<button id="coin-sell-btn" type="button" class="order-sell-btn">Sell</button>
|
|
132
|
+
</div>
|
|
133
|
+
<div class="order-account-info">
|
|
134
|
+
<div class="buying-power-head">
|
|
135
|
+
<span>余力・口座情報</span>
|
|
136
|
+
<button id="coin-account-info-refresh-btn" type="button" class="buying-power-refresh-btn secondary">⟳</button>
|
|
137
|
+
</div>
|
|
138
|
+
<div class="info-row"><span>評価損益 (スワップ含む)</span><strong id="coin-account-pnl">- 円</strong></div>
|
|
139
|
+
<div class="info-row"><span>拘束証拠金</span><strong id="coin-account-margin">- 円</strong></div>
|
|
140
|
+
<div class="info-row"><span>取引余力</span><strong id="coin-account-available">- 円</strong></div>
|
|
141
|
+
<div class="info-row"><span>証拠金維持率</span><strong id="coin-account-margin-ratio">- %</strong></div>
|
|
142
|
+
</div>
|
|
143
|
+
</section>
|
|
144
|
+
</aside>
|
|
145
|
+
</div>
|
|
146
|
+
<div class="positions-grid">
|
|
147
|
+
<section class="panel position-panel">
|
|
148
|
+
<div class="position-head">
|
|
149
|
+
<h3>建玉サマリー</h3>
|
|
150
|
+
<button id="coin-position-summary-refresh-btn" type="button" class="buying-power-refresh-btn secondary">⟳</button>
|
|
151
|
+
</div>
|
|
152
|
+
<table class="position-table">
|
|
153
|
+
<thead>
|
|
154
|
+
<tr>
|
|
155
|
+
<th>決済</th>
|
|
156
|
+
<th>銘柄名<br />売買区分</th>
|
|
157
|
+
<th>建玉数量</th>
|
|
158
|
+
<th>平均建玉レート</th>
|
|
159
|
+
<th>評価損益<br />累計スワップ</th>
|
|
160
|
+
</tr>
|
|
161
|
+
</thead>
|
|
162
|
+
<tbody id="coin-position-summary-body">
|
|
163
|
+
<tr><td colspan="5" class="empty-cell">対象のお取引はございません。</td></tr>
|
|
164
|
+
</tbody>
|
|
165
|
+
</table>
|
|
166
|
+
</section>
|
|
167
|
+
<section class="panel position-panel">
|
|
168
|
+
<div class="position-head">
|
|
169
|
+
<h3>建玉一覧</h3>
|
|
170
|
+
<button id="coin-position-list-refresh-btn" type="button" class="buying-power-refresh-btn secondary">⟳</button>
|
|
171
|
+
</div>
|
|
172
|
+
<table class="position-table">
|
|
173
|
+
<thead>
|
|
174
|
+
<tr>
|
|
175
|
+
<th>決済</th>
|
|
176
|
+
<th>銘柄名<br />売買区分</th>
|
|
177
|
+
<th>建玉数量</th>
|
|
178
|
+
<th>建玉レート</th>
|
|
179
|
+
<th>評価損益<br />累計スワップ</th>
|
|
180
|
+
<th>約定日時</th>
|
|
181
|
+
</tr>
|
|
182
|
+
</thead>
|
|
183
|
+
<tbody id="coin-position-list-body">
|
|
184
|
+
<tr><td colspan="6" class="empty-cell">対象のお取引はございません。</td></tr>
|
|
185
|
+
</tbody>
|
|
186
|
+
</table>
|
|
187
|
+
</section>
|
|
188
|
+
</div>
|
|
189
|
+
</section>
|
|
190
|
+
</section>
|
|
191
|
+
|
|
192
|
+
<section id="tab-fx" class="tab-panel">
|
|
193
|
+
<section class="panel market-shell fx-theme">
|
|
194
|
+
<div class="market-layout">
|
|
195
|
+
<div class="market-main">
|
|
196
|
+
<section class="panel market-table-panel">
|
|
197
|
+
<div class="market-panel-header">
|
|
198
|
+
<h2>FX Market</h2>
|
|
199
|
+
</div>
|
|
200
|
+
<div class="row config-actions market-pair-row">
|
|
201
|
+
<img id="fx-market-icon" class="market-icon" alt="fx pair icon" />
|
|
202
|
+
<select id="fx-symbol-select">
|
|
203
|
+
<option value="USD_JPY" selected>USD/JPY</option>
|
|
204
|
+
<option value="EUR_JPY">EUR/JPY</option>
|
|
205
|
+
<option value="GBP_JPY">GBP/JPY</option>
|
|
206
|
+
<option value="AUD_JPY">AUD/JPY</option>
|
|
207
|
+
<option value="NZD_JPY">NZD/JPY</option>
|
|
208
|
+
<option value="CAD_JPY">CAD/JPY</option>
|
|
209
|
+
<option value="CHF_JPY">CHF/JPY</option>
|
|
210
|
+
<option value="TRY_JPY">TRY/JPY</option>
|
|
211
|
+
<option value="ZAR_JPY">ZAR/JPY</option>
|
|
212
|
+
<option value="MXN_JPY">MXN/JPY</option>
|
|
213
|
+
<option value="EUR_USD">EUR/USD</option>
|
|
214
|
+
<option value="GBP_USD">GBP/USD</option>
|
|
215
|
+
<option value="AUD_USD">AUD/USD</option>
|
|
216
|
+
<option value="NZD_USD">NZD/USD</option>
|
|
217
|
+
</select>
|
|
218
|
+
</div>
|
|
219
|
+
</section>
|
|
220
|
+
<section class="panel market-chart-panel">
|
|
221
|
+
<div id="fx-kline-intervals" class="kline-toolbar">
|
|
222
|
+
<button type="button" class="interval-btn" data-interval="5m">5分</button>
|
|
223
|
+
<button type="button" class="interval-btn is-active" data-interval="15m">15分</button>
|
|
224
|
+
<button type="button" class="interval-btn" data-interval="30m">30分</button>
|
|
225
|
+
<button type="button" class="interval-btn" data-interval="1h">1小时</button>
|
|
226
|
+
</div>
|
|
227
|
+
<canvas id="fx-kline-canvas" width="860" height="320"></canvas>
|
|
228
|
+
</section>
|
|
229
|
+
</div>
|
|
230
|
+
<aside class="market-side">
|
|
231
|
+
<section class="panel order-panel">
|
|
232
|
+
<div class="row config-actions side-title-row">
|
|
233
|
+
<h3>Order</h3>
|
|
234
|
+
</div>
|
|
235
|
+
<div class="side-price-box">
|
|
236
|
+
<div class="side-bid">
|
|
237
|
+
<span>BID</span>
|
|
238
|
+
<strong id="fx-order-bid">-</strong>
|
|
239
|
+
</div>
|
|
240
|
+
<div class="side-spread">
|
|
241
|
+
<strong id="fx-order-spread">-</strong>
|
|
242
|
+
</div>
|
|
243
|
+
<div class="side-ask">
|
|
244
|
+
<span>ASK</span>
|
|
245
|
+
<strong id="fx-order-ask">-</strong>
|
|
246
|
+
</div>
|
|
247
|
+
</div>
|
|
248
|
+
<div class="row config-actions order-qty-row">
|
|
249
|
+
<label class="side-label">取引数量</label>
|
|
250
|
+
<div class="qty-input-wrap">
|
|
251
|
+
<input id="fx-order-qty" value="100" />
|
|
252
|
+
</div>
|
|
253
|
+
</div>
|
|
254
|
+
<div class="required-amount-box">
|
|
255
|
+
<span>必要証拠金</span>
|
|
256
|
+
<strong id="fx-required-amount">- 円</strong>
|
|
257
|
+
</div>
|
|
258
|
+
<div class="row config-actions order-action-row">
|
|
259
|
+
<button id="fx-buy-btn" type="button" class="order-buy-btn">Buy</button>
|
|
260
|
+
<button id="fx-sell-btn" type="button" class="order-sell-btn">Sell</button>
|
|
261
|
+
</div>
|
|
262
|
+
<div class="order-account-info">
|
|
263
|
+
<div class="buying-power-head">
|
|
264
|
+
<span>余力・口座情報</span>
|
|
265
|
+
<button id="fx-account-info-refresh-btn" type="button" class="buying-power-refresh-btn secondary">⟳</button>
|
|
266
|
+
</div>
|
|
267
|
+
<div class="info-row"><span>評価損益 (スワップ含む)</span><strong id="fx-account-pnl">- 円</strong></div>
|
|
268
|
+
<div class="info-row"><span>拘束証拠金</span><strong id="fx-account-margin">- 円</strong></div>
|
|
269
|
+
<div class="info-row"><span>取引余力</span><strong id="fx-account-available">- 円</strong></div>
|
|
270
|
+
<div class="info-row"><span>証拠金維持率</span><strong id="fx-account-margin-ratio">- %</strong></div>
|
|
271
|
+
</div>
|
|
272
|
+
</section>
|
|
273
|
+
</aside>
|
|
274
|
+
</div>
|
|
275
|
+
<div class="positions-grid">
|
|
276
|
+
<section class="panel position-panel">
|
|
277
|
+
<div class="position-head">
|
|
278
|
+
<h3>建玉サマリー</h3>
|
|
279
|
+
<button id="fx-position-summary-refresh-btn" type="button" class="buying-power-refresh-btn secondary">⟳</button>
|
|
280
|
+
</div>
|
|
281
|
+
<table class="position-table">
|
|
282
|
+
<thead>
|
|
283
|
+
<tr>
|
|
284
|
+
<th>決済</th>
|
|
285
|
+
<th>銘柄名<br />売買区分</th>
|
|
286
|
+
<th>建玉数量</th>
|
|
287
|
+
<th>平均建玉レート</th>
|
|
288
|
+
<th>評価損益<br />累計スワップ</th>
|
|
289
|
+
</tr>
|
|
290
|
+
</thead>
|
|
291
|
+
<tbody id="fx-position-summary-body">
|
|
292
|
+
<tr><td colspan="5" class="empty-cell">対象のお取引はございません。</td></tr>
|
|
293
|
+
</tbody>
|
|
294
|
+
</table>
|
|
295
|
+
</section>
|
|
296
|
+
<section class="panel position-panel">
|
|
297
|
+
<div class="position-head">
|
|
298
|
+
<h3>建玉一覧</h3>
|
|
299
|
+
<button id="fx-position-list-refresh-btn" type="button" class="buying-power-refresh-btn secondary">⟳</button>
|
|
300
|
+
</div>
|
|
301
|
+
<table class="position-table">
|
|
302
|
+
<thead>
|
|
303
|
+
<tr>
|
|
304
|
+
<th>決済</th>
|
|
305
|
+
<th>銘柄名<br />売買区分</th>
|
|
306
|
+
<th>建玉数量</th>
|
|
307
|
+
<th>建玉レート</th>
|
|
308
|
+
<th>評価損益<br />累計スワップ</th>
|
|
309
|
+
<th>約定日時</th>
|
|
310
|
+
</tr>
|
|
311
|
+
</thead>
|
|
312
|
+
<tbody id="fx-position-list-body">
|
|
313
|
+
<tr><td colspan="6" class="empty-cell">対象のお取引はございません。</td></tr>
|
|
314
|
+
</tbody>
|
|
315
|
+
</table>
|
|
316
|
+
</section>
|
|
317
|
+
</div>
|
|
318
|
+
</section>
|
|
319
|
+
</section>
|
|
320
|
+
|
|
321
|
+
<section id="tab-ai" class="tab-panel">
|
|
63
322
|
<section class="panel">
|
|
323
|
+
<h2>AI Chat</h2>
|
|
64
324
|
<div id="messages" class="messages"></div>
|
|
65
325
|
<form id="chat-form" class="composer">
|
|
66
326
|
<textarea id="chat-input" rows="3" placeholder="Type your message..." required></textarea>
|
|
@@ -73,19 +333,63 @@
|
|
|
73
333
|
<section class="panel">
|
|
74
334
|
<h2>Bot Config</h2>
|
|
75
335
|
<div id="session" class="muted">not logged in</div>
|
|
336
|
+
<h3>GMO API Keys</h3>
|
|
337
|
+
<label>
|
|
338
|
+
<span>Error Log Directory</span>
|
|
339
|
+
<input id="error-log-dir" type="text" placeholder="e.g. D:\\weget-bot\\logs" />
|
|
340
|
+
</label>
|
|
341
|
+
<label>
|
|
342
|
+
<span>Risk Daily Loss Limit (JPY)</span>
|
|
343
|
+
<input id="risk-daily-loss-limit-jpy" type="number" min="1" step="1" />
|
|
344
|
+
</label>
|
|
345
|
+
<label>
|
|
346
|
+
<span>Crypto API Key</span>
|
|
347
|
+
<input id="crypto-api-key" type="text" />
|
|
348
|
+
</label>
|
|
349
|
+
<label>
|
|
350
|
+
<span>Crypto API Secret</span>
|
|
351
|
+
<div class="inline-input-row">
|
|
352
|
+
<input id="crypto-api-secret" type="password" />
|
|
353
|
+
<button id="toggle-crypto-secret-btn" type="button" class="secondary">显示</button>
|
|
354
|
+
</div>
|
|
355
|
+
</label>
|
|
356
|
+
<label>
|
|
357
|
+
<span>FX API Key</span>
|
|
358
|
+
<input id="fx-api-key" type="text" />
|
|
359
|
+
</label>
|
|
360
|
+
<label>
|
|
361
|
+
<span>FX API Secret</span>
|
|
362
|
+
<div class="inline-input-row">
|
|
363
|
+
<input id="fx-api-secret" type="password" />
|
|
364
|
+
<button id="toggle-fx-secret-btn" type="button" class="secondary">显示</button>
|
|
365
|
+
</div>
|
|
366
|
+
</label>
|
|
367
|
+
<div class="row config-actions">
|
|
368
|
+
<button id="save-api-config-btn" type="button">Save API Keys</button>
|
|
369
|
+
</div>
|
|
370
|
+
<h3>AI Settings</h3>
|
|
371
|
+
<label>
|
|
372
|
+
<span>模型</span>
|
|
373
|
+
<select id="ai-model">
|
|
374
|
+
<option value="gpt-4.1-mini">gpt-4.1-mini</option>
|
|
375
|
+
<option value="gpt-4.1">gpt-4.1</option>
|
|
376
|
+
<option value="gpt-4o-mini">gpt-4o-mini</option>
|
|
377
|
+
</select>
|
|
378
|
+
</label>
|
|
379
|
+
<label>
|
|
380
|
+
<span>OpenAI API Key</span>
|
|
381
|
+
<div class="inline-input-row">
|
|
382
|
+
<input id="openai-api-key" type="password" />
|
|
383
|
+
<button id="toggle-openai-key-btn" type="button" class="secondary">显示</button>
|
|
384
|
+
</div>
|
|
385
|
+
</label>
|
|
76
386
|
<div class="row config-actions">
|
|
387
|
+
<button id="save-ai-config-btn" type="button">保存 AI 设置</button>
|
|
77
388
|
<button id="logout-btn" type="button" class="secondary">Logout</button>
|
|
78
389
|
</div>
|
|
79
390
|
<div id="runtime-info" class="runtime-grid"></div>
|
|
80
391
|
</section>
|
|
81
392
|
</section>
|
|
82
|
-
|
|
83
|
-
<section id="tab-logs" class="tab-panel">
|
|
84
|
-
<section class="panel">
|
|
85
|
-
<h2>Realtime Logs</h2>
|
|
86
|
-
<div id="logs" class="logs-list"></div>
|
|
87
|
-
</section>
|
|
88
|
-
</section>
|
|
89
393
|
</main>
|
|
90
394
|
<script type="module" src="./app.js"></script>
|
|
91
395
|
</body>
|