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

Please make an API guide doc #60

Open
ibrayandiyev opened this issue Jul 28, 2022 · 3 comments
Open

Please make an API guide doc #60

ibrayandiyev opened this issue Jul 28, 2022 · 3 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed

Comments

@ibrayandiyev
Copy link

Hi Davide, thanks for your code. Actually I think the investing.com API package is a creative solution. But seems that the API guide doc is not ready yet. Or can I find it somewhere? I hope you could give me a hint. Thanks!

@DavideViolante DavideViolante added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 30, 2022
@DavideViolante
Copy link
Owner

DavideViolante commented Jul 30, 2022

There is no guide at the moment since I didn't investigate enough on how the API works.
The only things we know is on the readme in the inputs paragraph where there are all the available inputs for the APIs.

@yortug
Copy link

yortug commented Aug 17, 2022

I'm completely new to Javascript, APIs, and all the rest of it, so please forgive me if this is a bit of a dumb question!

I'm curious to know how you figured out that this particular API URL was even queryable to begin with? How did you figure out that the pairId was required for a query? How did you find out where to find the different pairId's on the website?

I'm guessing there's no documentation available to the public for this API, so I'm assuming you would have had to sort of "work backwards" to figure it all out? I'm curious about how you went about this process.

For example, I haven't investigated it at all, but it doesn't stand out to me as particularly obvious what the pointscount parameter in the API is doing? It's documented as being the total number of results returned, but what happens if you set the period=P1M, interval=P1D and pointscount=120?

To me, with those parameters, it seems like the period is set to a month, and the interval is set to daily, so then the results returned should be max 31 (i.e. a single result for every day of the month)?

I'll have to test some different parameters out to try and build my understanding, but I'm overall curious how you went about figuring all of this information out in the beginning?

@DavideViolante
Copy link
Owner

Hi @yortug thanks for the question. I just used the Google Chrome Console, Network tab. In that tab you can find all the requests the browser send to a server (website) and the responses. I found out that to load the charts they are using an internal API that does not require any auth. See gif below:

investinghowto

About the parameters, I'm also not sure what they exactly do, but I discovered them clicking the chart and watching the request parameters change.

@DavideViolante DavideViolante added the help wanted Extra attention is needed label Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants