Annotation for the specified indicator and returns the created object with its assigned id.
Path parameters
The indicator’s unique identifier. Must be a valid MongoDB ObjectId (24-character hex string).
Request body
Axis the annotation is drawn on.
xaxis— a vertical reference line at an x-axis position (use a datetimevalue)yaxis— a horizontal reference line at a y-axis position (use a numericvalue)
Position of the annotation line.
- For
xaxis: an ISO 8601 datetime string (e.g.,"2024-06-01T00:00:00Z"). - For
yaxis: a numeric value (e.g.,1500.0).
T are parsed as datetimes; other strings are parsed as floats.Human-readable label displayed next to the annotation line on the chart.
CSS hex color for the annotation line (e.g.,
"#FF5733").Dash pattern for the annotation line.
0 renders a solid line. Positive integers set the dash length in pixels.Opacity of the annotation line, from
0.0 (transparent) to 1.0 (fully opaque).Response
Returns the createdAnnotation object, including the server-assigned id and indicator_id.
Unique identifier assigned to the new annotation.
The ObjectId of the indicator this annotation belongs to.
xaxis or yaxis, as provided.Parsed annotation position. Datetime strings are normalized to ISO 8601.
Annotation label.
Hex color of the annotation line.
Dash length in pixels.
0 = solid.Line opacity between
0.0 and 1.0.Error responses
| Status | Description |
|---|---|
400 Bad Request | indicator_id is not a valid ObjectId, or value cannot be parsed. |
Examples
Example response
200