Lexor Docs
Concepts

How Lexor Works

The complete end-to-end flow — from a token being called in Telegram to you executing a trade on Solana mainnet.

The Full Flow

Here's what happens from the moment someone posts a contract address in your Telegram group to the moment the trade is confirmed on-chain:

1. Alpha posted in Telegram group

2. @lexor_funbot detects the contract address (CA)

3. Lexor backend logs the call (token, group, caller, timestamp)

4. Codex API fetches live on-chain data for the token
   (price, market cap, liquidity, holders, volume, buy/sell pressure)

5. WebSocket pushes the signal to your dashboard in real-time

6. Signal card appears in your feed — live data updating continuously

7. You click APE on the signal card

8. Jupiter Ultra API calculates the best swap route

9. Your embedded Privy wallet signs the transaction

10. Transaction broadcast to Solana mainnet (~400ms confirmation)

11. Trade recorded in Lexor — your Holdings panel updates

Step by Step

1–2: Signal Detection

@lexor_funbot is a Telegram bot that silently listens in every group it's been added to. It scans every message for Solana contract addresses — the alphanumeric strings that identify SPL tokens on-chain (e.g., EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v).

When it finds one, it records:

  • The token contract address
  • Which group the message was posted in
  • The Telegram user who posted it (the "caller")
  • The exact timestamp

3–4: Data Enrichment

Immediately after a call is logged, the backend fetches live on-chain data for the token from the Codex API — a real-time blockchain data provider. This gives Lexor the current price, market cap, liquidity pool depth, holder count, and 24-hour trading statistics.

This data snapshot is stored with the call record and is what populates the signal card fields when it first appears.

5–6: Real-Time Push

Lexor uses WebSocket push (not polling) to deliver signals to your browser. When a new signal is ready, the backend emits it over the /call WebSocket namespace to all connected users who are monitoring that group. Your dashboard receives it and inserts the new signal card at the top of the grid — without any page refresh.

After the initial push, live price updates continue to stream over the /token WebSocket namespace. Every card in your grid stays live, flashing green or red as prices move.

7–8: Jupiter Routing

When you click APE, Lexor calls the Jupiter Ultra API to compute the optimal swap route from your input token (SOL or USDC) to the target token. Jupiter aggregates liquidity across all major Solana DEXes — Raydium, Orca, Meteora, and others — and returns the best available price for your trade size.

9–10: Signing & Execution

The swap transaction is signed by your embedded Privy wallet. This happens seamlessly in the background — there's no manual approval popup. Once signed, the transaction is broadcast to Solana mainnet. With Solana's ~400ms block time, confirmation is fast.

11: Recording

After confirmation, Lexor records the trade in your account:

  • What token you bought or sold
  • How many tokens
  • The USD value of the trade at execution time
  • The price at execution

This is the data that powers your Holdings Panel — your live balances, unrealized PnL, and trade history.

Why WebSocket, Not Polling?

Most apps fetch data by polling — making a request every few seconds to check for updates. This introduces a delay of up to poll_interval seconds between when something happens and when you see it.

Lexor uses WebSocket push: the server sends data to your browser the instant it's available. When someone posts a CA in your group, your dashboard receives the signal in under a second. When a token price updates, your card reflects it immediately.

In fast-moving markets, this difference matters.

Multi-Group Aggregation

Lexor aggregates signals from all your selected groups into a single view. You don't need to monitor 10 separate Telegram chats — they all funnel into one dashboard. Each signal card tells you which group and caller it came from, so you always have full context.

On this page