API Reference
A API do NeuroChart.ai permite integração completa com sua aplicação.
Base URL
https://api.neurochart.ai/v1
Autenticação
Todas as requisições devem incluir o header de autenticação:
Authorization: Bearer YOUR_API_KEY
Endpoints
Chat Completion
Envia uma mensagem para o Chart GPT V3 TURBO e recebe uma resposta.
POST /chat/completions
Request Body
{
"model": "chart-gpt-v3-turbo",
"messages": [
{
"role": "user",
"content": "Analise o Bitcoin nas últimas 24 horas"
}
],
"temperature": 0.7,
"max_tokens": 1000
}
Response
{
"id": "chatcmpl-123",
"object": "chat.completion",
"created": 1677652288,
"model": "chart-gpt-v3-turbo",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Analisando o Bitcoin nas últimas 24 horas..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 150,
"total_tokens": 162
}
}
Market Data
Obtém dados de mercado em tempo real.
GET /market/ticker/{symbol}
Parameters
symbol
(string): Par de trading (ex: BTCUSDT)
Response
{
"symbol": "BTCUSDT",
"price": "45230.50",
"change_24h": "2.34",
"volume_24h": "1234567890",
"high_24h": "45500.00",
"low_24h": "44000.00",
"timestamp": 1677652288
}
Technical Analysis
Executa análise técnica em um ativo.
POST /analysis/technical
Request Body
{
"symbol": "BTCUSDT",
"interval": "1h",
"indicators": ["RSI", "MACD", "BB"],
"period": 14
}
Response
{
"symbol": "BTCUSDT",
"interval": "1h",
"analysis": {
"rsi": {
"value": 65.4,
"signal": "neutral"
},
"macd": {
"macd": 125.3,
"signal": 120.1,
"histogram": 5.2,
"trend": "bullish"
},
"bollinger_bands": {
"upper": 45800,
"middle": 45200,
"lower": 44600
}
},
"recommendation": "hold",
"confidence": 0.75
}
Rate Limits
- Free Tier: 100 requisições/minuto
- Pro Tier: 1000 requisições/minuto
- Enterprise: Ilimitado
Códigos de Erro
Código | Descrição |
---|---|
400 | Bad Request - Parâmetros inválidos |
401 | Unauthorized - API key inválida |
429 | Too Many Requests - Rate limit excedido |
500 | Internal Server Error |
SDKs
JavaScript/TypeScript
npm install @neurochart/sdk
import { NeuroChart } from '@neurochart/sdk';
const client = new NeuroChart({
apiKey: 'YOUR_API_KEY'
});
const response = await client.chat.complete({
model: 'chart-gpt-v3-turbo',
messages: [
{ role: 'user', content: 'Analise o Ethereum' }
]
});
Python
pip install neurochart
from neurochart import NeuroChart
client = NeuroChart(api_key='YOUR_API_KEY')
response = client.chat.complete(
model='chart-gpt-v3-turbo',
messages=[
{'role': 'user', 'content': 'Analise o Ethereum'}
]
)
Webhooks
Configure webhooks para receber notificações em tempo real:
POST /webhooks
{
"url": "https://your-server.com/webhook",
"events": ["price_alert", "analysis_complete"],
"secret": "your_webhook_secret"
}