This commit is contained in:
KienVT9 2025-07-16 15:37:26 +07:00
parent 9cde60bb9c
commit c35d84cf07
11 changed files with 2109 additions and 68 deletions

21
test.ts
View file

@ -7,10 +7,11 @@ import {
isPinBar,
} from "./src/helpers/candles";
import { analyzeCandlesJob } from "./src/schedule/candleAnalysisSchedule";
import { log } from "console";
const bybitService = new BybitService(
process.env.BYBIT_API_KEY!,
process.env.BYBIT_API_SECRET!,
'dqGCPAJzLKoTRfgCMq',
'aDYziLWN2jvdWNuz4QhWrM1O65JZ5f1NtEUO',
false
);
@ -20,5 +21,19 @@ function toTimestamp(strTime: string): number {
(async () => {
// await analyzeCandlesJob("ETHUSDT", "15", toTimestamp("2025-07-08 23:59:59"));
await analyzeCandlesJob("ETHUSDT", "15");
// await analyzeCandlesJob("ETHUSDT", "15");
// const res = await bybitService.createOrder({
// category: "linear",
// symbol: "ETHUSDT",
// side: "Buy",
// orderType: "Limit",
// price: "3146.81",
// qty: "1",
// takeProfit: "3200",
// stopLoss: "3000",
// });
// console.log(res);
const balance = await bybitService.getBalance();
console.log(balance.result.list[0].totalEquity);
})();