Spaces:
Build error
Build error
Download test_fetch.py from leovean/Forex-AI-Analyst: direct link, hf CLI and curl.
- Browser
- Download file 510 Bytes
-
https://huggingface.co/spaces/leovean/Forex-AI-Analyst/resolve/main/test_fetch.py
- Command line
-
hf download hf://spaces/leovean/Forex-AI-Analyst/test_fetch.py
-
curl -L -o test_fetch.py https://huggingface.co/spaces/leovean/Forex-AI-Analyst/resolve/main/test_fetch.py
510 Bytes
| from src.data.fetcher import DataFetcher | |
| # Test Yahoo Finance pair | |
| print("Testing Yahoo Finance (EUR/USD)...") | |
| df = DataFetcher.fetch_data("EUR/USD", period="5d", interval="1h") | |
| print(df.head()) | |
| # Test Deriv synthetic (requires credentials) | |
| print("\nTesting Deriv (Volatility 75)...") | |
| df_deriv = DataFetcher.fetch_data("Deriv Volatility 75 Index", period="7d", interval="1h") | |
| if df_deriv.empty: | |
| print("No data returned - check Deriv credentials or network.") | |
| else: | |
| print(df_deriv.head()) |