-
Notifications
You must be signed in to change notification settings - Fork 19
Description
So here's what I got in my terminal:
[BOT] [06:30:28.881] 💥 Liquidation: ZECUSDT BUY 0.323
[WEB] VWAP calculation error for METAUSDT: Error: Total volume is zero, cannot calculate VWAP
[WEB] at VWAPService.calculateVWAP (src\lib\services\vwapService.ts:42:13)
[WEB] at VWAPService.getVWAP (src\lib\services\vwapService.ts:69:25)
[WEB] at async GET (src\app\api\vwap[symbol]\route.ts:35:18)
[WEB] 40 |
[WEB] 41 | if (sumVolume === 0) {
[WEB] > 42 | throw new Error('Total volume is zero, cannot calculate VWAP');
[WEB] | ^
[WEB] 43 | }
[WEB] 44 |
[WEB] 45 | return sumPriceVolume / sumVolume;
[WEB] Failed to fetch VWAP data: Error: Total volume is zero, cannot calculate VWAP
[WEB] at VWAPService.calculateVWAP (src\lib\services\vwapService.ts:42:13)
[WEB] at VWAPService.getVWAP (src\lib\services\vwapService.ts:69:25)
[WEB] at async GET (src\app\api\vwap[symbol]\route.ts:35:18)
[WEB] 40 |
[WEB] 41 | if (sumVolume === 0) {
[WEB] > 42 | throw new Error('Total volume is zero, cannot calculate VWAP');
[WEB] | ^
[WEB] 43 | }
[WEB] 44 |
[WEB] 45 | return sumPriceVolume / sumVolume;
The liquidation event for ZECUSDT should have triggered a long order for my settings, however it didn't.