Getting Started (old)

Get up and running with Synth API in minutes.

What You'll Need

1

API Key

Get an API key from your Synth Dashboardarrow-up-right.

2

Make a Request

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

Parse the Response

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']

# Calculate probability
current_price = paths[0][0]
final_prices = [path[-1] for path in paths]
prob_up = sum(1 for p in final_prices if p > current_price) / len(final_prices)

print(f"Current: ${current_price:,.2f}")
print(f"24h Median: ${np.median(final_prices):,.2f}")
print(f"Prob up: {prob_up:.1%}")

Common Parameters

Parameter
Value
Description

asset

BTC, ETH, SOL, XAU, SPYX, NVDAX

Asset to forecast

time_increment

300

5-minute intervals

time_length

86400

24-hour forecast horizon

Last updated