Aster DEX Monitor
Overview
The Aster DEX Monitor tracks financial activity on the Aster DEX exchange. It supports two independent monitoring modes:
Portfolio mode β monitors the total USD value of an account's holdings, requiring API credentials
Market mode β monitors the spot price of one or more assets using public endpoints, no credentials required
Each mode evaluates a flexible condition expression on every check. An alert is fired only when the condition evaluates to true.
βΉοΈ To monitor both portfolio value and market prices simultaneously, create two separate detector instances β one in each mode.
β οΈ All prices are sourced as
{ASSET}USDTpairs from the Aster DEX public ticker endpoint. Assets without a USDT pair are skipped in portfolio valuation.
Monitoring Mode
Selects which data source and condition type to evaluate.
portfolio
Monitors total account balance value in USD
Yes (API key + secret)
market
Monitors individual asset spot prices
No
Portfolio Mode
API Key / API Secret
Credentials used to authenticate against the Aster DEX private account endpoint (/api/v1/account). Required only when monitoring_mode is portfolio.
Requests are signed using HMAC SHA256 with a timestamp, following the Binance-compatible API signature scheme.
api_key
string
Yes (portfolio mode)
api_secret
string
Yes (portfolio mode)
Portfolio Condition
A condition expression evaluated against the total account portfolio value in USD. An alert is sent when the condition is true.
portfolio_condition
string
">> 5%"
See the Condition Syntax section for the full list of supported expressions.
Examples:
>> 5%
Alert once when portfolio changes by more than 5% since last check
> 10%
Alert every check while portfolio has changed more than 10%
< 10000000
Alert when portfolio value drops below $10,000,000
>> ++1000000
Alert once when portfolio increases by more than $1,000,000
Mock Account Data (testing only)
Bypasses the /api/v1/account API call and uses a static JSON payload instead. Asset prices are still fetched from live public endpoints.
mock_account_data
string (JSON)
null
Format:
Market Mode
Monitored Assets
A list of assets and per-asset conditions evaluated against the current spot price (in USDT).
asset
string
β
Asset symbol, e.g. BTC, ETH
condition
string
"> 10"
Condition evaluated against the USDT price
Each asset is checked independently. A separate alert is emitted for each asset whose condition is met.
Examples:
asset: BTC, condition: >> 10
Alert once when BTC price changes by more than $10 since last check
asset: ETH, condition: > 5%
Alert every check while ETH has moved more than 5%
asset: BNB, condition: < -15%
Alert when BNB price drops more than 15%
Check Interval
Controls how often each monitor configuration is evaluated, in seconds. Each configuration can have its own independent interval, enabling different monitors to run at different frequencies.
check_interval
int
300
60 β 86400
Set to
3600for hourly comparisons (price change over the last hour)Set to
86400for 24-hour comparisons (price change over the last day)Minimum of
60seconds is enforced to avoid API rate limits
On startup, each monitor initialises its comparison baseline from 24 hours ago to avoid flooding alerts on first run.
Condition Syntax
Both portfolio_condition and per-asset condition fields share the same expression syntax.
Operators
>
Greater than (uses absolute value by default)
<
Less than (uses absolute value by default)
>=
Greater than or equal
<=
Less than or equal
=
Equals (exact match)
!=
Not equals
>>
Greater than β triggers once (edge detection)
<<
Less than β triggers once (edge detection)
Value Modifiers
(none)
Absolute value comparison
> 50000 β alert when value > 50,000
% suffix
Percentage change since last check
> 5% β alert when change > 5%
++ prefix
Positive delta (increase)
> ++1000 β alert when increase > 1,000
-- prefix
Negative delta (decrease)
> --500 β alert when decrease > 500
+ / - sign
Explicit sign; disables absolute value handling
> -15 β alert when value is greater than β15
Modifiers can be combined: >> ++25% β alert once when the percentage increase exceeds 25%.
Once Operators (>> / <<)
>> / <<)The >> and << operators implement edge detection β the alert fires only on the transition from false to true. Once triggered, the condition must return to false before it can fire again.
Use > / < if you want an alert every check while the condition holds.
Examples
> 5%
Alert every check while change > 5% (absolute)
>> 5%
Alert once when change > 5%, then wait for it to recover
< -15%
Alert when price drops more than 15%
< 10000000
Alert when value drops below 10,000,000
>> ++100000
Alert once when value increases by more than 100,000
<< --50000
Alert once when value decreases by more than 50,000
Severity
Severity is automatically calculated based on the magnitude of the change. It is not a user-configurable field.
Portfolio mode
β₯ 50%
Critical (0.75)
β₯ 25%
High (0.5)
β₯ 10%
Medium (0.25)
< 10%
Low (0.15)
For absolute value conditions, severity is derived from the ratio of the current value to the threshold:
< 25%
Critical (0.75)
< 50%
High (0.5)
< 75%
Medium (0.25)
β₯ 75%
Low (0.15)
Market mode
β₯ 50%
Critical (0.75)
β₯ 25%
High (0.5)
β₯ 10%
Medium (0.25)
< 10%
Low (0.15)
If no previous price is available (first check), severity defaults to Medium (0.25).
Alert Types
asterex.portfolio.condition_met
Portfolio
Portfolio condition expression evaluates to true
asterex.market.condition_met
Market
Per-asset price condition evaluates to true
Alert Metadata
asterex.portfolio.condition_met
asterex.portfolio.condition_metcurrent_value
Current portfolio value in USD (formatted, e.g. $1,234,567.89)
condition
The condition expression that was met
previous_value
Portfolio value at the previous check (if available)
change_amount
Absolute USD change since last check (if available)
change_percent
Percentage change since last check (if available)
asterex.market.condition_met
asterex.market.condition_metasset
Asset symbol (e.g. BTC)
symbol
Trading pair (e.g. BTCUSDT)
current_price
Current asset price in USD
previous_price
Price at the previous check (if available)
price_change
Percentage change since last check (if available)
price_change_amount
Absolute USD change since last check (if available)
condition
The condition expression that was met
Last updated