Copy
POST /v1/chat
Get a Trade Setup
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
Copy
import requests, json
response = 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")
Copy
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`);
Copy
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"}'
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.
Find Squeeze Setups
Scan for tokens where positioning is extreme and a liquidation cascade could trigger a move.- Python
- JavaScript
Copy
response = requests.post(
"https://api.gigabrain.gg/v1/chat",
headers={"Authorization": "Bearer gb_sk_..."},
json={
"message": "Find tokens with extreme funding rates and crowded positioning that could squeeze. Respond as JSON array with: symbol, funding_rate, open_interest, long_short_ratio, squeeze_direction, liquidation_risk, catalyst"
},
timeout=600
)
squeezes = json.loads(response.json()["content"])
for s in squeezes:
print(f"{s['symbol']}: {s['squeeze_direction']} squeeze, funding {s['funding_rate']}")
Copy
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: "Find tokens with extreme funding rates and crowded positioning that could squeeze. Respond as JSON array with: symbol, funding_rate, open_interest, long_short_ratio, squeeze_direction, liquidation_risk, catalyst",
}),
signal: AbortSignal.timeout(600000),
});
const squeezes = JSON.parse((await res.json()).content);
squeezes.forEach((s) =>
console.log(`${s.symbol}: ${s.squeeze_direction} squeeze, funding ${s.funding_rate}`)
);
Screen for Macro Risk
Check if macro conditions support risk-on or if you should be reducing exposure.- Python
- JavaScript
Copy
response = requests.post(
"https://api.gigabrain.gg/v1/chat",
headers={"Authorization": "Bearer gb_sk_..."},
json={
"message": "What's the current macro risk regime for crypto? Factor in DXY, yields, VIX, and equities. Respond as JSON with: risk_regime, dxy_trend, vix_level, yield_curve_signal, equity_correlation, recommended_exposure, reasoning"
},
timeout=600
)
macro = json.loads(response.json()["content"])
print(f"Regime: {macro['risk_regime']} | Exposure: {macro['recommended_exposure']}")
Copy
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: "What's the current macro risk regime for crypto? Factor in DXY, yields, VIX, and equities. Respond as JSON with: risk_regime, dxy_trend, vix_level, yield_curve_signal, equity_correlation, recommended_exposure, reasoning",
}),
signal: AbortSignal.timeout(600000),
});
const macro = JSON.parse((await res.json()).content);
console.log(`Regime: ${macro.risk_regime} | Exposure: ${macro.recommended_exposure}`);
Spot Early Narratives
Find narratives gaining momentum before they go mainstream.- Python
- JavaScript
Copy
response = requests.post(
"https://api.gigabrain.gg/v1/chat",
headers={"Authorization": "Bearer gb_sk_..."},
json={
"message": "What crypto narratives are gaining momentum right now? Rank by strength. Respond as JSON array with: narrative, momentum_score, top_tokens, sentiment, key_catalyst, risk_level"
},
timeout=600
)
narratives = json.loads(response.json()["content"])
for n in narratives[:5]:
print(f"{n['narrative']} (momentum: {n['momentum_score']}/100) - {', '.join(n['top_tokens'])}")
Copy
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: "What crypto narratives are gaining momentum right now? Rank by strength. Respond as JSON array with: narrative, momentum_score, top_tokens, sentiment, key_catalyst, risk_level",
}),
signal: AbortSignal.timeout(600000),
});
const narratives = JSON.parse((await res.json()).content);
narratives.slice(0, 5).forEach((n) =>
console.log(`${n.narrative} (momentum: ${n.momentum_score}/100) - ${n.top_tokens.join(", ")}`)
);
Gigabrain provides market intelligence tools, not financial advice. Always do your own research before trading. See the Risk Disclosure.