Lexor
Concepts

How Lexor Works

End-to-end flow from a token call in Telegram to trade execution on Solana mainnet.

The Full Flow

This is the full path from a contract address or ticker symbol posted in a Telegram group to a confirmed on-chain trade:

1. Alpha posted in Telegram group

2. @lexor_funbot detects the contract address (CA) or $TICKER symbol

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 optimal 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) — and $TICKER symbols (e.g., $BONK, $WIF). Ticker symbols are resolved to their corresponding Solana token address automatically using a reverse search that prioritizes trending tokens.

When it finds a match, 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 Solana DEXes (Raydium, Orca, Meteora, and others) and returns the optimal price for your trade size.

9–10: Signing & Execution

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

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.

This reduces signal delivery latency to under one second compared to multi-second polling intervals.

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