question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I need to be able to get prices, so I figured I’d make an issue with my findings. I’m hoping to be able to submit a PR in a couple days, but if not I’ll have all the information I’ve found documented here.

The URL DEGIRO requests it’s data from (on page load) is https://charting.vwdservices.com/hchart/v1/deGiro/data.js?requestid=1&resolution=PT1M&culture=nl-NL&period=P1D&series=issueid%3A198401&series=price%3Aissueid%3A198401&format=json&callback=vwd.hchart.seriesRequestManager.sync_response&userToken=${usertoken}&tz=Europe%2FAmsterdam.

I redacted the user token for now, as I’m not sure if this one is personal or if it’s the “user token” for DEGIO at vwdservices. It’s a 7-digit number, ending with 821. If someone else runs into this issue, could you let me know if it’s the same for you? Then we know it’s common to everyone and not variable.

This is a get-request, so all required information is in this URL. I’m assuming there is no cookies involved, as the data is loaded from a 3rd party service.

The two “series” arguments are issueid:${product.vwdId} and price:issueid:${product.vwdId}. Although I’m not certain both are required for our (initial) use-case, I’d recommend leaving both in to make the request indistinguishable from what DEGIRO does.

What’s interesting though, is that for this request, it doesn’t seem like you have to be logged in. This means easier unit testing, also in CI.

To-Do:

  • Figure out where “user token” comes from, and if you need to be logged in for this. If someone can help me with this that’d be great! Just hit F12, load a product page, and find the request under network. If your user token also ends with 821, we know it can be hard-coded in.

My suggestions for implementing this:

  • Add enums for “resolution” and for “period”.
  • Add a function “getPrices(resolution, period, vwdId, culture, timezone)” which performs the GET request. Optionally also need to pass the “user token”.
  • Add a test that uses a hard-coded vwdId to retrieve the price data.

Notes: Callback should be omitted, as that will wrap the result in a function call (to be used with eval). Omitting it returns the raw JSON response.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Chavithracommented, Jan 2, 2021

First of all, thanks for sharing that’s great !

For the rest of my response : beware that this is just my experience feedback.

Since at this point, there is no official and public documentation for Degiro’s API.

I will split my answer in 3 parts :

  1. What is this “user_token” ?
  2. Is there an example for this endpoint ?
  3. Is there another endpoint to get prices ?

1. What is this user_token ?

1.1. What is it ?

From what I understood it’s a unique identifier.

To answer to your question : we don’t have the same “user_token”.

It seems to be unique to each Degiro’s account.

1.1. How can I get it ?

It’s inside the response of these endpoints and it’s called “clientId” or “id” :

There might be other endpoints.

For more details about “user_token”, you can take a look at the documentation of this repository :

https://github.com/Chavithra/degiro-connector

2. Is there an example for this endpoint ?

I can see you have already started to build methods to consume this endpoint. https://charting.vwdservices.com/hchart/v1/deGiro/data.js

There are other projects on github which consume this endpoint.

Here are some examples : A. https://github.com/Chavithra/degiro-connector B. https://github.com/lolokraus/DegiroAPI C. https://github.com/pcmind/degiro-java-client D. https://github.com/SlashGordon/autotrader

A : method “get_graph” B : method “real_time_price” C : methods “getPriceHistory” & “getGraph” D : methods “get_series” & “get_last_price”

Maybe you can take inspiration from these repositories.

For instance, to get the available options for each parameter, like “resolution” or “period”.

Although most options are already listed directly in Degiro’s website JavaScript code.

3. Is there another endpoint to get prices ?

For a real-time usage I think this endpoint is more suitable :

https://degiro.quotecast.vwdservices.com/CORS

Some examples of projects consuming this endpoint : A. https://github.com/Chavithra/degiro-connector B. https://github.com/llehouerou/go-degiro C. https://github.com/pcmind/degiro-java-client D. https://github.com/pladaria/degiro

A : method “fetch_data” B : methods “SubscribeQuotes” and “GetQuote” C : method “getPricePoller” D : methods “getAskBidPrice”

I hope that will help you in your quest.

0reactions
wexertcommented, Feb 28, 2021

I understeand… Is not legal for degiro if se create bot? Cause Etoro per you do that… But getting the api is a pain too

Il dom 28 feb 2021, 13:21 J.R.I. notifications@github.com ha scritto:

I used all the stealth from reusing session and many many more measures. Point is they won’t believe you because they are smart. As long as your bot is not profitable, danger is low. But if significant. Then well

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/icastillejogomez/degiro-api/issues/19#issuecomment-787443705, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKO3WKXC3WN3LEONHFUTGULTBIYNHANCNFSM4VQ5P7OA .

Read more comments on GitHub >

github_iconTop Results From Across the Web

How Much Do Rappers Charge For Features? - Complex
Future Polo G Nicki Minaj Kendrick Lamar 21 Savage DaBaby YK Osiris Roddy Ricch
Read more >
How Much Do Rappers Charge For Features? - Musician Wave
Famous rappers charge anywhere between $100K and $1 million for a feature. Their fee may vary depending on the number of verses and...
Read more >
How Much Is A Rapper Feature? (Drake, J Cole & More)
In this article, we will discuss how much is a rapper feature. ... Rap Feature Prices: Your Favourite Artist Feature Prices Revealed.
Read more >
Available Hip-Hop & Rapper Bookings - Main Stage Productions
Artist Lower Price Range Upper Price Range Availability 2 Chainz Call for Pricing Fall 2022 ‑ Generally Available 6LACK $125,000 $250,000 Fall 2022 ‑ Generally...
Read more >
s What It Will Cost to Get a Verse From Your Favorite Rapper
$150,000 for a Polo G Verse​​ 1 on the Billboard Hot 100 in April, the cost for a feature might go up a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found