getPriceRules
Retrieve all price alert rules for the authenticated user.
Parameters
Number of records to return (pagination)
Filter conditions for price rules
Response
Paginated connection of price rules
Description of what the rule does
The trading instrument this rule monitors
Whether the rule is currently active
Timestamp when the rule was last triggered
Price at which the rule was last triggered
notificationChannel
NotificationChannelType!
required
How to notify when the rule triggers. Values:
none - No notification
sms - SMS message
email - Email notification
webhook - HTTP webhook
telegram - Telegram message
push_notification - Push notification
conditions
Connection<PriceCondition>
The conditions that trigger this ruleShow PriceCondition fields
Type of condition:
PricePercentage - Price change by percentage
Price - Absolute price level
PriceAction - Price movement pattern
PriceCrossover - Price crossing a threshold
TechnicalIndicator - Technical analysis indicator
The threshold value for the condition
Additional configuration data for the condition
activationLogs
Connection<PriceRuleTriggerLog>
History of when this rule was triggered
When the rule was created
Examples
query GetMyRules {
priceRules(first: 50) {
nodes {
id
name
description
isEnabled
instrument {
symbol
name
}
notificationChannel
lastTriggeredAt
lastTriggeredPrice
conditions {
nodes {
conditionType
value
}
}
}
totalCount
}
}
getPriceRule
Retrieve a single price rule by ID for the authenticated user.
Parameters
The unique identifier of the price rule
Response
The requested price rule (see fields above)
Example
query GetSingleRule {
priceRule(id: "550e8400-e29b-41d4-a716-446655440000") {
id
name
description
isEnabled
instrument {
id
symbol
name
baseAsset
quoteAsset
}
conditions {
nodes {
conditionType
value
additionalValues
}
}
notificationChannel
lastTriggeredAt
lastTriggeredPrice
createdAt
}
}