beginnerquickstartauthenticationREST
Getting Started with the eToro API
Learn how to get your API keys, make your first request, and understand eToro API response formats.
2 min readBy eToro Developer Relations
Prerequisites
Before you begin, you'll need:
- An eToro account (sign up at etoro.com)
- API credentials from the eToro API Portal
- A basic understanding of REST APIs
- Node.js 18+ or Python 3.8+ installed
Getting Your API Keys
- Visit api-portal.etoro.com and sign in with your eToro account
- Navigate to Applications and create a new application
- Copy your Client ID and Client Secret
- Store them securely — never commit API keys to version control
Your First API Request
Let's fetch a list of available instruments using the eToro API.
Using JavaScript
const API_BASE = "https://api.etoro.com/api/sor/v3";
const response = await fetch(`${API_BASE}/instruments`, {
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json",
},
});
const data = await response.json();
console.log(`Found ${data.instruments.length} instruments`);
Using cURL
curl -X GET "https://api.etoro.com/api/sor/v3/instruments" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json"
Using Python
import requests
API_BASE = "https://api.etoro.com/api/sor/v3"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json",
}
response = requests.get(f"{API_BASE}/instruments", headers=headers)
data = response.json()
print(f"Found {len(data['instruments'])} instruments")
Understanding the Response
Every eToro API response follows a consistent structure:
{
"data": { ... },
"meta": {
"requestId": "abc-123",
"timestamp": "2026-03-20T10:30:00Z"
}
}
| Field | Type | Description |
|---|---|---|
data |
object | The response payload |
meta.requestId |
string | Unique ID for debugging |
meta.timestamp |
string | ISO 8601 timestamp |
Error Handling
When something goes wrong, the API returns a structured error:
{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or expired access token",
"requestId": "abc-123"
}
}
Common HTTP status codes:
- 200 — Success
- 400 — Bad request (check your parameters)
- 401 — Unauthorized (check your token)
- 429 — Rate limited (slow down)
- 500 — Server error (retry with backoff)
Rate Limits
The eToro API enforces rate limits to ensure fair usage:
- Standard tier: 100 requests per minute
- Premium tier: 1,000 requests per minute
Check the X-RateLimit-Remaining header in each response to monitor your usage.
Next Steps
Now that you've made your first request, explore these guides:
- Real-Time Market Data with WebSockets — Stream live prices
- Building an Algo Trading Bot — Automate your strategy
- API Reference — Full endpoint documentation