Ask The Brain for a trade and get back entry, stop-loss, and targets you can feed straight into your execution logic.
Python
JavaScript
cURL
import requests, jsonresponse = requests.post( "https://api.gigabrain.gg/v1/chat", headers={"Authorization": "Bearer gb_sk_..."}, json={ "message": "Should I long or short ETH right now? Check technicals, funding rates, and macro. Respond as JSON with: direction, entry_price, stop_loss, take_profit_1, take_profit_2, risk_reward_ratio, confidence, reasoning" }, timeout=600)setup = json.loads(response.json()["content"])print(f"{setup['direction']} ETH @ {setup['entry_price']}")print(f"Stop: {setup['stop_loss']} | TP1: {setup['take_profit_1']} | TP2: {setup['take_profit_2']}")print(f"R:R {setup['risk_reward_ratio']} | Confidence: {setup['confidence']}/10")
const res = await fetch("https://api.gigabrain.gg/v1/chat", { method: "POST", headers: { Authorization: "Bearer gb_sk_...", "Content-Type": "application/json", }, body: JSON.stringify({ message: "Should I long or short ETH right now? Check technicals, funding rates, and macro. Respond as JSON with: direction, entry_price, stop_loss, take_profit_1, take_profit_2, risk_reward_ratio, confidence, reasoning", }), signal: AbortSignal.timeout(600000),});const setup = JSON.parse((await res.json()).content);console.log(`${setup.direction} ETH @ ${setup.entry_price}`);console.log(`Stop: ${setup.stop_loss} | TP1: ${setup.take_profit_1} | TP2: ${setup.take_profit_2}`);console.log(`R:R ${setup.risk_reward_ratio} | Confidence: ${setup.confidence}/10`);
curl -X POST https://api.gigabrain.gg/v1/chat \ -H "Authorization: Bearer gb_sk_..." \ -H "Content-Type: application/json" \ -d '{"message": "Should I long or short ETH right now? Check technicals, funding rates, and macro. Respond as JSON with: direction, entry_price, stop_loss, take_profit_1, take_profit_2, risk_reward_ratio, confidence, reasoning"}'
The response comes back in the content field (not message). Add “Respond as JSON with:” to any query and specify the fields you want - the content field will contain parseable JSON instead of markdown.