Chavithra / degiro-connector

This is yet another library to access Degiro's API.
BSD 3-Clause "New" or "Revised" License
221 stars 49 forks source link

get stocks details #4

Closed paveldomsa closed 3 years ago

paveldomsa commented 3 years ago

Hi, is there a way how to get stock details (same as i could get via RequestLookup or RequestStocks) when i have just stocks id (for example (AMD id is 5462588).

Basically i have portfolio, i get it via request_list = Update.RequestList() request_list.values.extend( [ Update.Request( option=Update.Option.PORTFOLIO, last_updated=0, ), ] ) print (request_list)

update = trading_api.get_update(request_list=request_list, raw=False)

and i need to get vwid and other stock details to pass to quotecast. documentation says

  1. How to get a "vwd_id" ?

One way to get the "vwd_id" of a product : fetch details about that product using the "lookup" (search by name) feature of this library.

are there any other ways (i can't search by names since portfolio request doesn't provide any names).

Thanks

Chavithra commented 3 years ago

Hi,

this response is split in five parts :

  1. Use case
  2. Does the website do it ?
  3. Reverse engineering
  4. New method
  5. Feedback

1. Use case That's an interesting use case.

I too need to link these two elements :

I am using matching tables to do so.

2. Does the website do it ? I took a look at the website it seems to manage to link these elements :

3. Reverse engineering I have checked the communication between my browser and Degiro's API.

Turns out there is an endpoint to get products details from their ids.

4. New method I have added a new method called :

I have also updated the documentation.

This method seems to do the job.

5. Feedback I am interested in having your feedback : does it work on your side too ?

See ya

paveldomsa commented 3 years ago

it does work for me too. nice and quick job. thanks