API Integration: Getting Your First Prediction in 5 Minutes
You do not need a data science team or weeks of integration work to start using Pearlixa predictions. The API is designed for speed: from signup to your first prediction response, you can be running in under five minutes.
This guide walks through the exact steps — generating your API key, making your first request, and understanding the response.
Step 1: Get Your API Key
After signing up at pearlixa.com and logging into your dashboard:
- •Navigate to API Keys in the left sidebar
- •Click Generate New Key
- •Copy the key immediately — it is only shown once
Your API key identifies your account and determines your rate limits based on your plan tier.
Step 2: Make Your First Prediction Request
The base URL for all Pearlixa API calls is:
https://api.pearlixa.com/api/v1/
To get a prediction, you send a GET request to the /predict endpoint with the asset symbol and timeframe:
cURL
curl -X GET "https://api.pearlixa.com/api/v1/predict?symbol=BTC&timeframe=short_term" -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json"
Python
import requestsAPI_KEY = "your_api_key_here"
BASE_URL = "https://api.pearlixa.com/api/v1"
response = requests.get(
f"{BASE_URL}/predict",
params={
"symbol": "BTC",
"timeframe": "short_term"
},
headers={
"Authorization": f"Bearer {API_KEY}"
}
)
prediction = response.json()
print(prediction)
JavaScript / Node.js
const API_KEY = 'your_api_key_here';const response = await fetch(
'https://api.pearlixa.com/api/v1/predict?symbol=BTC&timeframe=short_term',
{
headers: {
'Authorization': Bearer ${API_KEY},
'Content-Type': 'application/json'
}
}
);
const prediction = await response.json();
console.log(prediction);
Step 3: Understand the Response
A successful prediction response looks like this:
{
"symbol": "BTC",
"timeframe": "short_term",
"current_price": 92450.00,
"price_target": 98200.00,
"stop_loss": 88500.00,
"take_profit": 98200.00,
"confidence_score": 83,
"direction": "bullish",
"risk_reward_ratio": 1.48,
"predicted_at": "2026-03-01T14:22:07Z",
"valid_until": "2026-03-08T14:22:07Z"
}
Field Reference
| Field | Type | Description |
|---|---|---|
symbol | string | The cryptocurrency symbol (BTC, ETH, SOL, etc.) |
timeframe | string | short_term, mid_term, or long_term |
current_price | float | Market price at time of prediction |
price_target | float | AI-predicted target price |
stop_loss | float | Recommended stop-loss level |
take_profit | float | Same as price target — where to take profit |
confidence_score | int | 0–100, prediction strength |
direction | string | bullish or bearish |
risk_reward_ratio | float | Reward ÷ Risk |
predicted_at | ISO 8601 | When the prediction was generated |
valid_until | ISO 8601 | Time horizon for this prediction |
Step 4: Query Multiple Assets
You can request predictions for multiple assets in a single call:
import requestsAPI_KEY = "your_api_key_here"
assets = ["BTC", "ETH", "SOL", "AVAX", "LINK"]
for symbol in assets:
response = requests.get(
"https://api.pearlixa.com/api/v1/predict",
params={"symbol": symbol, "timeframe": "mid_term"},
headers={"Authorization": f"Bearer {API_KEY}"}
)
data = response.json()
print(f"{symbol}: {data['direction'].upper()} | Target: {data['price_target']} | Confidence: {data['confidence_score']}%")
Output:
BTC: BULLISH | Target: 105000.0 | Confidence: 88%
ETH: BULLISH | Target: 4200.0 | Confidence: 81%
SOL: BULLISH | Target: 215.0 | Confidence: 74%
AVAX: BEARISH | Target: 28.5 | Confidence: 69%
LINK: BULLISH | Target: 22.0 | Confidence: 77%
Step 5: Handle Errors Correctly
The API returns standard HTTP status codes:
| Status | Meaning | Action |
|---|---|---|
200 | Success | Process the prediction |
401 | Invalid API key | Check your key |
429 | Rate limit exceeded | Wait and retry with backoff |
404 | Symbol not found | Check supported symbols |
500 | Server error | Retry after a short delay |
Retry logic with exponential backoff
import requests
import timedef get_prediction(symbol, timeframe, api_key, max_retries=3):
for attempt in range(max_retries):
response = requests.get(
"https://api.pearlixa.com/api/v1/predict",
params={"symbol": symbol, "timeframe": timeframe},
headers={"Authorization": f"Bearer {api_key}"}
)
if response.status_code == 200:
return response.json()
elif response.status_code == 429:
wait = 2 attempt # 1s, 2s, 4s
print(f"Rate limited. Retrying in {wait}s...")
time.sleep(wait)
else:
response.raise_for_status()
raise Exception(f"Failed after {max_retries} attempts")
Supported Timeframes and Symbols
Timeframes:
short_term— 1 to 7 daysmid_term— 1 to 4 weekslong_term— 1 to 3 months
To get the list of supported symbols:
curl "https://api.pearlixa.com/api/v1/symbols" -H "Authorization: Bearer YOUR_API_KEY"
Pearlixa currently supports over 30 major cryptocurrencies, including BTC, ETH, BNB, SOL, XRP, ADA, AVAX, DOT, LINK, MATIC, and more depending on your plan tier.
What to Build Next
With your first prediction working, the most common next steps are:
1. Scheduled polling — Set up a cron job or scheduled function to pull predictions every few hours and store them in your database.
2. Webhook notifications — Coming soon: push-based alerts when prediction signals change direction or confidence spikes.
3. Portfolio integration — Combine predictions with position sizing logic to automate trade decisions.
4. Dashboard display — Surface confidence scores and price targets in your trading interface.
Check the full API documentation at api.pearlixa.com/docs for the complete endpoint reference, authentication options, and rate limit details by plan tier.
Summary
- •Generate API key from the Dashboard → API Keys section
- •Call
GET /api/v1/predict?symbol=BTC&timeframe=short_termwith your Bearer token - •Parse the response: price_target, stop_loss, confidence_score, direction
- •Handle 429 errors with exponential backoff
- •Query multiple symbols in a loop for portfolio-wide scanning