Getting Started (old)
Get up and running with Synth API in minutes.
What You'll Need
2
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
Last updated