triggers.v1.TriggersService
ListTriggerEvents
List trigger events (append-only history). A trigger the caller cannot read (no such trigger, another account's, or one outside the selected sub-account) answers NOT_FOUND, as GetTrigger does. A trigger the caller can read that has no event yet answers an empty list.
Request
curl --request POST \ \
--url 'https://api.testnet.polyester.com/triggers.v1.TriggersService/ListTriggerEvents' \
--header 'Content-Type: application/json' \
--header 'Connect-Protocol-Version: 1' \
--data '{
"eventType": "EVENT_FIRED",
"limit": 100,
"pageToken": "eyJvZmZzZXQiOjEwMH0",
"subaccountId": "6789012345678",
"triggerId": "9155001234567"
}'Responses
{
"events": [
{
"cancelReason": "TRIGGER_CANCEL_REASON_USER_REQUEST",
"childOrderId": "9876543210123",
"childSeq": 1,
"eventType": "EVENT_FIRED",
"firePriceTicks": "61000250000000",
"fireRefusalReason": "TRIGGER_FAILURE_REASON_UNKNOWN_SYMBOL",
"subaccountId": "6789012345678",
"symbolId": 1,
"triggerId": "9155001234567",
"triggerType": "STOP_LOSS",
"tsNs": "1735689600000000000"
}
],
"nextPageToken": "eyJvZmZzZXQiOjIwMH0"
}triggers.v1.ListTriggerEventsRequesttriggers.v1.ListTriggerEventsResponseTrigger ID to list events for.
Optional public subaccount ID. When omitted, subaccount-scoped API keys use their bound subaccount; other callers use their authenticated root account.
Maximum number of events to return. Defaults to 100 when omitted; maximum is 1000.
Optional event category filter. When unspecified, returns all event categories. Use EVENT_FIRED to enumerate child-order actions.
Opaque keyset cursor from a previous response. The cursor is exclusive and bound to the authenticated account, trigger, sub-account scope, event filter, and newest-first sort order.
Trigger ID associated with the event.
Public account or sub-account ID associated with the trigger.
Trading symbol numeric identifier.
Trigger type at the time of the event.
Event category.
Event timestamp in nanoseconds since epoch (UTC).
Child sequence number for multi-child trigger strategies.
Child order ID created by this event, if any.
Price that fired the trigger: for a stop-loss or take-profit, the price that crossed its trigger price; for a trailing stop, its trailing trigger threshold when it fired; for a ladder, the level's price. A market child order's slippage cap is measured from it. In quote units scaled by 1e9. Absent for time-scheduled triggers such as TWAP.
Why an admitted trigger was canceled.
Why an admitted trigger failed.
Why the attempt named by child_seq was refused while the trigger stayed live. Set only on EVENT_FIRE_REFUSED; other event types leave it unset.
Opaque 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. |