Getting Started
From zero to your first API call in under 10 minutes. Create an account, get your keys, hit an endpoint.
Prerequisites
Before you call the API, you need one thing:
A verified eToro retail account (KYC completed)
Your API key is tied to your verified eToro account — the same account that gives you access to live markets. This is how eToro keeps API access secure and compliant.
Create account + complete KYC
Sign up
- 1.Go to etoro.com
- 2.Create an account or log in to an existing one
Complete identity verification (KYC)
- Identity verification (government-issued ID)
- Address verification (proof of address, region-dependent)
- Basic compliance checks for regulated financial services
How to know you're approved
- Account shows as verified in settings
- API Key Management is visible under Settings → Trading
Get your API key
Navigate to key management
- 1.Log in at etoro.com
- 2.Open Settings
- 3.Go to Trading
- 4.Open API Key Management
Your credentials
You need both keys on every authenticated request:
x-api-keyYour Public API Key
x-user-keyYour User Key
You also generate a unique x-request-id (UUID) per request.
# .env (do not commit)
ETORO_API_KEY=your_public_api_key
ETORO_USER_KEY=your_user_keyMake your first API call
curl: get market rates
curl -X GET "https://public-api.etoro.com/api/v1/market-data/rates" \
-H "x-api-key: $ETORO_API_KEY" \
-H "x-user-key: $ETORO_USER_KEY" \
-H "x-request-id: $(uuidgen)" \
-H "Accept: application/json"Python: fetch demo portfolio
import os, uuid, httpx
BASE_URL = "https://public-api.etoro.com/api/v1"
headers = {
"x-api-key": os.environ["ETORO_API_KEY"],
"x-user-key": os.environ["ETORO_USER_KEY"],
"x-request-id": str(uuid.uuid4()),
"Accept": "application/json",
}
with httpx.Client(timeout=30.0) as client:
response = client.get(f"{BASE_URL}/trading/demo/portfolio", headers=headers)
response.raise_for_status()
data = response.json()
print(data)Expected response
{
"equity": 100000,
"available": 85000,
"invested": 15000,
"positions": [
{
"instrumentId": 1001,
"units": 10,
"openRate": 182.5,
"currentRate": 185.2,
"pnl": 27
}
]
}Demo account vs live account
Demo Trading API
Mirrors live behavior exactly — same endpoints, same shapes. Uses paper money. Start here.
/trading/demo/...Real Trading API
Real money execution. Use only after your integration is validated in Demo.
/trading/real/...import os
mode = os.getenv("ETORO_TRADING_MODE", "demo") # demo | real
if mode == "demo":
portfolio_path = "/trading/demo/portfolio"
else:
portfolio_path = "/trading/real/portfolio"Troubleshooting
My API key doesn't work
- Both
x-api-keyandx-user-keyare present - You didn't swap them
x-request-idis present and unique per request- Your eToro account is verified (KYC complete)
- No extra spaces or newlines in copied keys
I'm getting rate limited (HTTP 429)
- Back off and retry (exponential backoff)
- Add request pacing between calls
- Cache repeated market-data reads
- Avoid burst loops across many symbols
I can't find the API key in my account
Navigate to: Settings → Trading → API Key Management
Direct URL: etoro.com/settings/trade
If API Key Management is missing, your account may not be fully verified yet.
KYC verification is taking too long
- Check account notifications for missing documents
- Confirm uploaded documents are clear and valid
- Contact eToro support through in-product help
Next steps
Once your first call works, here's what to explore:
Quick checklist
- eToro account created
- KYC approved (account verified)
- x-api-key and x-user-key copied
- Keys stored in env vars (not code)
- First call to /market-data/rates succeeds
- First call to /trading/demo/portfolio succeeds
- Demo vs live mode switch implemented
Ready to build?
You're set up. Explore the full API reference or dive into a use case.