Giter Site home page Giter Site logo

diego-tobalina / trading212driver Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 123 KB

App que permite realizar trading con Trading212 por medio de una api, utiliza Selenium para automatizar las compras y las ventas.

License: MIT License

Shell 0.35% TypeScript 99.65%
trading212 selenium node-ts

trading212driver's Introduction

[🔥 UPDATE V1] Trading212Driver

Aplicación que permite interactuar con la web de Trading212

💡 Cómo utilizar la aplicación

    1. Renombrar **.env.example** a **.env** `mv .env.example .env`
    2. Modificar las variables de **.env**
    3. Instalar las dependencias `npm i`
    4. Lanzar la aplicación `npm run start` (para desarrollo utilizar `npm run dev` y cambiar el código del driver en "Trading212Controller.ts")

🛒 Peticiones de ejemplo

Compra

Comprará Stocks de Amazon por el valor de la propiedad AMOUNT_PER_TRANSACTION del .env

curl --location --request POST 'https://localhost/api/v0/trading212' \
--header 'Content-Type: application/json' \
--data-raw '{
  "order": "BUY",
  "asset": "(AMZN)",
  "token": "6116714f-fe3e-43be-a194-f453fbf51c71",
}'

Venta

Venderá todo el stock de acciones de Amazon que tiene disponible en la cuenta

curl --location --request POST 'https://localhost/api/v0/trading212' \
--header 'Content-Type: application/json' \
--data-raw '{
  "order": "SELL",
  "asset": "(AMZN)",
  "token": "6116714f-fe3e-43be-a194-f453fbf51c71"
}'

🚀 Desplegar en heroku

Deploy

Una vez subido a heroku lanzar los siguientes comandos desde el cliente de Heroku

heroku buildpacks:add https://github.com/heroku/heroku-buildpack-chromedriver --app <nombre de la aplicación>
heroku buildpacks:add https://github.com/heroku/heroku-buildpack-google-chrome --app <nombre de la aplicación>
heroku config:set CHROME_DRIVER_PATH=/app/.chromedriver/bin/chromedriver --app <nombre de la aplicación>
heroku config:set CHROME_BINARY_PATH=/app/.apt/opt/google/chrome/chrome --app <nombre de la aplicación>

⚠️ Beware of forks. I do not give any guarantee that the fork may turn out to be a scam.

💥 Disclaimer

All investment strategies and investments involve risk of loss. Nothing contained in this program, scripts, code or repository should be construed as investment advice. Any reference to an investment's past or potential performance is not, and should not be construed as, a recommendation or as a guarantee of any specific outcome or profit. By using this program you accept all liabilities, and that no claims can be made against the developers or others connected with the program.

trading212driver's People

Contributors

diego-tobalina avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

edgardurao

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.