What is an 'Application Programming Interface - API'

An application programming interface, or API, is a "go-between" that enables a software program to interact with other software. In the context of trading, an API often refers to the interface that enables your software to connect with a broker to obtain real-time pricing data or place trades.

BREAKING DOWN 'Application Programming Interface - API'

Application programming interfaces, or APIs, have become increasingly popular with the rise of automated trading systems. In the past, retail traders were forced to screen for opportunities in one application and separately place trades with their broker. Many retail brokers now provide APIs that enable traders to directly connect their screening software with the brokerage account to share real-time prices and place orders. Traders can even develop their own applications, using programming languages like Python, and execute trades using a broker's API.

There are two types of traders that use broker APIs:

  • Third-Party Applications - Many traders use third-party applications that require access to broker APIs for pricing data and the ability to place trades. For example, MetaTrader is one of the most popular foreign exchange (forex) trading applications and requires API access in order to secure real-time pricing and place trades.
  • Developer Applications - A growing number of traders develop their own automated trading systems, using programming languages like Python, and require a way to access pricing data and place trades.

Despite the obvious benefits of APIs, there are many risks to consider. Most APIs are provided to a broker's customers free-of-charge, but there are some cases where traders may incur an extra fee. It's important to understand these fees before using the API. Traders should also be aware of any API limitations, including the potential for downtime, which could have a significant effect on trading results.

Where to Find APIs

The most popular brokers supporting API access in the traditional stock and futures markets include TradeStation, TDAmeritrade, and InteractiveBrokers, but many smaller brokers have expanded access over time. APIs are more common among forex brokers where third-party applications and trading systems - such as MetaTrader - have been commonly used for many years.

Many brokers provide online documentation for their APIs, where developers can find out exactly how to authenticate with the API, what data is available for consumption, how to place orders through the API, and other technical details. It's important to be familiar with these details before choosing a broker when looking for specific functionality.

Some brokers also provide libraries in various languages to make interaction with their API easier. For example, a broker may offer a Python library that provides a set of functions, or methods, for placing a trade rather than having to write your own functions to do so. This can help accelerate development of trading systems and/or make them less costly to develop.

RELATED TERMS
  1. Two Dollar Broker

    A two dollar broker is a floor broker who executes orders for ...
  2. Forex Broker

    A forex broker is a service firm that offers clients the ability ...
  3. Deep Discount Broker

    A deep discount broker mediates sales and exchanges between securities ...
  4. Broker

    1. An individual or firm that charges a fee or commission for ...
  5. Trading Platform

    A trading platform is a software through which investors and ...
  6. Online Currency Exchange

    The online currency exchange is an internet-based system for ...
Related Articles
  1. Tech

    Blockchain to Catalyze a Second-Wave API Economy

    Open protocol lets developers take part in the API economy without sacrificing privacy, while retaining the ability to maximize profits.
  2. Investing

    Picking your first broker

    If you're a rookie investor, choosing a broker may be your first big investment decision. Learn more on whether you should you go with a full-service broker or a discount broker.
  3. Trading

    How New Traders Can Downplay Costs

    Concentrate on learning to play the game well in your first year as a trader, avoiding high information costs.
  4. Investing

    Google Buys Apigee To Boost Its Enterprise Cloud

    Google's latest purchase is part of the company's strategy of playing catch up with Amazon and Microsoft in the enterprise cloud
  5. Investing

    What is a Discount Broker?

    A discount broker is a stockbroker who carries out "buy" and "sell" orders at a reduced commission compared to a full-service broker, but provides no investment advice.
  6. Trading

    Price Shading In The Forex Markets

    This practice puts brokers ahead of their clients, but it doesn't have to be a negative for traders.
  7. IPF - Broker

    Tradestation vs Interactive Brokers

    TradeStation and Interactive Brokers both target experienced investors who need broad access to the capital markets, advanced order entry tools, and low costs.
  8. Personal Finance

    5 Financial Math Skills Every Teen Should Learn

    Calculus is good for abstract thinking, but what math skills should every student learn for managing his or her money?
  9. Insights

    Fidelity Investments Makes It Easier to Access Its Data With Mobile Apps

    Fidelity Investments launched an API that enables third-party financial websites and fintechs to access customer information.
RELATED FAQS
  1. What should I look for when choosing a forex trading platform?

    A trading platform is a piece of software that acts as a conduit for information between a trader and a broker. A trading ... Read Answer >>
  2. Can a Broker Sell Your Stocks Without Permission?

    In this article, find out if and when it's legal for a broker to sell securities from a customer's account and portfolio ... Read Answer >>
Trading Center