Skip to main content
Prompt strategies let you define trading logic in natural language. At execution time, Hyperoru injects live market context into your template and sends it to an LLM, which returns a structured trading decision.

How it works

  1. A trigger (signal or schedule) fires
  2. The system loads the prompt template and replaces variables with live data
  3. The enriched prompt is sent to the trader’s configured LLM
  4. The LLM response is parsed into a structured trading decision
  5. The decision is validated, risk-checked, and executed

Creating a prompt

curl -X POST https://api.hyperoru.com/api/prompts \
  -H "Content-Type: application/json" \
  -d '{
    "name": "BTC Trend Follower",
    "content": "You are a cryptocurrency trader. Analyze the current market data and decide whether to open a position.\n\nCurrent prices:\n{market_prices}\n\nRecent market snapshots:\n{sampling_data}\n\nOpen positions:\n{open_positions}\n\nMarket regime: {market_regime}\n\nRespond with a JSON object containing: operation (long/short/hold), symbol, leverage, take_profit_pct, stop_loss_pct, and reasoning.",
    "user_id": "your-user-id"
  }'

Template variables

Use these placeholders in your prompt content. They are replaced with live data at execution time.
VariableContent
{market_prices}Current bid/ask prices for all watchlist symbols
{sampling_data}Rolling window of market snapshots from the sampling pool
{trigger_context}Metadata about the signal or schedule that triggered execution
{open_positions}Active positions with entry price, size, unrealized PnL
{recent_trades}Recent trade history for context on past decisions
{market_regime}Current regime classification (trending, ranging, volatile, calm)
{news_context}Latest AI-classified news summaries
{kline_data}Recent candlestick data at the configured timeframe
{technical_indicators}RSI, MACD, Bollinger Bands, and other computed indicators
You don’t need to use every variable. Include only the context relevant to your strategy. Smaller prompts are faster and cheaper to execute.

Binding prompts to traders

Connect a prompt to a trader via a binding. The binding specifies the trigger type:
curl -X POST https://api.hyperoru.com/api/bindings \
  -H "Content-Type: application/json" \
  -d '{
    "trader_id": "trader-uuid",
    "prompt_id": "prompt-uuid",
    "trigger_type": "signal",
    "signal_pool_id": "pool-uuid",
    "symbols": ["BTC", "ETH"]
  }'

AI-assisted prompt creation

Use the HyperAI agent to help write prompts by describing your strategy in plain language:
curl -X POST https://api.hyperoru.com/api/hyper-ai/chat \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Create a prompt strategy that buys BTC when RSI is below 30 and the market regime is trending up, with 3x leverage and 5% take profit"
  }'
HyperAI generates a complete prompt template with the appropriate variables and response format.

Prompt design tips

Be specific about output format

Always specify the exact JSON fields you expect in the response. LLMs produce more reliable structured output when the format is explicit.

Include reasoning

Ask the LLM to explain its reasoning. This creates an audit trail and helps you identify when the model misinterprets data.

Set clear boundaries

Define what the model should NOT do — e.g., “Never use leverage above 5x” or “Only trade BTC and ETH.”

Test with backtesting

Use prompt backtesting to evaluate how your prompt would have performed on historical data.