ai-trading-sys/test.ts
2025-07-16 22:19:44 +07:00

29 lines
927 B
TypeScript

import "dotenv/config";
import { BybitService } from "./src/services/bybitService";
import * as indicatorService from "./src/services/indicatorService";
import {
analyzeCandleSequence,
isHighVolatilityCandle,
isPinBar,
} from "./src/helpers/candles";
import { analyzeCandlesJob } from "./src/schedule/candleAnalysisSchedule";
import { log } from "console";
import { eventHandlerFuture } from "./src/schedule";
const bybitService = new BybitService(
'dqGCPAJzLKoTRfgCMq',
'aDYziLWN2jvdWNuz4QhWrM1O65JZ5f1NtEUO',
false
);
function toTimestamp(strTime: string): number {
return new Date(strTime).getTime();
}
(async () => {
// await analyzeCandlesJob("ETHUSDT", "15", toTimestamp("2025-07-08 23:59:59"));
await analyzeCandlesJob("BTCUSDT", "15", undefined, toTimestamp("2025-07-16 22:14:59"));
// const balance = await bybitService.getBalance();
// console.log(balance.result.list[0].totalEquity);
})();