Aggiunti nuovi script demo per i provider di mercato e rimosso codice obsoleto
This commit is contained in:
12
demos/api_market_providers.py
Normal file
12
demos/api_market_providers.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from dotenv import load_dotenv
|
||||
from app.api.tools import MarketAPIsTool
|
||||
|
||||
def main():
|
||||
api = MarketAPIsTool()
|
||||
prices_aggregated = api.get_historical_prices_aggregated("BTC", limit=5)
|
||||
for price in prices_aggregated:
|
||||
print(f"== [{price.timestamp}] {price.low:.2f} - {price.high:.2f} ==")
|
||||
|
||||
if __name__ == "__main__":
|
||||
load_dotenv()
|
||||
main()
|
||||
Reference in New Issue
Block a user