vtpy.error Package

Error Handling

The vtpy.error package contains exception classes for error handling.

VTSRequestError

exception vtpy.error.error.VTSRequestError(message: str, error_id: ErrorCode)[source]

Bases: Exception

Usage Example

from vtpy.error import VTSRequestError

try:
    await vts.request_statistics(StatisticsRequestData())
except VTSRequestError as e:
    print(f"Error: {e.message}")
    print(f"Error ID: {e.error_id}")