DuMb QuEsTiOn: What's an API?

Discussion in 'Trading Software' started by Babak, Oct 26, 2005.

  1. Babak


    I've searched on the net and found several defn for the acronym but its still not clear. Is it a piece of software? one that plugs into another piece of software?

    I'd appreciate anyone who can offer a clear defn (especially related to trading tech) for a non-techie. Feel free to use childishly simple analogies.

    Also, I'm a bit confused when it comes to API and software like QuoteTracker. I'm told that QT is "direct to socket". What the heck does that mean?

  2. API = application program interface

    Its defines the channel of communication between one piece of code and another (possibly within the same program but not necessarily) Its a specification, its not anything tangible. Its not software.

    Here is a trivial example, Windows has a function called MessageBox. From your program you can have Windows display a box on the screen with some text and a button by calling this function. The specifion of the input to this function is part of the Windows API, by using API calls you can call windows functions from your program. The API defines the interface.

    Quotetracker allows other programs to access some if its functionality - they can do this by using QT's API. Its API involves connecting to QT using sockets (which is nothing more than establishing a connection to the program, the programming equivalent of making a phone call). Once the call is up you can pass commands to QT and it will respond with the results. The command formats and the results it will return are defined by the API.
  3. Babak


    ok I think I understand it better. So API is more of a protocol than a stand alone piece of software. IOW a bridge to get certain software to do something.
  4. Exactly