Skip to main content

Getting Started

From zero to your first API call in under 10 minutes. Create an account, get your keys, hit an endpoint.

1

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.

2

Create account + complete KYC

Sign up

  1. 1.Go to etoro.com
  2. 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 long does it take?
Typical verification takes minutes to a few hours. Manual review may take longer in some cases.

How to know you're approved

  • Account shows as verified in settings
  • API Key Management is visible under Settings → Trading
3

Get your API key

Navigate to key management

  1. 1.Log in at etoro.com
  2. 2.Open Settings
  3. 3.Go to Trading
  4. 4.Open API Key Management

Your credentials

You need both keys on every authenticated request:

x-api-key

Your Public API Key

x-user-key

Your User Key

You also generate a unique x-request-id (UUID) per request.

Store keys safely
Never hardcode keys in source files or commit them to git. Use environment variables instead.
.env
# .env (do not commit)
ETORO_API_KEY=your_public_api_key
ETORO_USER_KEY=your_user_key
4

Make your first API call

curl: get market rates

terminal
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

portfolio.py
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

response.json
{
  "equity": 100000,
  "available": 85000,
  "invested": 15000,
  "positions": [
    {
      "instrumentId": 1001,
      "units": 10,
      "openRate": 182.5,
      "currentRate": 185.2,
      "pnl": 27
    }
  ]
}
Success!
If you get HTTP 200 with valid JSON, your auth flow is working.
5

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/...
config.py
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"
6

Troubleshooting

My API key doesn't work
  1. Both x-api-key and x-user-key are present
  2. You didn't swap them
  3. x-request-id is present and unique per request
  4. Your eToro account is verified (KYC complete)
  5. 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
7

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.

We use cookies to improve your experience. By using this site, you agree to our use of cookies. Privacy Policy (opens in new tab)