Find when a condition was true
query_historyFind every past moment a condition was true, newest first, each with what was knowable then and the path that followed. Reach for this when the condition can be stated; to search by the shape of the move instead, use find_analogs. A condition is one fact the bars can answer, written in words: the price level ('under 100k', 'above 7,000'), a move over an hour, a day or three days ('fell 10% in a day', 'rose 5% in an hour'), how far below the 7-day high ('20% below its high'), or how loud the day was against its month ('this volatile', 'quiet'). 'crashed' and 'rallied' are read as a 10% day. The wording around those facts is free; the facts are not — anything else comes back refused with the list rather than guessed at, and list_coverage carries the same list. The response carries how the condition was understood, so the reading can be checked before the moments are trusted. A run of bars that all meet the condition counts once, at the first, and every value is measured on bars that had closed by that moment. asset takes a symbol from list_coverage. A call costs one answer for every ten moments.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | The condition, in words, e.g. 'fell 10% in a day' | |
| asset | No | Asset symbol, e.g. BTC. list_coverage lists them. | BTC |
| limit | No | How many moments to return. One answer per ten. |