How It Works:
Data Fetching:
Historical data for ETH/USDT is fetched via Binance API.
Data Preparation:
Past price windows are converted into Llama documents for indexing.
LlamaIndex Integration:
Using the SimpleKeywordTableIndex from LlamaIndex, documents are indexed and a simple prompt is queried to simulate market prediction or pattern detection.
Response Interpretation:
The language model's response provides insights or possible trends based on indexed price data.
Prerequisites:
Install the required libraries:
bash
Kodu kopyala
pip install pandas numpy llama-index requests
Sample Prompt Result:
A sample response might look like:
vbnet
Kodu kopyala
Prediction response from LlamaIndex:
Based on the trend from 2023-10-01 12:00 to 2023-10-01 17:00, the next price is expected to be $12