-
Notifications
You must be signed in to change notification settings - Fork 86
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
Function egg, 2FA, bidprices #26
Comments
Bid prices are not given when calling the API but maybe a work-around with beautiful soup could somewhat solve the issue, donno |
Unfortunately, the original author is unresponsive, so they are not accepting Pull Requests with additional features. 2FAYou could notice that 2FA has been contributed by @pforero here: #12 If you want, you can very easily install his version that has 2FA using this command:
eggAs of the "egg", I'm not sure what you're talking about. You need to explain what your problem with the "egg" is. My wild guess would be that you installed this package from PyPI (Python repository) and then you attempted to edit the files in If you want to make your own edits in this project, you should instead:
Bid pricesWhat do you mean exactly? Price of share in the last trade? Or actually the current best Bid and best Ask? |
Wow! Great response! Thanks man! I will definitely check the 2FA version out! As for the egg, I meant a Python Egg (first time seeing it), and I did indeed try to make some changes to the init file to achieve 2FA. But I couldn't, so it bothered me. But that's not an issue anymore with the 2FA version you referenced. Need to look into the Egg thingy a bit deeper tho... I do indeed mean the current best bid and best ask. At the moment I'm using the last trade price, since its the only price we can consult via the API. However best bid and best ask price would be more useful. When looking at the Degiro UI the best bid and ask prices are provided. So I was wondering if it was possible to scrape them from the UI and use them that way. Probably not the pentacle of efficiency, so ideas for a more elegant solution are greatly appreciated :) |
https://packaging.python.org/discussions/wheel-vs-egg/ Wheel is superior. But you don't need to get into that too much. Both are just packaging standards. All you need to do is to install each package using If you do the editable/debug install (parameter As for the bid/ask data: Our best bet is to find which API end-points Degiro uses to get the data. But that seems to be quite a challenge; see #6 (comment). I tried to find the source using Chrome DevTools, with no success. Apparently, it could be seen using tools like Wireshark but I haven't tried that myself. BTW, are you sure the bid/ask data is so important to you? Aren't they delayed by 15-30 minutes anyway? |
P.S.: Do you know if retrieving the bid/ask works in the library that you linked (https://github.com/pladaria/degiro)? If is does, then we may be able to |
Yep I installed the 2FA version. Works just perfect! The bid and ask prices are real prices you can get for buying and selling a stock. The last trade price is just indicative in terms of the current bid and ask price. The current best bid or ask could be laying way above or below this price. btw they are real time. Consider the liquidity of the stock. For liquid stocks (take Amazon) with tight spreads (0.09%), you can go off the last trade price and most of the time you will find a buyer/seller for your order. However, for less liquid stocks, with a bigger spread and not a deep orderbook you might overpay/get underpaid substantially. These profits go out of your pocket, into a market maker's. Same occurs with big market events like covid and the vaccines (even liquid stocks become illiquid). So, if you want the BEST prices at ALL times, you should use current bid and ask prices. It also allows you to easily develop your own market making or liquidity provider bot. Be it a naïve one :) |
I dont know if it works. Looks fine. I kept away from Java for as long as I could. Seems the time has come to face the beast. |
Getting Bid-/Ask-Data (on a near realtime basis), can be done. I did it the following way:
After this call you can poll the requested information in an infinite loop with this code:
This method was "borrowed" from the Degiro-website. They use a similar approach. There is no push-API available, but you can pull every second. For my trading strategies that's more than fast enough. In general, I support the suggestion from Jakub-CZ to fork the project as the author is pretty unresponsive... |
Hi, nice reverse engineering job, If you are looking for a python library which handles real-time data, I have made one : It is documented and I plan to maintain it for a while. |
There is now a new Degiro library every day :) Stay safe guys, do a proper code base analysis before you pass your Degiro credentials to any library that is not your own. |
Awesome! I have some troubles configuring @rob1181's solution for my own (I'm not that savvy). I'll definitely give @Chavithra's library a go. Thanks for the contributions guys! :) |
what's your recommendation right now including 2FA and live Bid and ask? |
Hey Guys,
Thanks a lot for developing this API, it really is a gift from above. You are an angel!
To further improve the security, I was thinking to implement 2FA (à la: https://github.com/pladaria/degiro) and some way of pulling bid prices (ideas?). However the egg thingy prevents me from doing so...
Relatively new to python, but why did you use an egg structure in this context?
The text was updated successfully, but these errors were encountered: