eToro Public API 📈
Full eToro Public API integration with trading execution, market data, social feed, and watchlists.
API Docs: https://etoro-6fc30280.mintlify.app/
Base URL: INLINECODE0
Authentication
Three auth modes (priority order):
- 1. SSO Access Token — INLINECODE1
- SSO Auth Token — INLINECODE2
- API Keys —
x-api-key + x-user-key + x-request-id (UUID)
Endpoints
Portfolio & Account
| Tool | Method | Endpoint | Auth |
|---|
| INLINECODE6 | GET | INLINECODE7 (demo: /trading/info/demo/portfolio) | Personal |
| INLINECODE9 |
GET |
/trading/info/real/history (demo:
/trading/info/demo/history) | Personal |
Trading Execution
All trading endpoints support real/demo mode. Demo adds
/demo/ after
/execution/.
| Tool | Method | Endpoint |
|---|
| INLINECODE14 | POST | INLINECODE15 |
| INLINECODE16 |
POST |
/trading/execution/market-open-orders/by-units |
|
close_position | POST |
/trading/execution/market-close-orders/{positionId} |
|
place_limit_order | POST |
/trading/execution/limit-orders |
|
cancel_limit_order | DELETE |
/trading/execution/limit-orders/{orderId} |
|
cancel_open_order | DELETE |
/trading/execution/market-open-orders/{orderId} |
|
cancel_close_order | DELETE |
/trading/execution/market-close-orders/{orderId} |
Market Data (Public)
| Tool | Method | Endpoint |
|---|
| INLINECODE28 | GET | INLINECODE29 |
| INLINECODE30 |
GET |
/market-data/rates?instrumentIds=1001,1002 |
|
get_price_history | GET |
/market-data/instruments/{id}/candles?period=OneMonth |
|
get_trading_info | GET |
/trading/info/instrument/{id} |
|
get_asset_classes | GET |
/market-data/instrument-types |
|
get_exchanges | GET |
/market-data/exchanges |
|
get_instrument_metadata | GET |
/market-data/instruments?instrumentIds=1001,1002 |
|
get_closing_prices | GET |
/market-data/closing-prices |
Social
| Tool | Method | Endpoint |
|---|
| INLINECODE44 | GET | INLINECODE45 |
| INLINECODE46 |
GET |
/copy/popular-investors?limit=10 |
|
search_users | GET |
/users/search?query=... |
|
get_user_portfolio | GET |
/users/{username}/portfolio |
|
get_user_stats | GET |
/users/{username}/stats |
|
get_user_feed | GET |
/feeds/users/{username}?limit=5 |
|
create_post | POST |
/feeds/posts |
|
create_comment | POST |
/feeds/posts/{postId}/comments |
Watchlists
| Tool | Method | Endpoint |
|---|
| INLINECODE60 | GET | INLINECODE61 |
| INLINECODE62 |
GET |
/watchlists/curated |
|
create_watchlist | POST |
/watchlists |
|
add_to_watchlist | POST |
/watchlists/{watchlistId}/items |
|
remove_from_watchlist | DELETE |
/watchlists/{watchlistId}/items/{instrumentId} |
Key Notes
- - Instrument IDs are numeric (not tickers). Resolve via INLINECODE70
- Trading tools default to
mode=real. Only use demo if explicitly requested. - All trading execution is logged with full request details before sending.
- Rate limit: 100 req/min
eToro 公共 API 📈
完整的 eToro 公共 API 集成,支持交易执行、市场数据、社交动态和自选列表。
API 文档: https://etoro-6fc30280.mintlify.app/
基础 URL: https://public-api.etoro.com/api/v1
身份验证
三种认证模式(按优先级排序):
- 1. SSO 访问令牌 — Authorization: Bearer token>
- SSO 认证令牌 — Authorization: user_id>
- API 密钥 — x-api-key + x-user-key + x-request-id(UUID)
端点
投资组合与账户
| 工具 | 方法 | 端点 | 认证 |
|---|
| getportfolio | GET | /trading/info/portfolio(演示:/trading/info/demo/portfolio) | 个人 |
| gettrading_history |
GET | /trading/info/real/history(演示:/trading/info/demo/history) | 个人 |
交易执行
所有交易端点均支持真实/演示模式。演示模式在 /execution/ 后添加 /demo/。
| 工具 | 方法 | 端点 |
|---|
| openpositionbyamount | POST | /trading/execution/market-open-orders/by-amount |
| openpositionbyunits |
POST | /trading/execution/market-open-orders/by-units |
| close_position | POST | /trading/execution/market-close-orders/{positionId} |
| place
limitorder | POST | /trading/execution/limit-orders |
| cancel
limitorder | DELETE | /trading/execution/limit-orders/{orderId} |
| cancel
openorder | DELETE | /trading/execution/market-open-orders/{orderId} |
| cancel
closeorder | DELETE | /trading/execution/market-close-orders/{orderId} |
市场数据(公共)
| 工具 | 方法 | 端点 |
|---|
| getmarketdata | GET | /market-data/search?internalSymbolFull=AAPL |
| getmarketrates |
GET | /market-data/rates?instrumentIds=1001,1002 |
| get
pricehistory | GET | /market-data/instruments/{id}/candles?period=OneMonth |
| get
tradinginfo | GET | /trading/info/instrument/{id} |
| get
assetclasses | GET | /market-data/instrument-types |
| get_exchanges | GET | /market-data/exchanges |
| get
instrumentmetadata | GET | /market-data/instruments?instrumentIds=1001,1002 |
| get
closingprices | GET | /market-data/closing-prices |
社交
| 工具 | 方法 | 端点 |
|---|
| getinstrumentfeed | GET | /feeds/instruments/{id}?limit=5 |
| getpopularinvestors |
GET | /copy/popular-investors?limit=10 |
| search_users | GET | /users/search?query=... |
| get
userportfolio | GET | /users/{username}/portfolio |
| get
userstats | GET | /users/{username}/stats |
| get
userfeed | GET | /feeds/users/{username}?limit=5 |
| create_post | POST | /feeds/posts |
| create_comment | POST | /feeds/posts/{postId}/comments |
自选列表
| 工具 | 方法 | 端点 |
|---|
| getwatchlists | GET | /watchlists |
| getcurated_lists |
GET | /watchlists/curated |
| create_watchlist | POST | /watchlists |
| add
towatchlist | POST | /watchlists/{watchlistId}/items |
| remove
fromwatchlist | DELETE | /watchlists/{watchlistId}/items/{instrumentId} |
关键说明
- - 工具 ID 为数字格式(非股票代码)。通过 /market-data/search?internalSymbolFull=AAPL 解析
- 交易工具默认使用 mode=real。仅在明确要求时使用演示模式
- 所有交易执行在发送前均记录完整的请求详情
- 速率限制:每分钟 100 次请求