DEFINITION of '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 interactive 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. Annual Percentage Yield - APY

    The annual percentage yield (APY) is the effective annual rate ...
  2. Open Banking

    Open Banking is a system that provides a user with a network ...
  3. Give Up

    A procedure in securities or commodities trading where the executing ...
  4. Two Dollar Broker

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

    A forex broker is a service firm that offers clients the ability ...
  6. Executing Broker

    An executing broker is a broker that processes a buy or sell ...
Related Articles
  1. Investing

    The Interest Rates: APR, APY And EAR

    When most people shop for financial products, all they focus on is the listed interest rate. Human eyes instinctively dismiss the fine print, which usually includes the terms APR (annual percentage ...
  2. Investing

    EIA vs. API: Comparing Crude Inventories Announcements

    Between the two major oil inventory reports: the API and the U.S. EIA, which is more highly regarded and why?
  3. Personal Finance

    APR and APY: Why Your Bank Hopes You Can't Tell The Difference

    Do you know the difference between Annual Percentage Rate and Annual Percentage Yield? Check out how they can affect your own account balance.
  4. Trading

    Is Your Forex Broker A Scam?

    While the forex market is slowly becoming more regulated, there are many unscrupulous brokers who should not be in business.
  5. Investing

    Brokerage Accounts, Explained

    Brokerages bring together customers or institutions and world financial markets. Here's everything to know about how they operate and what they do.
  6. Investing

    A 3D-Printed House, Built for $10,000 in Just One Day

    Apis Cor, a 3D-printing startup from California, may have developed a way to revolutionize the housing market.
  7. Investing

    How to Choose a Forex Broker: Everything You Need to Know

    Take your time when looking for a forex broker because a bad decision can be costly.
  8. Investing

    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.
  9. 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.
RELATED FAQS
  1. Why Do Brokers Ask for Personal Information?

    There are 3 reasons a broker needs personal information: suitability, record-keeping and the law. Read Answer >>
  2. Can a Broker Sell Your Stocks Without Permission?

    Find out if and when it's legal for a broker to sell securities from a customer's account and portfolio without their permission. Read Answer >>
Hot Definitions
  1. Bond

    A bond is a fixed income investment in which an investor loans money to an entity (corporate or governmental) that borrows ...
  2. Compound Annual Growth Rate - CAGR

    The Compound Annual Growth Rate (CAGR) is the mean annual growth rate of an investment over a specified period of time longer ...
  3. Net Present Value - NPV

    Net Present Value (NPV) is the difference between the present value of cash inflows and the present value of cash outflows ...
  4. Price-Earnings Ratio - P/E Ratio

    The Price-to-Earnings Ratio or P/E ratio is a ratio for valuing a company that measures its current share price relative ...
  5. Internal Rate of Return - IRR

    Internal Rate of Return (IRR) is a metric used in capital budgeting to estimate the profitability of potential investments.
  6. Limit Order

    An order placed with a brokerage to buy or sell a set number of shares at a specified price or better.
Trading Center