Business API Documentation
Integrate Realite AI predictions into your trading bots. RESTful API with JWT authentication, real-time signals, and actionable intelligence.
Overview
The Realite Business API provides programmatic access to AI-powered trading predictions for your company's users. Use it to build automated trading bots, integrate signals into your existing systems, or create custom dashboards.
Base URL
https://www.realite.io/api/business
Real-time Data
Access AI predictions as soon as they're generated
Secure
JWT tokens with 1-month validity
RESTful
Standard JSON responses
Actionable
BUY/SELL/HOLD signals with confidence
Authentication
The API uses JWT (JSON Web Tokens) for authentication. First, obtain a token using your client credentials, then include it in the Authorization header for all subsequent requests.
Step 1: Get Your Credentials
Contact us to get your client_id and client_secret. These are unique to your company and should be kept secure.
Step 2: Request a Token
Exchange your credentials for a JWT token:
curl -X POST https://www.realite.io/api/business/auth/token \
-H "Content-Type: application/json" \
-d '{
"client_id": "company_abc123...",
"client_secret": "your_secret_here..."
}'
Step 3: Use the Token
Include the token in the Authorization header:
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9...
Security Note: Never expose your client_secret in client-side code. Always make API calls from your backend server.
Rate Limits
To ensure fair usage and system stability, the API enforces rate limits:
| Limit Type | Default Value | Description |
|---|---|---|
| Per Hour | 100 requests | Rolling 60-minute window |
| Per Day | 1,000 requests | Resets at midnight UTC |
Rate limit information is included in every response:
{
"success": true,
"data": { ... },
"rate_limit": {
"remaining_daily": 950,
"remaining_hourly": 95
}
}
POST /auth/token
Exchange client credentials for a JWT access token.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
client_id | string | Yes | Your company's client ID |
client_secret | string | Yes | Your company's client secret |
Response
{
"success": true,
"token": "eyJhbGciOiJIUzI1NiJ9...",
"token_type": "Bearer",
"expires_in": 2592000,
"expires_at": "2026-03-17T12:00:00Z",
"company": {
"id": 1,
"name": "Your Company",
"rate_limits": {
"per_hour": 100,
"per_day": 1000
}
}
}
POST /auth/validate
Validate an existing token and check remaining rate limits.
Headers
| Header | Value |
|---|---|
Authorization | Bearer <your_token> |
Response
{
"success": true,
"valid": true,
"company": {
"id": 1,
"name": "Your Company",
"api_enabled": true,
"rate_limits": {
"per_hour": 100,
"per_day": 1000,
"remaining_hourly": 95,
"remaining_daily": 950
}
}
}
GET /predictions
Get AI predictions for all stocks held by users in your company.
Headers
| Header | Value |
|---|---|
Authorization | Bearer <your_token> |
Response
{
"success": true,
"data": {
"company": {
"id": 1,
"name": "Your Company"
},
"users_count": 5,
"predictions": [
{
"user_id": 123,
"user_email": "trader@company.com",
"stocks": [
{
"stock": {
"symbol": "AAPL",
"name": "Apple Inc.",
"exchange": "NASDAQ",
"current_price": 178.50
},
"position": {
"shares": 100,
"avg_purchase_price": 150.00,
"current_value": 17850.00
},
"signals": {
"daily_action": "BUY",
"weekly_action": "HOLD",
"personalized_signal": "STRONG_BUY",
"confidence_level": "high"
},
"forecasts": {
"est_close": {
"price": 180.25,
"change_percent": 0.98,
"confidence": "high"
},
"j7": {
"price": 185.00,
"change_percent": 3.64,
"confidence": "medium"
}
}
}
]
}
]
},
"timestamp": "2026-02-17T12:00:00Z",
"rate_limit": {
"remaining_daily": 949,
"remaining_hourly": 94
}
}
GET /predictions/:id
Get AI predictions for a specific user in your company.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | integer | User ID |
Response
Same structure as /predictions but filtered to one user.
GET /predictions/summary
Get an aggregated summary of all predictions across your company's users. Useful for quick overview and top signals.
Response
{
"success": true,
"data": {
"company": { "id": 1, "name": "Your Company" },
"summary": {
"total_users": 5,
"total_stocks": 25,
"total_value": 1250000.00,
"signals_breakdown": {
"strong_buy": 3,
"buy": 8,
"hold": 10,
"sell": 3,
"strong_sell": 1
},
"top_buy_signals": [
{
"symbol": "NVDA",
"name": "NVIDIA Corporation",
"signal": "STRONG_BUY",
"confidence": "high",
"predicted_change_percent": 5.2
}
],
"top_sell_signals": [
{
"symbol": "META",
"name": "Meta Platforms",
"signal": "SELL",
"confidence": "medium",
"predicted_change_percent": -2.1
}
]
}
},
"timestamp": "2026-02-17T12:00:00Z",
"rate_limit": { "remaining_daily": 948, "remaining_hourly": 93 }
}
Response Format
All API responses follow a consistent JSON structure:
{
"success": true | false,
"data": { ... }, // Present on success
"error": "Error message", // Present on failure
"timestamp": "ISO8601",
"rate_limit": {
"remaining_daily": 950,
"remaining_hourly": 95
}
}
Error Codes
| HTTP Code | Meaning | Description |
|---|---|---|
| 400 | Bad Request | Missing or invalid parameters |
| 401 | Unauthorized | Invalid or missing token |
| 403 | Forbidden | API access disabled for company |
| 404 | Not Found | User not found or not in company |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Server Error | Internal server error |
Code Examples
Python
import requests
# Get token
auth_response = requests.post(
"https://www.realite.io/api/business/auth/token",
json={
"client_id": "company_abc123...",
"client_secret": "your_secret..."
}
)
token = auth_response.json()["token"]
# Get predictions
headers = {"Authorization": f"Bearer {token}"}
predictions = requests.get(
"https://www.realite.io/api/business/predictions",
headers=headers
)
print(predictions.json())
JavaScript / Node.js
const axios = require('axios');
const BASE_URL = 'https://www.realite.io/api/business';
async function getPredictions() {
// Get token
const authRes = await axios.post(`${BASE_URL}/auth/token`, {
client_id: 'company_abc123...',
client_secret: 'your_secret...'
});
const token = authRes.data.token;
// Get predictions
const predictions = await axios.get(`${BASE_URL}/predictions`, {
headers: { Authorization: `Bearer ${token}` }
});
console.log(predictions.data);
}
getPredictions();
cURL
# Get token
TOKEN=$(curl -s -X POST https://www.realite.io/api/business/auth/token \
-H "Content-Type: application/json" \
-d '{"client_id":"company_abc123...","client_secret":"your_secret..."}' \
| jq -r '.token')
# Get predictions
curl -X GET https://www.realite.io/api/business/predictions \
-H "Authorization: Bearer $TOKEN"
Ready to Get Started?
Contact us to get your API credentials and start building your trading bot today.
Request API Access