@backtest-kit/sidekick 0.1.1 → 3.0.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.
- package/README.md +120 -13
- package/content/config/source/timeframe_15m.pine +114 -0
- package/content/config/source/timeframe_4h.pine +57 -0
- package/content/config/symbol.config.cjs +460 -0
- package/content/docker/ollama/docker-compose.yaml +34 -0
- package/content/docker/ollama/watch.sh +2 -0
- package/content/scripts/cache/cache_candles.mjs +47 -0
- package/content/scripts/cache/cache_model.mjs +42 -0
- package/content/scripts/cache/validate_candles.mjs +46 -0
- package/content/scripts/run_timeframe_15m.mjs +77 -0
- package/content/scripts/run_timeframe_4h.mjs +68 -0
- package/package.json +2 -2
- package/scripts/init.mjs +40 -9
- package/src/classes/BacktestLowerStopOnBreakevenAction.mjs +18 -0
- package/src/classes/{PartialProfitTakingAction.mjs → BacktestPartialProfitTakingAction.mjs} +7 -2
- package/src/classes/BacktestPositionMonitorAction.mjs +57 -0
- package/src/config/params.mjs +1 -0
- package/src/config/setup.mjs +27 -1
- package/src/enum/ActionName.mjs +3 -1
- package/src/enum/FrameName.mjs +1 -0
- package/src/enum/RiskName.mjs +1 -1
- package/src/logic/action/backtest_lower_stop_on_breakeven.action.mjs +9 -0
- package/src/logic/action/backtest_partial_profit_taking.action.mjs +9 -0
- package/src/logic/action/backtest_position_monitor.action.mjs +9 -0
- package/src/logic/exchange/binance.exchange.mjs +12 -2
- package/src/logic/frame/feb_2024.frame.mjs +10 -0
- package/src/logic/index.mjs +5 -2
- package/src/logic/risk/sl_distance.risk.mjs +32 -0
- package/src/logic/risk/tp_distance.risk.mjs +5 -3
- package/src/logic/strategy/main.strategy.mjs +29 -10
- package/src/main/bootstrap.mjs +52 -0
- package/src/math/timeframe_15m.math.mjs +68 -0
- package/src/math/timeframe_4h.math.mjs +53 -0
- package/src/utils/getArgs.mjs +15 -23
- package/template/CLAUDE.mustache +421 -0
- package/template/README.mustache +232 -24
- package/template/env.mustache +1 -17
- package/template/jsconfig.json.mustache +1 -0
- package/template/package.mustache +8 -6
- package/src/func/market.func.mjs +0 -46
- package/src/logic/action/partial_profit_taking.action.mjs +0 -8
- package/src/logic/risk/rr_ratio.risk.mjs +0 -39
- /package/{types/backtest-kit.d.ts → template/types.mustache} +0 -0
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
const { str } = require("functools-kit");
|
|
2
|
+
|
|
3
|
+
const symbol_list = [
|
|
4
|
+
// Priority 50: Premium
|
|
5
|
+
{
|
|
6
|
+
icon: "/icon/btc.png",
|
|
7
|
+
logo: "/icon/128/btc.png",
|
|
8
|
+
symbol: "BTCUSDT",
|
|
9
|
+
displayName: "Bitcoin",
|
|
10
|
+
color: "#F7931A",
|
|
11
|
+
priority: 50,
|
|
12
|
+
description: str.newline(
|
|
13
|
+
"Bitcoin - the first and most popular cryptocurrency",
|
|
14
|
+
"Digital gold with a limited supply of 21 million coins",
|
|
15
|
+
"Used as a reserve asset and a means of saving",
|
|
16
|
+
"Highly liquid market with large trading volumes"
|
|
17
|
+
),
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
icon: "/icon/eth.png",
|
|
21
|
+
logo: "/icon/128/eth.png",
|
|
22
|
+
symbol: "ETHUSDT",
|
|
23
|
+
color: "#6F42C1",
|
|
24
|
+
displayName: "Ethereum",
|
|
25
|
+
priority: 50,
|
|
26
|
+
description: str.newline(
|
|
27
|
+
"Ethereum - a blockchain platform for smart contracts",
|
|
28
|
+
"The foundation of the DeFi and NFT ecosystem",
|
|
29
|
+
"Transition to Proof-of-Stake (Ethereum 2.0)",
|
|
30
|
+
"The second-largest cryptocurrency by market capitalization"
|
|
31
|
+
),
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
icon: "/icon/uni.png",
|
|
35
|
+
logo: "/icon/128/uni.png",
|
|
36
|
+
symbol: "UNIUSDT",
|
|
37
|
+
displayName: "Uniswap",
|
|
38
|
+
color: "#FF007A",
|
|
39
|
+
priority: 50,
|
|
40
|
+
description: str.newline(
|
|
41
|
+
"Uniswap (UNI) - the largest decentralized exchange (DEX)",
|
|
42
|
+
"Automated market maker (AMM) on Ethereum",
|
|
43
|
+
"High liquidity and trading volumes",
|
|
44
|
+
"Governance token for the Uniswap protocol"
|
|
45
|
+
),
|
|
46
|
+
},
|
|
47
|
+
// Priority 100: High
|
|
48
|
+
{
|
|
49
|
+
icon: "/icon/bnb.png",
|
|
50
|
+
logo: "/icon/128/bnb.png",
|
|
51
|
+
symbol: "BNBUSDT",
|
|
52
|
+
color: "#F3BA2F",
|
|
53
|
+
displayName: "BNB",
|
|
54
|
+
priority: 100,
|
|
55
|
+
description: str.newline(
|
|
56
|
+
"Binance Coin - the native token of the largest exchange",
|
|
57
|
+
"Used for discounts on fees",
|
|
58
|
+
"Foundation of BNB Smart Chain for DApps",
|
|
59
|
+
"Regular token burns reduce supply"
|
|
60
|
+
),
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
icon: "/icon/sol.png",
|
|
64
|
+
logo: "/icon/128/sol.png",
|
|
65
|
+
symbol: "SOLUSDT",
|
|
66
|
+
color: "#00e676",
|
|
67
|
+
displayName: "Solana",
|
|
68
|
+
priority: 100,
|
|
69
|
+
description: str.newline(
|
|
70
|
+
"Solana - a high-performance blockchain",
|
|
71
|
+
"Up to 65,000 transactions per second",
|
|
72
|
+
"Popular platform for NFT and DeFi projects",
|
|
73
|
+
"Low fees and fast transactions"
|
|
74
|
+
),
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
icon: "/icon/ltc.png",
|
|
78
|
+
logo: "/icon/128/ltc.png",
|
|
79
|
+
symbol: "LTCUSDT",
|
|
80
|
+
color: "#B8B8B8",
|
|
81
|
+
displayName: "Litecoin",
|
|
82
|
+
priority: 100,
|
|
83
|
+
description: str.newline(
|
|
84
|
+
"Litecoin (LTC) - one of the first alternative cryptocurrencies",
|
|
85
|
+
"Based on Bitcoin's code but with faster block time (2.5 minutes)",
|
|
86
|
+
"Low fees and high transaction speed",
|
|
87
|
+
"Popular cryptocurrency for transfers and payments"
|
|
88
|
+
),
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
icon: "/icon/bch.png",
|
|
92
|
+
logo: "/icon/128/bch.png",
|
|
93
|
+
symbol: "BCHUSDT",
|
|
94
|
+
color: "#8DC351",
|
|
95
|
+
displayName: "Bitcoin Cash",
|
|
96
|
+
priority: 100,
|
|
97
|
+
description: str.newline(
|
|
98
|
+
"Bitcoin Cash (BCH) - a fork of Bitcoin created to increase network capacity",
|
|
99
|
+
"Larger block size allows for more transactions",
|
|
100
|
+
"Low fees and fast payment confirmations",
|
|
101
|
+
"Popular among users for everyday payments"
|
|
102
|
+
),
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
icon: "/icon/neo.png",
|
|
106
|
+
logo: "/icon/128/neo.png",
|
|
107
|
+
symbol: "NEOUSDT",
|
|
108
|
+
color: "#58BF00",
|
|
109
|
+
displayName: "NEO",
|
|
110
|
+
priority: 100,
|
|
111
|
+
description: str.newline(
|
|
112
|
+
"NEO - a blockchain platform for creating digital assets and smart contracts",
|
|
113
|
+
"Often referred to as 'Chinese Ethereum'",
|
|
114
|
+
"Supports multiple programming languages for DApp development",
|
|
115
|
+
"Uses a unique consensus mechanism called Delegated Byzantine Fault Tolerance (dBFT)"
|
|
116
|
+
),
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
icon: "/icon/fil.png",
|
|
120
|
+
logo: "/icon/128/fil.png",
|
|
121
|
+
symbol: "FILUSDT",
|
|
122
|
+
displayName: "Filecoin",
|
|
123
|
+
color: "#0090FF",
|
|
124
|
+
priority: 100,
|
|
125
|
+
description: str.newline(
|
|
126
|
+
"Filecoin (FIL) - a decentralized data storage network",
|
|
127
|
+
"Utilizes free space on users' hard drives",
|
|
128
|
+
"An alternative to centralized cloud storage",
|
|
129
|
+
"Economically efficient and secure file storage"
|
|
130
|
+
),
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
icon: "/icon/xmr.png",
|
|
134
|
+
logo: "/icon/128/xmr.png",
|
|
135
|
+
symbol: "XMRUSDT",
|
|
136
|
+
displayName: "Monero",
|
|
137
|
+
color: "#FF6600",
|
|
138
|
+
priority: 100,
|
|
139
|
+
description: str.newline(
|
|
140
|
+
"Monero (XMR) - a cryptocurrency focused on privacy",
|
|
141
|
+
"Complete anonymity of transactions and addresses",
|
|
142
|
+
"Protection against tracking and blockchain analysis",
|
|
143
|
+
"Popular among users who value confidentiality"
|
|
144
|
+
),
|
|
145
|
+
},
|
|
146
|
+
// Priority 150: Medium
|
|
147
|
+
{
|
|
148
|
+
icon: "/icon/xrp.png",
|
|
149
|
+
logo: "/icon/128/xrp.png",
|
|
150
|
+
symbol: "XRPUSDT",
|
|
151
|
+
color: "#23292F",
|
|
152
|
+
displayName: "Ripple",
|
|
153
|
+
priority: 150,
|
|
154
|
+
description: str.newline(
|
|
155
|
+
"XRP - a digital asset for international payments",
|
|
156
|
+
"Fast and cheap cross-border transfers",
|
|
157
|
+
"Used by banks and financial institutions",
|
|
158
|
+
"Low fees and transaction time of 3-5 seconds"
|
|
159
|
+
),
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
icon: "/icon/avax.png",
|
|
163
|
+
logo: "/icon/128/avax.png",
|
|
164
|
+
symbol: "AVAXUSDT",
|
|
165
|
+
color: "#E84142",
|
|
166
|
+
displayName: "Avalanche",
|
|
167
|
+
priority: 150,
|
|
168
|
+
description: str.newline(
|
|
169
|
+
"Avalanche (AVAX) - a high-performance blockchain for smart contracts",
|
|
170
|
+
"Supports the creation of custom blockchains (Subnet)",
|
|
171
|
+
"Fast and cheap transactions, high scalability",
|
|
172
|
+
"Popular platform for DeFi and NFT projects"
|
|
173
|
+
),
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
icon: "/icon/link.png",
|
|
177
|
+
logo: "/icon/128/link.png",
|
|
178
|
+
symbol: "LINKUSDT",
|
|
179
|
+
color: "#375BD2",
|
|
180
|
+
displayName: "Chainlink",
|
|
181
|
+
priority: 150,
|
|
182
|
+
description: str.newline(
|
|
183
|
+
"Chainlink (LINK) - a decentralized oracle network",
|
|
184
|
+
"Provides data transmission from the external world to smart contracts",
|
|
185
|
+
"A key component of the DeFi ecosystem",
|
|
186
|
+
"High security and reliability of data"
|
|
187
|
+
),
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
icon: "/icon/dot.png",
|
|
191
|
+
logo: "/icon/128/dot.png",
|
|
192
|
+
symbol: "DOTUSDT",
|
|
193
|
+
color: "#E6007A",
|
|
194
|
+
displayName: "Polkadot",
|
|
195
|
+
priority: 150,
|
|
196
|
+
description: str.newline(
|
|
197
|
+
"Polkadot (DOT) - a multi-chain blockchain platform",
|
|
198
|
+
"Allows different blockchains to interact through parachains",
|
|
199
|
+
"High scalability and security",
|
|
200
|
+
"Actively used for creating decentralized applications and services"
|
|
201
|
+
),
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
icon: "/icon/matic.png",
|
|
205
|
+
logo: "/icon/128/matic.png",
|
|
206
|
+
symbol: "MATICUSDT",
|
|
207
|
+
displayName: "Polygon",
|
|
208
|
+
color: "#8247E5",
|
|
209
|
+
priority: 150,
|
|
210
|
+
description: str.newline(
|
|
211
|
+
"Polygon (MATIC) - a scaling solution for Ethereum",
|
|
212
|
+
"Layer 2 with low fees and high speed",
|
|
213
|
+
"Compatible with Ethereum and the DeFi ecosystem",
|
|
214
|
+
"Used by many large projects and applications"
|
|
215
|
+
),
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
icon: "/icon/aave.png",
|
|
219
|
+
logo: "/icon/128/aave.png",
|
|
220
|
+
symbol: "AAVEUSDT",
|
|
221
|
+
displayName: "Aave",
|
|
222
|
+
color: "#B6509E",
|
|
223
|
+
priority: 150,
|
|
224
|
+
description: str.newline(
|
|
225
|
+
"Aave - a leading decentralized lending protocol",
|
|
226
|
+
"Allows deposits and loans of cryptocurrencies",
|
|
227
|
+
"Unique features: flash loans and credit delegation",
|
|
228
|
+
"One of the largest DeFi projects by total value locked"
|
|
229
|
+
),
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
icon: "/icon/ftc.png",
|
|
233
|
+
logo: "/icon/128/ftc.png",
|
|
234
|
+
symbol: "SUSDT",
|
|
235
|
+
displayName: "Sonic",
|
|
236
|
+
color: "#1969FF",
|
|
237
|
+
priority: 150,
|
|
238
|
+
description: str.newline(
|
|
239
|
+
"Sonic (aka Fantom) - a high-speed platform for DeFi",
|
|
240
|
+
"Directed acyclic graph (DAG) technology",
|
|
241
|
+
"Transaction finality in less than 1 second",
|
|
242
|
+
"Low fees and a growing ecosystem of applications"
|
|
243
|
+
),
|
|
244
|
+
},
|
|
245
|
+
|
|
246
|
+
// Priority 200: Low
|
|
247
|
+
{
|
|
248
|
+
icon: "/icon/doge.png",
|
|
249
|
+
logo: "/icon/128/doge.png",
|
|
250
|
+
symbol: "DOGEUSDT",
|
|
251
|
+
color: "#C2A633",
|
|
252
|
+
displayName: "Dogecoin",
|
|
253
|
+
priority: 200,
|
|
254
|
+
description: str.newline(
|
|
255
|
+
"Dogecoin (DOGE) - a cryptocurrency created as a joke based on the popular meme with the Shiba Inu dog",
|
|
256
|
+
"Fast and cheap transactions",
|
|
257
|
+
"Actively supported by the community and celebrities",
|
|
258
|
+
"Used for tips and micropayments"
|
|
259
|
+
),
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
icon: "/icon/trx.png",
|
|
263
|
+
logo: "/icon/128/trx.png",
|
|
264
|
+
symbol: "TRXUSDT",
|
|
265
|
+
color: "#EC0928",
|
|
266
|
+
displayName: "TRON",
|
|
267
|
+
priority: 200,
|
|
268
|
+
description: str.newline(
|
|
269
|
+
"TRON (TRX) - a blockchain platform for decentralized applications and smart contracts",
|
|
270
|
+
"High throughput and low fees",
|
|
271
|
+
"Popular for creating tokens and conducting fast transactions",
|
|
272
|
+
"Actively developed and supported by a large community"
|
|
273
|
+
),
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
icon: "/icon/ada.png",
|
|
277
|
+
logo: "/icon/128/ada.png",
|
|
278
|
+
symbol: "ADAUSDT",
|
|
279
|
+
color: "#0033AD",
|
|
280
|
+
displayName: "Cardano",
|
|
281
|
+
priority: 200,
|
|
282
|
+
description: str.newline(
|
|
283
|
+
"Cardano (ADA) - a blockchain platform with a scientific approach to development",
|
|
284
|
+
"Uses the Ouroboros consensus algorithm (Proof-of-Stake)",
|
|
285
|
+
"Supports smart contracts and decentralized applications",
|
|
286
|
+
"Focus on scalability, security, and sustainability"
|
|
287
|
+
),
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
icon: "/icon/eos.png",
|
|
291
|
+
logo: "/icon/128/eos.png",
|
|
292
|
+
symbol: "EOSUSDT",
|
|
293
|
+
color: "#19191A",
|
|
294
|
+
displayName: "EOS",
|
|
295
|
+
priority: 200,
|
|
296
|
+
description: str.newline(
|
|
297
|
+
"EOS - a high-performance blockchain platform for decentralized applications (DApps)",
|
|
298
|
+
"Fast and free transactions thanks to delegated Proof-of-Stake (DPoS)",
|
|
299
|
+
"Focused on scalability and developer convenience",
|
|
300
|
+
"Popular among projects requiring high throughput"
|
|
301
|
+
),
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
icon: "/icon/xlm.png",
|
|
305
|
+
logo: "/icon/128/xlm.png",
|
|
306
|
+
symbol: "XLMUSDT",
|
|
307
|
+
color: "#19191A",
|
|
308
|
+
displayName: "XLM",
|
|
309
|
+
priority: 200,
|
|
310
|
+
description: str.newline(
|
|
311
|
+
"Stellar (XLM) - a platform for fast and cheap international transfers",
|
|
312
|
+
"Focused on integration with financial institutions and banks",
|
|
313
|
+
"Uses a unique consensus protocol called Stellar Consensus Protocol (SCP)",
|
|
314
|
+
"Supports token creation and decentralized exchange"
|
|
315
|
+
),
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
icon: "/icon/ksm.png",
|
|
319
|
+
logo: "/icon/128/ksm.png",
|
|
320
|
+
symbol: "KSMUSDT",
|
|
321
|
+
displayName: "Kusama",
|
|
322
|
+
color: "#000000",
|
|
323
|
+
priority: 200,
|
|
324
|
+
description: str.newline(
|
|
325
|
+
"Kusama (KSM) - an experimental network of Polkadot",
|
|
326
|
+
"A testing ground for new features before implementation in Polkadot",
|
|
327
|
+
"Own ecosystem of parachains and projects",
|
|
328
|
+
"Fast deployment and testing of innovations"
|
|
329
|
+
),
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
icon: "/icon/comp.png",
|
|
333
|
+
logo: "/icon/128/comp.png",
|
|
334
|
+
symbol: "COMPUSDT",
|
|
335
|
+
displayName: "Compound",
|
|
336
|
+
color: "#00D395",
|
|
337
|
+
priority: 200,
|
|
338
|
+
description: str.newline(
|
|
339
|
+
"Compound (COMP) - an automated lending protocol",
|
|
340
|
+
"Algorithmic interest rates based on supply and demand",
|
|
341
|
+
"Governance token for the Compound protocol",
|
|
342
|
+
"One of the pioneers of the DeFi movement"
|
|
343
|
+
),
|
|
344
|
+
},
|
|
345
|
+
|
|
346
|
+
{
|
|
347
|
+
icon: "/icon/atom.png",
|
|
348
|
+
logo: "/icon/128/atom.png",
|
|
349
|
+
symbol: "ATOMUSDT",
|
|
350
|
+
displayName: "Cosmos",
|
|
351
|
+
color: "#2E3148",
|
|
352
|
+
priority: 250,
|
|
353
|
+
description: str.newline(
|
|
354
|
+
"Cosmos (ATOM) - a blockchain for inter-network communication",
|
|
355
|
+
"Inter-Blockchain Communication (IBC) technology",
|
|
356
|
+
"Allows independent blockchains to exchange data",
|
|
357
|
+
"Foundation for an ecosystem of interconnected applications"
|
|
358
|
+
),
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
icon: "/icon/algo.png",
|
|
362
|
+
logo: "/icon/128/algo.png",
|
|
363
|
+
symbol: "ALGOUSDT",
|
|
364
|
+
displayName: "Algorand",
|
|
365
|
+
color: "#000000",
|
|
366
|
+
priority: 250,
|
|
367
|
+
description: str.newline(
|
|
368
|
+
"Algorand (ALGO) - a high-performance blockchain",
|
|
369
|
+
"Pure Proof-of-Stake consensus",
|
|
370
|
+
"Fast transactions with finality in less than 5 seconds",
|
|
371
|
+
"Used for DeFi, NFTs, and government projects"
|
|
372
|
+
),
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
icon: "/icon/miota.png",
|
|
376
|
+
logo: "/icon/128/miota.png",
|
|
377
|
+
symbol: "IOTAUSDT",
|
|
378
|
+
displayName: "IOTA",
|
|
379
|
+
color: "#282C37",
|
|
380
|
+
priority: 250,
|
|
381
|
+
description: str.newline(
|
|
382
|
+
"IOTA - a distributed network for the Internet of Things (IoT)",
|
|
383
|
+
"Tangle technology instead of blockchain for scalability",
|
|
384
|
+
"Free microtransactions with no fees",
|
|
385
|
+
"Focus on data, identity, and machine economy"
|
|
386
|
+
),
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
icon: "/icon/vet.png",
|
|
390
|
+
logo: "/icon/128/vet.png",
|
|
391
|
+
symbol: "VETUSDT",
|
|
392
|
+
displayName: "VeChain",
|
|
393
|
+
color: "#00C1DE",
|
|
394
|
+
priority: 250,
|
|
395
|
+
description: str.newline(
|
|
396
|
+
"VeChain (VET) - a blockchain for supply chains and logistics",
|
|
397
|
+
"Used for tracking goods and verifying data",
|
|
398
|
+
"Dual tokenomics: VET for speed, VTHO for gas",
|
|
399
|
+
"Partnerships with major companies in the real sector"
|
|
400
|
+
),
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
icon: "/icon/bat.png",
|
|
404
|
+
logo: "/icon/128/bat.png",
|
|
405
|
+
symbol: "BATUSDT",
|
|
406
|
+
displayName: "Brave Reward",
|
|
407
|
+
color: "#FF5000",
|
|
408
|
+
priority: 250,
|
|
409
|
+
description: str.newline(
|
|
410
|
+
"Basic Attention Token (BAT) - a token for digital advertising in the Brave browser",
|
|
411
|
+
"Rewards users for viewing ads",
|
|
412
|
+
"Transparent and private advertising ecosystem",
|
|
413
|
+
"Growing community of Brave Browser users"
|
|
414
|
+
),
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
icon: "/icon/etc.png",
|
|
418
|
+
logo: "/icon/128/etc.png",
|
|
419
|
+
symbol: "ETCUSDT",
|
|
420
|
+
displayName: "Ethereum Classic",
|
|
421
|
+
color: "#328332",
|
|
422
|
+
priority: 300,
|
|
423
|
+
description: str.newline(
|
|
424
|
+
"Ethereum Classic (ETC) - the original Ethereum chain",
|
|
425
|
+
"Commitment to the principle 'code is law'",
|
|
426
|
+
"Proof-of-Work consensus for maximum security",
|
|
427
|
+
"One of the oldest smart contract platforms"
|
|
428
|
+
),
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
icon: "/icon/dash.png",
|
|
432
|
+
logo: "/icon/128/dash.png",
|
|
433
|
+
symbol: "DASHUSDT",
|
|
434
|
+
displayName: "Dash",
|
|
435
|
+
color: "#008CE7",
|
|
436
|
+
priority: 300,
|
|
437
|
+
description: str.newline(
|
|
438
|
+
"Dash - a cryptocurrency for fast and private payments",
|
|
439
|
+
"InstantSend technology for instant transactions",
|
|
440
|
+
"Two-tier network: miners and masternodes",
|
|
441
|
+
"Popular in countries with unstable economies"
|
|
442
|
+
),
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
icon: "/icon/zec.png",
|
|
446
|
+
logo: "/icon/128/zec.png",
|
|
447
|
+
symbol: "ZECUSDT",
|
|
448
|
+
displayName: "Zcash",
|
|
449
|
+
color: "#ECB244",
|
|
450
|
+
priority: 300,
|
|
451
|
+
description: str.newline(
|
|
452
|
+
"Zcash (ZEC) - a cryptocurrency with optional privacy",
|
|
453
|
+
"Uses zero-knowledge proofs (zk-SNARKs) technology",
|
|
454
|
+
"Choice between transparent and shielded transactions",
|
|
455
|
+
"Developed by world-class cryptographers"
|
|
456
|
+
),
|
|
457
|
+
},
|
|
458
|
+
];
|
|
459
|
+
|
|
460
|
+
module.exports = symbol_list;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
version: "3.8"
|
|
2
|
+
|
|
3
|
+
services:
|
|
4
|
+
ollama:
|
|
5
|
+
build: .
|
|
6
|
+
container_name: ollama
|
|
7
|
+
ports:
|
|
8
|
+
- "11434:11434"
|
|
9
|
+
volumes:
|
|
10
|
+
- ./.ollama:/root/.ollama
|
|
11
|
+
environment:
|
|
12
|
+
OLLAMA_HOST: 0.0.0.0
|
|
13
|
+
OLLAMA_MAX_LOADED_MODELS: 2
|
|
14
|
+
OLLAMA_NUM_PARALLEL: 8
|
|
15
|
+
OLLAMA_MAX_QUEUE: 96
|
|
16
|
+
OLLAMA_KEEP_ALIVE: 24h
|
|
17
|
+
OLLAMA_FLASH_ATTENTION: 1
|
|
18
|
+
OLLAMA_KV_CACHE_TYPE: q4_0
|
|
19
|
+
NVIDIA_VISIBLE_DEVICES: all
|
|
20
|
+
NVIDIA_DRIVER_CAPABILITIES: compute,utility
|
|
21
|
+
deploy:
|
|
22
|
+
resources:
|
|
23
|
+
reservations:
|
|
24
|
+
devices:
|
|
25
|
+
- driver: nvidia
|
|
26
|
+
count: all
|
|
27
|
+
capabilities: [gpu]
|
|
28
|
+
restart: always
|
|
29
|
+
healthcheck:
|
|
30
|
+
test: ["CMD", "curl", "-f", "http://localhost:11434/api/version"]
|
|
31
|
+
interval: 30s
|
|
32
|
+
timeout: 5s
|
|
33
|
+
retries: 3
|
|
34
|
+
start_period: 20s
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { addExchangeSchema, warmCandles } from "backtest-kit";
|
|
2
|
+
import { singleshot } from "functools-kit";
|
|
3
|
+
import ccxt from "ccxt";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
const getExchange = singleshot(async () => {
|
|
7
|
+
const exchange = new ccxt.binance({
|
|
8
|
+
options: {
|
|
9
|
+
defaultType: "spot",
|
|
10
|
+
adjustForTimeDifference: true,
|
|
11
|
+
recvWindow: 60000,
|
|
12
|
+
},
|
|
13
|
+
enableRateLimit: true,
|
|
14
|
+
});
|
|
15
|
+
await exchange.loadMarkets();
|
|
16
|
+
return exchange;
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
addExchangeSchema({
|
|
20
|
+
exchangeName: "ccxt-exchange",
|
|
21
|
+
getCandles: async (symbol, interval, since, limit) => {
|
|
22
|
+
const exchange = await getExchange();
|
|
23
|
+
const candles = await exchange.fetchOHLCV(
|
|
24
|
+
symbol,
|
|
25
|
+
interval,
|
|
26
|
+
since.getTime(),
|
|
27
|
+
limit,
|
|
28
|
+
);
|
|
29
|
+
return candles.map(([timestamp, open, high, low, close, volume]) => ({
|
|
30
|
+
timestamp,
|
|
31
|
+
open,
|
|
32
|
+
high,
|
|
33
|
+
low,
|
|
34
|
+
close,
|
|
35
|
+
volume,
|
|
36
|
+
}));
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
const from = new Date("2024-02-01T00:00:00Z");
|
|
41
|
+
const to = new Date("2024-02-29T23:59:59Z");
|
|
42
|
+
const symbol = "BTCUSDT";
|
|
43
|
+
const exchangeName = "ccxt-exchange";
|
|
44
|
+
|
|
45
|
+
await warmCandles({ exchangeName, from, to, interval: "1m", symbol });
|
|
46
|
+
await warmCandles({ exchangeName, from, to, interval: "15m", symbol });
|
|
47
|
+
await warmCandles({ exchangeName, from, to, interval: "4h", symbol });
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Ollama } from "ollama";
|
|
2
|
+
|
|
3
|
+
const MODEL_NAME = "glm-4.7-flash:q4_K_M";
|
|
4
|
+
|
|
5
|
+
const ollama = new Ollama({ host: "http://127.0.0.1:11434" });
|
|
6
|
+
|
|
7
|
+
console.log(`Loading model ${MODEL_NAME}`);
|
|
8
|
+
|
|
9
|
+
const pull = async () => {
|
|
10
|
+
const response = await ollama.pull({
|
|
11
|
+
model: MODEL_NAME,
|
|
12
|
+
stream: true,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
for await (const part of response) {
|
|
16
|
+
if (!part.completed || !part.total) {
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Calculate progress percentage
|
|
21
|
+
const progress =
|
|
22
|
+
part.total > 0 ? ((part.completed / part.total) * 100).toFixed(1) : 0;
|
|
23
|
+
|
|
24
|
+
// Create simple progress bar
|
|
25
|
+
const barLength = 40;
|
|
26
|
+
const filledLength = Math.round((barLength * part.completed) / part.total);
|
|
27
|
+
const bar = "█".repeat(filledLength) + "░".repeat(barLength - filledLength);
|
|
28
|
+
|
|
29
|
+
// Display progress
|
|
30
|
+
process.stdout.write(`\r[${bar}] ${progress}% ${part.status}`);
|
|
31
|
+
|
|
32
|
+
if (part.status === "success") {
|
|
33
|
+
console.log("\nModel pulled successfully!");
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
console.log("Done!");
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
await pull();
|
|
42
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { addExchangeSchema, checkCandles } from "backtest-kit";
|
|
2
|
+
import { singleshot } from "functools-kit";
|
|
3
|
+
import ccxt from "ccxt";
|
|
4
|
+
|
|
5
|
+
const getExchange = singleshot(async () => {
|
|
6
|
+
const exchange = new ccxt.binance({
|
|
7
|
+
options: {
|
|
8
|
+
defaultType: "spot",
|
|
9
|
+
adjustForTimeDifference: true,
|
|
10
|
+
recvWindow: 60000,
|
|
11
|
+
},
|
|
12
|
+
enableRateLimit: true,
|
|
13
|
+
});
|
|
14
|
+
await exchange.loadMarkets();
|
|
15
|
+
return exchange;
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
addExchangeSchema({
|
|
19
|
+
exchangeName: "ccxt-exchange",
|
|
20
|
+
getCandles: async (symbol, interval, since, limit) => {
|
|
21
|
+
const exchange = await getExchange();
|
|
22
|
+
const candles = await exchange.fetchOHLCV(
|
|
23
|
+
symbol,
|
|
24
|
+
interval,
|
|
25
|
+
since.getTime(),
|
|
26
|
+
limit,
|
|
27
|
+
);
|
|
28
|
+
return candles.map(([timestamp, open, high, low, close, volume]) => ({
|
|
29
|
+
timestamp,
|
|
30
|
+
open,
|
|
31
|
+
high,
|
|
32
|
+
low,
|
|
33
|
+
close,
|
|
34
|
+
volume,
|
|
35
|
+
}));
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
const from = new Date("2024-02-01T00:00:00Z");
|
|
40
|
+
const to = new Date("2024-02-29T23:59:59Z");
|
|
41
|
+
const symbol = "BTCUSDT";
|
|
42
|
+
const exchangeName = "ccxt-exchange";
|
|
43
|
+
|
|
44
|
+
await checkCandles({ exchangeName, from, to, interval: "1m", symbol });
|
|
45
|
+
await checkCandles({ exchangeName, from, to, interval: "15m", symbol });
|
|
46
|
+
await checkCandles({ exchangeName, from, to, interval: "4h", symbol });
|