Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.extractor.live/llms.txt

Use this file to discover all available pages before exploring further.

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}USDT pairs 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.
ValueDescriptionAuth required
portfolioMonitors total account balance value in USDYes (API key + secret)
marketMonitors individual asset spot pricesNo

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.
FieldTypeRequired
api_keystringYes (portfolio mode)
api_secretstringYes (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.
FieldTypeDefault
portfolio_conditionstring">> 5%"
See the Condition Syntax section for the full list of supported expressions. Examples:
ConditionBehaviour
>> 5%Alert once when portfolio changes by more than 5% since last check
> 10%Alert every check while portfolio has changed more than 10%
< 10000000Alert when portfolio value drops below $10,000,000
>> ++1000000Alert 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.
FieldTypeDefault
mock_account_datastring (JSON)null
Format:
{"balances": [{"asset": "BTC", "free": "100", "locked": "0"}]}

Market Mode

Monitored Assets

A list of assets and per-asset conditions evaluated against the current spot price (in USDT).
Sub-fieldTypeDefaultDescription
assetstringAsset symbol, e.g. BTC, ETH
conditionstring"> 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 configBehaviour
asset: BTC, condition: >> 10Alert 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.
FieldTypeDefaultRange
check_intervalint3006086400
  • Set to 3600 for hourly comparisons (price change over the last hour)
  • Set to 86400 for 24-hour comparisons (price change over the last day)
  • Minimum of 60 seconds 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

OperatorMeaning
>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

ModifierMeaningExample
(none)Absolute value comparison> 50000 — alert when value > 50,000
% suffixPercentage change since last check> 5% — alert when change > 5%
++ prefixPositive delta (increase)> ++1000 — alert when increase > 1,000
-- prefixNegative delta (decrease)> --500 — alert when decrease > 500
+ / - signExplicit 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

ExpressionBehaviour
> 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%
< 10000000Alert when value drops below 10,000,000
>> ++100000Alert once when value increases by more than 100,000
<< --50000Alert 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

Change magnitudeSeverity
≥ 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:
Current / ThresholdSeverity
< 25%Critical (0.75)
< 50%High (0.5)
< 75%Medium (0.25)
≥ 75%Low (0.15)

Market mode

Price change magnitudeSeverity
≥ 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

Event TypeModeTrigger
asterex.portfolio.condition_metPortfolioPortfolio condition expression evaluates to true
asterex.market.condition_metMarketPer-asset price condition evaluates to true

Alert Metadata

asterex.portfolio.condition_met

FieldDescription
current_valueCurrent portfolio value in USD (formatted, e.g. $1,234,567.89)
conditionThe condition expression that was met
previous_valuePortfolio value at the previous check (if available)
change_amountAbsolute USD change since last check (if available)
change_percentPercentage change since last check (if available)

asterex.market.condition_met

FieldDescription
assetAsset symbol (e.g. BTC)
symbolTrading pair (e.g. BTCUSDT)
current_priceCurrent asset price in USD
previous_pricePrice at the previous check (if available)
price_changePercentage change since last check (if available)
price_change_amountAbsolute USD change since last check (if available)
conditionThe condition expression that was met