workflows.fit
Back to n8n workflows
n8n templateFreeBy Don Jayamaha Jr

Real-time OKX spot market data with GPT-4o & Telegram

Instantly access live OKX Spot Market data directly in Telegram! This workflow integrates the OKX REST v5 API with Telegram and optional GPT-4.1-mini formatting, delivering real-time insights such as latest prices, or...

CommunicationHITLDevelopmentCore NodesAILangchainLm Chat Open AiTelegram Trigger
Loading interactive preview...

Template notes

Instantly access live OKX Spot Market data directly in Telegram!

This workflow integrates the OKX REST v5 API with Telegram and optional GPT-4.1-mini formatting, delivering real-time insights such as latest prices, order book depth, candlesticks, trades, and mark prices β€” all in clean, structured reports.

---

πŸ”Ž How It Works

1. A Telegram Trigger node listens for incoming user commands. 2. The User Authentication node validates the Telegram ID to allow only authorized users. 3. The workflow creates a Session ID from chat.id to manage session memory. 4. The OKX AI Agent orchestrates data retrieval via HTTP requests to OKX endpoints:

Latest Price (/api/v5/market/ticker?instId=BTC-USDT) 24h Stats (/api/v5/market/ticker?instId=BTC-USDT) Order Book Depth (/api/v5/market/books?instId=BTC-USDT&sz=50) Best Bid/Ask (book ticker snapshot) Candlesticks / Klines (/api/v5/market/candles?instId=BTC-USDT&bar=15m) Average / Mark Price (/api/v5/market/mark-price?instType=SPOT&instId=BTC-USDT) Recent Trades (/api/v5/market/trades?instId=BTC-USDT&limit=100) 5. Utility tools refine the data:

Calculator β†’ spreads, % change, normalized volumes. Think β†’ reshapes raw JSON into clean text. Simple Memory β†’ stores sessionId, symbol, and state for multi-turn interactions. 6. A message splitter ensures Telegram output stays under 4000 characters. 7. Final results are sent to Telegram in structured, human-readable format.

---