How to build an API?
I want to learn how to create an Application Program Interface and more specifically an API that gives access to financial data.
Observing members:
0
Composing members:
0
6 Answers
Yeah. This is so complicated I would avoid it if all you can do is bang out a single sentence.
I mean to be rude. Like, you do not have the skill-set to do what you want without making a disaster.
As @johnpowell said, you have a lot to learn.
First question you need to ask: Are you the supplier of the data, or are you the consumer of the data? That’s a fundamental first step.
Assuming you are the consumer of the data, you are acting as the client and querying the server of the financial data using their API. So you don’t get to dictate how the API is constructed or how it works – you have to read their documentation and then build your software to make the API call.
For example, suppose you want to pull data from the New York Times. You would go to their API page link, see what APIs they have, then get a token for login.
Then you would study their API to see what data you need to send in the initial message, and what data they will send you back.
Then you need to write the GUI that will be used to display that data in your app.
If there is even one word in what I have written that you do not understand, then you are not ready.
^I’m wondering does Fox News have such API..)
@johnpowell What if am a supplier? How do I create an API for my data consumers?
Thanks.
There is nothing fancy about a API. It is pretty much a normal request and you return the request in a usable format. This is generally JSON. Think of it as a fast way to get stuff from a database without parsing all the html/css/JS bloat.
My objection here was the use of financial data. If you don’t know what is fairly basic stuff you shouldn’t be messing with info that people make financial decisions on. It would be fairly easy to mess up and move a decimal place and that could be a disaster in the financial sector.
This is one of those times where if you’re asking on this site, you have no business attempting what you’re trying to accomplish. I.e. If you’re not smart enough to find a more specific resource for coding up a programmatic interface that could expose potentially sensitive financial data, then you have no business creating something that could be a huge security vulnerability.
For non-programmers: it would be the equivalent of a pre-med student asking how to perform an appendectomy in only one sentence with the intention of actually attempting to perform the procedure based on the responses to the question.
Answer this question
This question is in the General Section. Responses must be helpful and on-topic.