Getting started
Get up and running with Synth API in minutes.
What You'll Need
1
API key
Get an API key from you Synth Dashboard.
2
3
Parse the Response
import requests
import numpy as np
headers = {"Authorization": "Apikey YOUR_API_KEY"}
params = {
"asset": "BTC",
"time_increment": 300,
"time_length": 86400,
"limit": 10
}
response = requests.get(
"https://api.synthdata.co/v2/prediction/latest",
headers=headers,
params=params
)
predictions = response.json()
# Aggregate all paths
all_paths = []
for miner in predictions:
all_paths.extend(miner['predictions'])
# Calculate probability
final_prices = [path[-1] for path in all_paths]
current_price = all_paths[0][0]
prob_above_100k = sum(1 for p in final_prices if p > 100000) / len(final_prices)
print(f"Current: ${current_price:,.2f}")
print(f"Prob >$100k: {prob_above_100k:.1%}")Common Parameters
asset- BTC, ETH, SOL, XAU, etc.time_increment- 300 (5min) or 60 (1min)time_length- 86400 (24h) or 3600 (1h)
Ready to begin? Start with Authentication.
Last updated