Field reference / trend
trend_duration_periods
Consecutive bars, including this one, that trend_direction has held its current value (a bar is a trading session on daily rows and a Mon-Sun week on weekly rows). Null when trend_direction is null.
| Level | Per stock, ETF and coin, one value per date |
| Type | integer |
| Can be null | No, whenever its section has data |
| Category | trend |
| Returned by | /v1/history, /v1/search |
Getting it
Its history for one ticker:
curl -G "https://api.tickerdb.com/v1/history" \
--data-urlencode 'tickers=AAPL' \
--data-urlencode 'fields=trend_duration_periods' \
--data-urlencode 'start=2025-01-01' \
-H "Authorization: Bearer YOUR_API_KEY"
Stocks matching it today:
curl -G "https://api.tickerdb.com/v1/search" \
--data-urlencode 'filters=[{"field":"trend_duration_periods","op":"gte","value":0}]' \
--data-urlencode 'fields=["ticker","trend_duration_periods"]' \
-H "Authorization: Bearer YOUR_API_KEY"
Related fields
Every field, with its type and values, is also in /v1/schema/fields.