Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to buy/sale ? #9

Open
GordonTraveler opened this issue Jul 30, 2021 · 7 comments
Open

How to buy/sale ? #9

GordonTraveler opened this issue Jul 30, 2021 · 7 comments

Comments

@GordonTraveler
Copy link

Hi.

First of all, great work! Love it. But 2 things are needed for algo trading... to buy and sale stocks, etc. :-)

Can you give me an example of how to buy and sale stocks with the API? Or maybe you can make a example file for it.
I don't get it from the documentation.

Thanks.

@Zarathustra2
Copy link
Owner

Currently not being supported, will add to my todo list, trying to add over the weekend!

@GordonTraveler
Copy link
Author

That would be awesome. Thank you!

@GordonTraveler
Copy link
Author

Any news about it?
How do you catch the API call of TR? Maybe I can help?

@Zarathustra2
Copy link
Owner

@GordonTraveler Please take a look here: a391f87

@GordonTraveler
Copy link
Author

@Zarathustra2 Thank you very much Dario.
Can you give a short documentation or example? I don't understand all parameter.

self = object itself, nothing to enter. Right?
order_id = ?? Is it just a random number or shall I leave it empty?
isin = clear, ISIN of the stock
order_type = clear... buy or sell
size = The amount? Like "3.45"?
limit = The limit price I want to buy/sell at. Is there also a market order possible? TR offers 3 options: market order, limit order and stop order. The market order is the default. Usually I use the market order. Also, the TR app it is showing me the "ask price". From where do I get this price?
expiry = ?? Don't know.
exchange="LSX", = ?? Don't know.
callback=print, = Nothing to do here, I guess.

Thank you for your great work!

@Jolg42
Copy link

Jolg42 commented Oct 19, 2021

Note it's now possible to buy/sell from the web app

@Zarathustra2
Copy link
Owner

@GordonTraveler

order_id is set by you. Choose something there.

amount = size => The amount of shares you want to buy

I will try to market as well but I am not using TradeRepublic so might take time until I do it.

Expiry needs to be one of ["gfd", "gtd", "gtc"]

  • gfd => Good for day
  • gtd => good till date
  • gtc => Good till cancel

Expiry is the exchange you want; just leave it as it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants