Panther AI
Last updated
Last updated
What it is:
This script is a more complex Discord bot compared to the Truffle Hog scanner. Its core function is to act as an interface between cryptocurrency market data and a Large Language Model (LLM) hosted on Hugging Face.
Here's the flow:
A user in Discord sends a command like !analyze BTC or !prompt ETH Summarize the key risks.
The bot fetches current snapshot data for the requested asset (like price, funding rate, open interest, 24h volume) from the Hyperliquid exchange's API.
It also fetches recent historical price data (candles) from the OKX exchange.
If available, it calculates basic technical indicators (RSI and OBV) on the historical data.
It bundles the snapshot data and the calculated indicators into a text summary.
It takes this data summary and combines it with either a default instruction ("summarize bullish/bearish factors, give a bias") or the user's custom instruction from the !prompt command.
It sends this combined text as a prompt to a specific LLM (Mistral-7B-Instruct-v0.2) via the Hugging Face Inference API.
It receives the text generated by the LLM in response.
It formats this LLM response, along with the data it used, into a Discord message (an embed) and sends it back to the channel where the command was issued.
Essentially, it's a tool to quickly get an AI's textual interpretation of a specific crypto asset's current market state, based on predefined data points. It doesn't trade or make predictions itself; it queries an external AI for analysis based on the data it gathers.