Skip to content

Error Calculating VWAP seems to be interrupting placing orders #88

@Exodus4400

Description

@Exodus4400

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions