alerts.v1.PriceAlertService
ListAlerts
ListAlerts lists the caller's alerts, newest first. Errors: - INVALID_ARGUMENT: malformed request or page token. - UNAVAILABLE: SERVICE_UNAVAILABLE; retry. - PERMISSION_DENIED: SUBACCOUNT_KEY_REFUSED. - UNAUTHENTICATED: missing or invalid credentials.
Request
curl --request POST \ \
--url 'https://api.testnet.polyester.com/alerts.v1.PriceAlertService/ListAlerts' \
--header 'Content-Type: application/json' \
--header 'Connect-Protocol-Version: 1' \
--data '{
"limit": 100,
"pageToken": "eyJvZmZzZXQiOjEwMH0",
"statuses": [
"ACTIVE"
],
"symbolId": 1
}'Responses
{
"alerts": [
{
"alertId": "1",
"armed": false,
"channels": [
"IN_APP"
],
"createdAt": "2025-01-01T00:00:00Z",
"direction": "ABOVE",
"priceSource": "LAST_PRICE",
"priceTicks": "61000250000000",
"referencePriceTicks": "61000250000000",
"revision": "1",
"status": "ACTIVE",
"symbolId": 1,
"triggeredAt": "2025-01-01T00:00:00Z",
"triggeredPriceTicks": "61000250000000",
"updatedAt": "2025-01-01T00:00:00Z"
}
],
"nextPageToken": "eyJvZmZzZXQiOjIwMH0"
}alerts.v1.ListAlertsRequestalerts.v1.ListAlertsResponseReturn only alerts in these states. Empty returns every state.
Return only alerts on this market. Zero returns every market.
Maximum number of alerts to return: default 50, max 200.
Opaque, keyset-backed and exclusive cursor from a previous response's next_page_token. It is bound to the caller, statuses and symbol_id; reuse it only with the same values.
Public alert ID.
Numeric spot market identifier; resolve its symbol with GetSpotConfig.
Price crossing the alert waits for.
Price the alert watches.
Alert price in quote units scaled by 1e9.
Price of price_source when the alert was created or last set again, in quote units scaled by 1e9.
True once the price has been seen on the far side of the alert price, so the next crossing fires the alert. False while an alert created past its alert price waits for the price to move back.
Current state of the alert.
Where the alert is delivered when it fires, in ascending enum order.
Revision of the alert, starting at 1. It increases with every change the caller makes; pass it as expected_revision to UpdateAlert.
When the alert was created.
When the caller last changed the alert.
When the alert fired. Omitted unless status is TRIGGERED.
Price that fired the alert, in quote units scaled by 1e9. Zero unless status is TRIGGERED.
Cursor for the next page. Empty when no more results exist.
| Key | HTTP status | Connect code | Error | When |
|---|---|---|---|---|
| unauthenticated | 401 | unauthenticated | Unauthenticated | Authentication required. |
| permission-denied | 403 | permission_denied | Permission Denied | Permission denied. |
| invalid-argument | 400 | invalid_argument | Invalid Argument | Invalid argument. |
| not-found | 404 | not_found | Not Found | Not found. |
| unavailable | 503 | unavailable | Unavailable | Service unavailable. |