Enhance documentation

This commit is contained in:
2025-09-26 04:11:04 +02:00
parent 148bff7cfd
commit 576d69921b
6 changed files with 53 additions and 38 deletions

View File

@@ -2,6 +2,10 @@ from coinbase.rest.types.product_types import Candle, GetProductResponse
class BaseWrapper:
"""
Interfaccia per i wrapper delle API di mercato.
Implementa i metodi di base che ogni wrapper deve avere.
"""
def get_product(self, asset_id: str) -> 'ProductInfo':
raise NotImplementedError
def get_products(self, asset_ids: list[str]) -> list['ProductInfo']:
@@ -12,6 +16,10 @@ class BaseWrapper:
raise NotImplementedError
class ProductInfo:
"""
Informazioni sul prodotto, come ottenute dalle API di mercato.
Implementa i metodi di conversione dai dati grezzi delle API.
"""
id: str
symbol: str
price: float
@@ -39,6 +47,10 @@ class ProductInfo:
return product
class Price:
"""
Rappresenta i dati di prezzo per un asset, come ottenuti dalle API di mercato.
Implementa i metodi di conversione dai dati grezzi delle API.
"""
high: float
low: float
open: float