update refactor
This commit is contained in:
parent
01abc7e446
commit
55ad0607f3
39 changed files with 4304 additions and 584 deletions
14
test.ts
Normal file
14
test.ts
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import 'dotenv/config';
|
||||
import { BybitService } from './src/services/bybitService';
|
||||
import * as indicatorService from './src/services/indicatorService';
|
||||
import { sendLarkMessage } from './src/services/messageService';
|
||||
|
||||
const bybitService = new BybitService(process.env.BYBIT_API_KEY!, process.env.BYBIT_API_SECRET!, false);
|
||||
(async () => {
|
||||
const candles = await bybitService.getCandles({ symbol: 'BTCUSDT', interval: '15', category: 'linear', limit: 500 });
|
||||
console.log(candles[0], candles[1]);
|
||||
const analysis = indicatorService.analyze(candles);
|
||||
console.log(analysis);
|
||||
const message = JSON.stringify(analysis);
|
||||
await sendLarkMessage('oc_f9b2e8f0309ecab0c94e3e134b0ddd29', message);
|
||||
})();
|
||||
Loading…
Add table
Add a link
Reference in a new issue