Exponential Moving Average (EMA)
REST
Stocks
Exponential Moving Average (EMA)
Endpoint
http
GET /v1/indicators/ema1
Example
http
GET /v1/indicators/ema?symbol=600519.SH&window=50×pan=day&limit=101
Request examples
Adjust parameters below to generate Shell / Python / JavaScript / Go request snippets and a Python client example.
Parameters
Request code
import os
import requests
r = requests.get(
"https://api.aeolus-ai.com/v1/indicators/ema",
params={
"symbol": "600519.SH",
"timespan": "day",
"adjusted": true,
"window": 50,
"series_type": "close",
"order": "desc",
"limit": 10,
},
headers={"Authorization": f"Bearer {os.environ['AEOLUS_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())Description
Retrieve the Exponential Moving Average (EMA) for one or more tickers over a defined time range. The EMA places greater weight on recent prices, enabling quicker trend detection and more responsive signals.
Use cases: Trend identification, EMA crossover signals, dynamic support/resistance levels, and adjusting strategies based on recent market volatility.
Multiple symbols return one series per symbol in results[].
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
symbol | string | Yes | — | Ticker with exchange suffix, e.g. 600519.SH. Comma-separated for multiple symbols. |
timestamp | string | No | — | Query by timestamp: YYYY-MM-DD or Unix milliseconds. |
timespan | string | No | day | Aggregate window. v1 supports day only. |
adjusted | boolean | No | true | Whether the price series is split-adjusted. |
window | integer | No | 50 | EMA window (e.g. 10 with day → 10-day EMA). |
series_type | string | No | close | Price field: open, high, low, or close. |
expand_underlying | boolean | No | false | If true, include computation metadata (see response). |
order | string | No | desc | Sort by timestamp: asc or desc. |
limit | integer | No | 10 | Max points returned (max 5000). |
timestamp.gte | string | No | — | Range filter: timestamp ≥ value. |
timestamp.gt | string | No | — | Range filter: timestamp > value. |
timestamp.lte | string | No | — | Range filter: timestamp ≤ value. |
timestamp.lt | string | No | — | Range filter: timestamp < value. |
Response Attributes
Top level
| Field | Type | Description |
|---|---|---|
status | string | OK for single symbol; PARTIAL when any symbol has empty values in a multi-symbol request. |
request_id | string | Server-assigned request ID. |
results | object / array | Object for one symbol; array for multiple symbols. |
resultsCount | integer | Multi-symbol only: number of symbols. |
Single symbol · results object
| Field | Type | Description |
|---|---|---|
values | array | { timestamp, value } series. |
underlying | object | When expand_underlying=true; see below. |
underlying object (expand_underlying=true)
| Field | Type | Description |
|---|---|---|
series_type | string | Price field used, e.g. close. |
adjusted | boolean | Whether the adjusted series was used. |
Multi-symbol · each results[] item
| Field | Type | Description |
|---|---|---|
symbol | string | Requested ticker. |
resultsCount | integer | Length of values for this symbol. |
values | array | Same item shape as single-symbol values. |
underlying | object | When expand_underlying=true; same shape as above. |
values[] item
| Field | Type | Description |
|---|---|---|
timestamp | integer | Unix milliseconds. |
value | number | EMA at that timestamp. |
Sample Response
Single symbol
json
{
"status": "OK",
"request_id": "a47d1beb-8c11-4b6a-897a-b76cdbbf35a3",
"results": {
"values": [
{
"timestamp": 1704124800000,
"value": 1682.45
}
]
}
}1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
Multiple symbols
json
{
"status": "PARTIAL",
"request_id": "a47d1beb-8c11-4b6a-897a-b76cdbbf35a3",
"resultsCount": 2,
"results": [
{
"symbol": "600519.SH",
"resultsCount": 10,
"values": [
{ "timestamp": 1704124800000, "value": 1682.45 }
],
"underlying": { "series_type": "close", "adjusted": true }
},
{
"symbol": "000001.SZ",
"resultsCount": 0,
"values": []
}
]
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Data notes
- Valid
symbolwith no points in range → HTTP 200 andvalues: [](not404). - Multi-symbol with partial empties →
PARTIAL.
Errors
| Code | HTTP | When |
|---|---|---|
INVALID_SYMBOL | 400 | Unknown or malformed symbol |
INVALID_PARAMETER | 400 | Invalid parameter |
UNAUTHORIZED | 401 | Invalid API key |
INSUFFICIENT_CREDITS | 402 | Account temporarily unavailable (check console) |
PLAN_LIMIT | 403 | Exceeds current account scope |
INTERNAL_ERROR | 500 | Server error |
Full list: Errors.