> For the complete documentation index, see [llms.txt](https://xemlok.gitbook.io/xemlok-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xemlok.gitbook.io/xemlok-docs/ai-model-and-logic/token-analysis-flow.md).

# Token Analysis Flow

{% hint style="info" %}
"Fast markets punish hesitation. Xemlok helps you understand movement instantly — not eventually."
{% endhint %}

Xemlok analyzes tokens through a fast, structured flow designed to extract meaningful behavior from noisy, real-time data. Instead of reading raw charts, the extension turns market activity into clean analytical signals the moment a token loads.

{% stepper %}
{% step %}

### Trigger Event

Token analysis starts when:

* a token page is opened
* the contract changes
* the floating window requests a refresh
* the user presses *Analyze Token*
  {% endstep %}

{% step %}

### Data Collection Layer

Xemlok gathers several types of token-related signals:

#### A. Chart Behavior

* candle size changes
* wick-to-body ratio shifts
* acceleration or slowdown
* irregular sequences

#### B. Liquidity Signals

* current liquidity levels
* inflow/outflow trends
* liquidity strength
* sudden drops or divergence

#### C. Market Context

* micro vs macro trend
* stability of movement
* presence of manipulation patterns

"Charts show price. Behavior shows intent."
{% endstep %}

{% step %}

### Data Types Used in Analysis

| Category        | Examples                   | Purpose                   |
| --------------- | -------------------------- | ------------------------- |
| Chart Data      | candles, wicks, volatility | detect movement behavior  |
| Liquidity       | inflow/outflow, strength   | evaluate market stability |
| Pattern Signals | irregular shapes, spikes   | identify manipulation     |
| {% endstep %}   |                            |                           |

{% step %}

### Data Normalization

Xemlok converts raw values into tags such as:

* `volatility: high`
* `liquidity_direction: negative`
* `pattern: irregular`
* `momentum_state: unstable`
  {% endstep %}

{% step %}

### Structured Prompt Creation

A structured dataset is generated, for example: Volatility: High\
Liquidity Trend: Downward\
Irregularities: Present\
Movement: Rapid rejection
{% endstep %}

{% step %}

### AI Processing Phase & Result Formatting

The AI evaluates:

* risk indicators
* pattern integrity
* market irregularities
* volatility phases
* liquidity pressure

Output includes:

* **risk level**
* **summary**
* **detailed notes**
* **recommended action**

"Speed matters. Xemlok completes the entire analysis in under a second."
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://xemlok.gitbook.io/xemlok-docs/ai-model-and-logic/token-analysis-flow.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
