Comments (6)
@Chavithra thank you very much. I tested it and it works like a charm.
Cheers, Michel
from degiro-connector.
Hello there,
I will split my answer into three points :
- What is your question ?
- Override
- Related issue
1. What is your question ?
Do you want to add the following options to Chart.Resolution
enum ?
- P1D
- P7D
- P1M
Chart.Resolution
can be changed here :
- protos/degiro_connector/quotecast/pb/quotecast.proto
Feel free to make a Pull Request, if you have tested these options.
I could then regenerate the pb2
files.
2. Override
The method get_chart
has a parameter override
.
You can use it to override the resolution
, like so :
chart = quotecast_api.get_chart(
request=request,
override={"resolution":"P1D"},
raw=True,
)
More information in the comments of get_chart
function in degiro_connector/quotecast/utilities.py
3. Related issue
Here is another issue related to chart : #9
Just in case you might be interested in.
Thanks
from degiro-connector.
@Chavithra thank you for your answer.
I wasn't aware of the ability to override the resolution and period of the get_chart call, which is a workaround I can live with.
As for the pull request to add the P1D
, P7D
& P1M
resolutions to the protobuf I ran into a conflict as P1D is already used for the Period enum and apparently it's not possible to use the same enum value twice in one proto file.
So I guess I'll switch to using the override instead.
Thanks, Michel
from degiro-connector.
As for the pull request to add the
P1D
,P7D
&P1M
resolutions to the protobuf I ran into a conflict as P1D is already used for the Period enum and apparently it's not possible to use the same enum value twice in one proto file.
What you are trying to do is perfectly allowed by Protocol Buffer
.
If you are interested in the full process after updating the quotecast.proto
file you need to run a command like this :
python -m grpc_tools.protoc --python_out=. --grpc_python_out=. --proto_path=protos protos\degiro_connector\quotecast\pb\quotecast.proto protos\degiro_connector\trading\pb\trading.proto
Nice evening
from degiro-connector.
When I run that command I get the following messages:
degiro_connector/quotecast/pb/quotecast.proto:57:5: "P1D" is already defined in "Chart".
degiro_connector/quotecast/pb/quotecast.proto:57:5: Note that enum values use C++ scoping rules, meaning that enum values are siblings of their type, not children of it. Therefore, "P1D" must be unique within "Chart", not just within "Period".
degiro_connector/quotecast/pb/quotecast.proto:59:5: "P1M" is already defined in "Chart".
degiro_connector/quotecast/pb/quotecast.proto:59:5: Note that enum values use C++ scoping rules, meaning that enum values are siblings of their type, not children of it. Therefore, "P1M" must be unique within "Chart", not just within "Period".
The error is explaining what I mentioned above. As both the Resolution Enum and the Period Enum are children of the Chart scope, the values within the Enum need to be unique within Chart and not just within each Enum. This limitation means that I don't know how to get both to support the same values as changing the value will not work for the external API.
A quick google search reveals many developers running into the same limitation with no real solution other than to prefix the enum values with something unique.
Cheers, Michel
from degiro-connector.
You are right, I didn't know that :
enum
inside the samemessage
couldn't have the same option names.
Merged Period
and Resolution
into a single Interval
enum.
The modification was published and a migration script comes with it.
from degiro-connector.
Related Issues (20)
- URL of favorites list has changed HOT 2
- Extend LeveragedsRequest class HOT 2
- mamba/conda installation of degiro_connector HOT 4
- Unwanted console output HOT 1
- Valid search but without products found trading.actions.action_product_search HOT 1
- TickerToDF.parse() problem when parsing ticker of vwd_id '61316189' HOT 4
- dividend calender: aditional filter request parameter HOT 5
- `get_account_overview` doesn't return the proper information. HOT 2
- Response status code 412 'joinAccountPersonNeeded' HOT 1
- Unable to place an order HOT 3
- Validation errors for TransactionsHistory: data.75.feeInBaseCurrency, data.75.orderTypeId, ... HOT 1
- update.py not working HOT 3
- map_elements function without return_dtype in ticker_to_df HOT 2
- Not an Issue - just remark on class HOT 1
- how to check that ChartRequest will create an URL which is too long for Degiro? HOT 1
- CRITICAL:degiro_connector.trading.actions.action_connect:1 validation error for LoginError HOT 1
- 502 Bad Gateway HOT 8
- "A new "session_id" is required" on quotecast requests
- trading_api.get_favorites() does not exist HOT 4
- CRITICAL:degiro_connector.quotecast.tools.ticker_fetcher:A new "session_id" is required.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from degiro-connector.