marekskopal / etoro
eToro API client library
Installs: 43
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/marekskopal/etoro
Requires
- php: >=8.4.1
- php-http/discovery: ^1.19
- psr/http-client: ^1.0
- psr/http-factory: ^1.0
- psr/http-message: ^1.1 || ^2.0
- ramsey/uuid: ^4.9
Requires (Dev)
- php-http/guzzle7-adapter: ^1.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.1
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- phpunit/phpunit: ^13.0
- slevomat/coding-standard: ^8.14
- spatie/ray: ^1.39
Suggests
- nyholm/psr7: PSR-7 message implementation
- symfony/http-client: HTTP client
README
Unofficial PHP API client library for the eToro API service.
Install
composer require marekskopal/etoro
Usage
use MarekSkopal\Etoro\Etoro; use MarekSkopal\Etoro\Config\Config; // Create Etoro instance $etoro = new Etoro(new Config(apiKey: '<yourApiKey>', userKey: '<yourUserKey>')); // Search instruments by symbol $response = $etoro->marketData->searchBySymbol('AAPL');
Covered endpoints
Market Data
- GET Search instruments ✅
- GET Search instruments by symbol ✅
- GET Rates ✅
- GET Candles ✅
- GET Instruments metadata ✅
- GET Instrument types ✅
- GET Closing prices ✅
- GET Exchanges ✅
- GET Stocks industries ✅
Trading
- GET Portfolio ✅
- GET Portfolio PnL ✅
- POST Open order by amount ✅
- POST Open order by units ✅
- POST Close position ✅
- POST Place market if touched order ✅
- DELETE Cancel open order ✅
- DELETE Cancel close order ✅
- DELETE Cancel market if touched order ✅
- GET Order info ✅
- GET Trade history ✅
Watchlists
- GET Fetch all watchlists ✅
- GET Fetch a watchlist ✅
- POST Create watchlist ✅
- POST Add items ✅
- DELETE Remove items ✅
- PUT Rename watchlist ✅
- PUT Change rank ✅
- PUT Set default ✅
- DELETE Delete watchlist ✅
- GET Public watchlists ✅
- GET Public watchlist ✅
- GET Default watchlist items ✅
- POST Create default watchlist with items ✅
- POST Create watchlist and set as default ✅
- PUT Update items ✅
Feeds
- GET Instrument feed posts ✅
- GET User feed posts ✅
- POST Create discussion post ✅
- POST Create comment on post ✅
Users Info
- GET Search users ✅
- GET User profiles ✅
- GET User live portfolio ✅
- GET User trade info ✅
- GET User gain ✅
- GET User daily gain ✅
PI Data
- GET Copiers public info ✅
Curated Lists
- GET Fetch curated lists ✅
Market Recommendations
- GET Fetch recommendations ✅
Notice
This is NOT an official eToro library, and the authors of this library are not affiliated with eToro in any way, shape or form.
Contributing
If you want to contribute, feel free to submit a pull request.