Getting Started with the etoro API
Learn how to get your API keys, make your first request, and understand etoro API response formats.
etoro Developer Relations
2 min read
What you'll learn
- Create an etoro developer account and get your API keys
- Make your first REST API request to search instruments
- Understand etoro API response formats and error handling
- Switch between Demo and Real environments
Learning path
Part of: Build a Trading Bot — Step 1 of 4
On this page
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 Settings → Trading → API Key Management and click Create New Key
- Copy your API key (
x-api-key) and User key (x-user-key) - Store them securely — never commit API keys to version control
Use the Demo API environment first — it has the same endpoints as production but uses simulated balances, so you can experiment without risk.
Your First API Request
Let's search for instruments by name using the etoro API.
Understanding the Response
etoro API responses contain your requested data. Include an x-request-id header on every call so support can trace issues back to specific requests.
Common HTTP status codes:
- 200 — Success
- 400 — Bad request (check your parameters)
- 401 — Unauthorized (check your API key and user key)
- 429 — Rate limited (respect
Retry-Afterheader and slow down) - 500 — Server error (retry with exponential backoff)
Rate Limits
The etoro API enforces rate limits. Exceeding your limit returns 429 Too Many Requests with a Retry-After header. Always respect that header before retrying.
For current rate limit details, see the Rate Limits documentation.
What's different from the legacy guide
- Uses the
/market-data/searchendpoint for instrument discovery instead of fetching the full instrument list - Adds query parameter patterns for filtering server-side
- Same authentication headers (
x-api-key,x-user-key,x-request-id)
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
Was this helpful?
Related guides