Update Price Alert¶
Updates an existing price alert for the current user.
PUT
https://{some_domain}/price_alert
Authorization¶
All requests must include a JWT token:
Authorization: <JWT_TOKEN>
This endpoint is available only for a client user session. The server takes login from the JWT session.
Request¶
Content-Type: application/json
Body Parameters¶
Same as create request, plus:
| Field | Type | Required | Description |
|---|---|---|---|
id |
int64 | Yes | Alert identifier |
status |
int | No | New alert status |
Notes¶
If an alert is reactivated by setting status = 0 (Active), the server resets runtime trigger state. For expired alerts you should also update expires_at to 0 or a future timestamp.
Field requirements are the same as for create:
- level/crossing conditions require
target_price > 0 - channel conditions require
channel_low < channel_high - moving conditions require
move_threshold > 0
Response¶
Success (200)¶
{
"structure": ["id"],
"rows": [
[101]
]
}
Error Responses¶
| Code | Error | Description |
|---|---|---|
| 400 | INVALID_DATA |
Validation failed |
| 400 | INVALID_TARGET_PRICE |
Missing or invalid target_price for level/crossing condition |
| 400 | INVALID_CHANNEL |
Invalid channel bounds |
| 400 | INVALID_MOVE_THRESHOLD |
Invalid movement threshold |
| 400 | INVALID_EXPIRES_AT |
Expiration is in the past |
| 403 | PERMISSION_DENIED |
Alert belongs to another user |
| 404 | NOT_FOUND |
Alert not found |