Build trading strategies using natural language and LLMs
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.
curl -X POST https://api.production.hyperoru.com/api/prompts \ -H "Authorization: Bearer $TOKEN" \ -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." }'
Use the HyperAI agent to help write prompts by describing your strategy in plain language:
curl -X POST https://api.production.hyperoru.com/api/hyper-ai/chat \ -H "Authorization: Bearer $TOKEN" \ -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.