POST /timeseries¶
Fetch historical time series data from any supported source.
Endpoint¶
Headers¶
| Header | Required | Description |
|---|---|---|
x-api-key |
Yes | Your Aurastream API key |
Content-Type |
Yes | application/json |
Request Body¶
{
"tickerlist": ["BTCUSDT", "ETHUSDT"],
"start": "2025-01-01",
"end": "2025-06-01",
"interval": "1d",
"source": "bybit",
"credentials": null,
"dtype": "bars",
"price_type": "A"
}
Parameters¶
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
tickerlist |
list[str] |
Yes | — | List of ticker symbols to fetch |
start |
str |
Yes | — | Start date in YYYY-MM-DD format |
end |
str |
Yes | — | End date in YYYY-MM-DD format |
interval |
str |
Yes | — | Bar interval (see Intervals) |
source |
str |
Yes | — | Data source identifier (see Data Sources) |
credentials |
dict or null |
No | null |
Source-specific credentials (see Credentials) |
dtype |
str |
No | "bars" |
Data type: "bars", "trades", "quotes", "funding", "orderbook" |
price_type |
str |
No | "A" |
Price type for Oanda: "A" (ask), "B" (bid), "M" (mid) |
Intervals¶
The interval parameter accepts these formats:
| Interval | Meaning | Examples |
|---|---|---|
1s, 5s, 30s |
Seconds | Bybit, Binance |
1m, 5m, 15m, 30m |
Minutes | Most sources |
1h, 4h |
Hours | Most sources |
1d |
Daily | All sources |
1w |
Weekly | Most sources |
1M |
Monthly | Some sources |
Interval support varies by source
Not every source supports every interval. See individual data source pages for supported intervals.
Data Types¶
dtype |
Description | Supported Sources |
|---|---|---|
"bars" |
OHLCV candlestick data (default) | All |
"trades" |
Individual trade records | Alpaca |
"quotes" |
Bid/ask quotes | Alpaca |
"funding" |
Funding rate data | Binance (perpetuals) |
"orderbook" |
Order book snapshots | Binance, Oanda |
Response¶
Success (200)¶
{
"BTCUSDT": {
"2025-01-01 00:00:00": {
"Open": 94500.0,
"High": 95200.0,
"Low": 93800.0,
"Close": 94900.0,
"Volume": 12345.67
},
"2025-01-02 00:00:00": {
"Open": 94900.0,
"High": 96100.0,
"Low": 94200.0,
"Close": 95800.0,
"Volume": 11234.56
}
}
}
The response is a nested dictionary:
Fields¶
| Field | Type | Description |
|---|---|---|
Open |
float |
Opening price |
High |
float |
Highest price |
Low |
float |
Lowest price |
Close |
float |
Closing price |
Volume |
float |
Trading volume |
Additional fields
Some sources return extra fields (e.g., VWAP, NTrades from Polygon). These are included alongside the standard OHLCV fields.
Error Responses¶
| Status | Meaning |
|---|---|
400 Bad Request |
Invalid parameters |
403 Forbidden |
Invalid or missing API key |
429 Too Many Requests |
Monthly allowance used up (Limit Exceeded) or requests too fast (Too Many Requests) |
500 Internal Server Error |
Upstream source error |
See Errors for messages and when to retry.
Examples¶
import requests
URL = "https://api.aurastream.unbiased-alpha.com/timeseries"
HEADERS = {"x-api-key": "YOUR_API_KEY"}
# Fetch daily gold data from Oanda
response = requests.post(URL, headers=HEADERS, json={
"tickerlist": ["XAU_USD"],
"start": "2025-01-01",
"end": "2025-06-01",
"interval": "1d",
"source": "oanda",
"credentials": {
"id": "YOUR_ACCOUNT_ID",
"token": "YOUR_TOKEN",
"environment": "practice"
}
})
data = response.json()
curl -X POST https://api.aurastream.unbiased-alpha.com/timeseries \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tickerlist": ["XAU_USD"],
"start": "2025-01-01",
"end": "2025-06-01",
"interval": "1d",
"source": "oanda",
"credentials": {
"id": "YOUR_ACCOUNT_ID",
"token": "YOUR_TOKEN",
"environment": "practice"
}
}'
Timeout¶
Requests have a 120-second timeout. For large date ranges or many tickers, consider splitting into smaller requests.