# Predictions Best

```
GET /v2/prediction/best
```

## Parameters

| Parameter        | Type    | Required | Description                                 |
| ---------------- | ------- | -------- | ------------------------------------------- |
| `asset`          | string  | Yes      | `BTC`, `ETH`, `SOL`, `XAU`, `SPYX`, `NVDAX` |
| `time_increment` | integer | Yes      | `300` (5min intervals)                      |
| `time_length`    | integer | Yes      | `86400` (24h forecast)                      |

## Request Example

{% code title="curl" %}

```bash
curl "https://api.synthdata.co/v2/prediction/best?asset=BTC&time_increment=300&time_length=86400" \
  -H "Authorization: Apikey YOUR_API_KEY"
```

{% endcode %}

## Response

```json
[
  {
    "miner_uid": 2,
    "start_time": 1769097780,
    "predictions": [
      [88975.00, 89012.45, 88934.21, ..., 87633.98],
      [88975.00, 89102.33, 89245.67, ..., 90256.12],
      ...
    ]
  }
]
```

| Field         | Description                                                               |
| ------------- | ------------------------------------------------------------------------- |
| `miner_uid`   | ID of the top-performing miner                                            |
| `start_time`  | Unix timestamp when prediction was generated                              |
| `predictions` | Array of 1,000 price paths, each with 289 points (24h at 5-min intervals) |

## Example: Quick Price Forecast

{% code title="example.py" %}

```python
import requests
import numpy as np

response = requests.get(
    "https://api.synthdata.co/v2/prediction/best",
    headers={"Authorization": "Apikey YOUR_API_KEY"},
    params={"asset": "BTC", "time_increment": 300, "time_length": 86400}
)

data = response.json()[0]
paths = data['predictions']
current_price = paths[0][0]
final_prices = [path[-1] for path in paths]

print(f"Current: ${current_price:,.0f}")
print(f"24h Median: ${np.median(final_prices):,.0f}")
print(f"24h 5th percentile: ${np.percentile(final_prices, 5):,.0f}")
print(f"24h 95th percentile: ${np.percentile(final_prices, 95):,.0f}")
print(f"Prob up: {sum(1 for p in final_prices if p > current_price) / len(final_prices):.1%}")
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.synthdata.co/endpoints-overview-1/predictions-best.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
