An unofficial Go library for interacting with the Trading212 API.
Warning
Disclaimer: Using the Trading212 Golang library to create trading bots involves risks, including potential losses from market volatility and reliance on historical price patterns that may not predict future movements. External factors like news events and economic changes can also affect the bot's performance, so only invest money you can afford to lose.
Create an API key for Trading212 by following these steps:
- Click the hamburger menu after logging into your Trading212 account
- Scroll to the bottom
- Click the green button "Switch to Practice"
- Click Settings
- Click "API (Beta)"
- Click "Generate API key"
Execute this command: make test
- Update the API Key with your own inside here
- Execute this command:
make run
- Update the API Key with your own inside here
- Execute this command:
make trade
- Update the API Key with your own inside here
- Execute this command:
make multistock
You can read the API documentation to understand what's possible with the Trading212 API.
This project is licensed under the MIT License.
(c) 2025 Finbarrs Oketunji. All Rights Reserved.