FxRanking
Find my matches
FxRanking

Forex Trading APIs: Broker Execution, Market Data and Key Differences

Time to read: 15 min minutes

Updated on 7 Nov 2026

Posted: 7 Nov 2026

Compare US forex trading APIs from OANDA, FOREX.com and tastyfx. Understand REST versus FIX, retail access, published traffic limits, live spreads, commissions and the difference between broker execution and market-data feeds.

#2

FOREX.com review of US spread-only and RAW pricing accounts, platforms and risks

FOREX.com

#3

tastyFX broker review

tastyfx

Forex trading APIs compared for US traders: REST, FIX, market data and execution costs

For US retail forex traders who want to connect their own code to a brokerage account, OANDA's v20 API is the clearest starting point for a self-directed REST integration. FOREX.com offers REST execution after an account and service-team access request. tastyfx offers a more demanding FIX connection for approved, often higher-volume users. These are not interchangeable systems, and the most suitable option depends on the desired execution workflow, technical resources and actual US account permissions.

A forex trading API can mean two different products. A broker execution API can submit, amend or cancel orders and read positions. A market-data API supplies exchange rates or historical price series but does not trade on an account. Confusing the two can lead to purchasing a data subscription that cannot place a single order. This guide separates both uses, compares published limits and trading costs, and flags the access terms that need confirmation before going live.

Forex trading API comparison for US traders

The three broker connections below are publicly associated with US retail forex providers. Access to a trading account is not the same as approval for a particular API, FIX session or account pricing plan. These are fit-based choices, not independently benchmarked rankings for latency, fill quality or uptime.

US broker forex execution API comparison, public documentation checked 7 November 2026
Broker and best fitConnection and trading functionsAccess conditionPublished traffic limitCost decision
OANDA, custom retail scriptsv20 REST orders and account endpoints; separate streaming price feedEligible v20 live or practice account and personal access tokenREST 120 requests/second per IP; 20 active streams per IP; no more than two new connections/secondSpread-only or core spreads plus commissions; live pricing follows account terms
FOREX.com, retail REST automationREST execution, historical data, streaming prices, orders and account managementOpen a US spread-only account, then request API activation from the service teamNumeric limit not disclosed on the public US API overview; obtain the current developer agreementAPI instructions reference spread-only accounts; do not assume RAW pricing applies to the same API account
tastyfx, dedicated FIX systemsFIX 5.0 SP2 over FIXT 1.1; order entry, amendment, cancellation and account stateCase-by-case approval, FIX engine, static IP, integration work and conformance testing240 order messages/minute per account, with bursts up to 20/secondAccount spreads and any applicable commission; confirm individual FIX agreement and commercial terms

OANDA publishes its current REST and streaming limits. FOREX.com describes its US REST access process. tastyfx lists FIX approval, protocol and message caps. Public limits are not promised throughput under load, and a rate ceiling is not a measure of how quickly a broker executes a trade.

What can an execution API do that a price feed cannot?

An execution API connects a strategy to an actual brokerage account. Depending on the broker and permissions, a trading application can read account balance and available margin, request tradable prices, place a market or pending order, cancel a working order and reconcile the resulting positions and fills. Authentication, order units, timestamps and supported order types vary by provider. An order acknowledgement is not the same as confirmation that the order has been fully filled.

A standalone FX data API is designed for analytics, charts, conversion rates or backtesting. Its EUR/USD quote can come from different contributors, refresh less often than a dealer's executable stream and contain a midpoint rather than the bid and ask prices applicable to a retail account. It should not be substituted for the broker's live dealing price when sizing an order or asserting an attainable spread.

REST, streaming and FIX solve different integration problems. REST uses HTTP requests and responses and is approachable for personal automation. Price streaming is a persistent feed suited to updating quotes without constant polling. FIX is a session-based industry messaging protocol requiring more elaborate state, sequence and reconnect handling. A MetaTrader Expert Advisor is yet another automation path: it runs within a supported trading terminal rather than necessarily using a broker's standalone retail API.

OANDA v20 API: the clearest documented retail REST route

OANDA is the practical starting point when the priority is a personally managed forex bot with programmatic orders and price access. Its v20 API introduction describes the ability to place, modify and close orders, retrieve account activity and request current or historical prices. The developer guide separates practice and live environments, which is useful for confirming an order workflow before enabling real funds.

The US broker is OANDA Corporation, an NFA member identified as 0325821 on its US legal page. OANDA's US account comparison lists API trading for both Standard and Elite Trader accounts and identifies spread-only and core spreads plus commissions as pricing choices. The relevant API permission and commercial terms still depend on the actual account and license agreement.

For capacity planning, the official development guide lists 120 REST requests per second per requesting IP address and 20 active pricing streams per IP, with no more than two new connections per second. Exceeding the documented REST limit can trigger HTTP 429. These figures describe the platform gateway, not a guaranteed number of accepted orders or fills. More importantly, the price streaming endpoint sends at most four price updates per second for each requested instrument, not every intermediate quote. That distinction matters to strategies built around individual ticks.

Main drawback: a functioning REST client is only the first step. The strategy also needs careful handling of partial fills, rejected orders, disconnected price streams, stale timestamps and position reconciliation. OANDA's personal access tokens give account access and must be protected like passwords. Do not embed them in shared code or a browser application.

FOREX.com API: a retail REST option that requires an activation request

FOREX.com has a meaningful US retail API offering, not merely an institutional brochure. Its US API trading page lists automated order execution, historical data, live streaming prices and account information. The same page instructs applicants to open a spread-only account and contact the service team for REST access. That access condition is more important than a generic claim that an existing login automatically unlocks developer trading.

The US entity is GAIN Capital Group LLC, doing business as FOREX.com, which identifies itself as CFTC-registered and an NFA member under 0339826 on its US regulation page. Confirm the contracting entity and account credentials rather than using documentation or opening instructions from the group's international websites.

Published limitation: the US public API overview does not give a numeric per-second request quota, subscription count or a separate API fee schedule. A trader should request the current technical specifications, rate limits, error behavior, test access, permitted account types and any connectivity charges in writing. The website distinguishes its retail REST route from a FIX service for institutions; the institutional wording is not a promise of retail FIX entitlement.

FOREX.com's US trading costs distinguish spread-only pricing from RAW pricing. The RAW account charges a published $7 per $100,000 of USD notional per side, so a $100,000-notional position opened and then closed would attract $14 in commissions before spreads and other charges. This is an explanation of the RAW schedule, not confirmation that the retail REST integration can be enabled on RAW. For the documented REST path, obtain an actual spread-only account quote and the API agreement before forecasting strategy costs.

tastyfx FIX API: useful for infrastructure teams, excessive for a basic bot

tastyfx offers a different product. Its US FIX page specifies FIX 5.0 SP2 over FIXT 1.1, not a general retail REST or WebSocket order API. Users build or operate their own FIX engine, provide static IPs, complete formal conformance testing and secure approval before production. Individuals can apply, but the documentation indicates that the engineering workload generally suits firms or traders with existing execution infrastructure.

The firm identifies itself as tastyfx, LLC, a US CFTC-registered retail foreign exchange dealer and NFA Forex Dealer Member, 0509630, in its public disclosures. US availability of the brokerage does not mean every individual applicant will obtain FIX permission. Integration approval is expressly case by case.

The published FIX order-message cap is 240 messages per minute per account, with a 20-message-per-second burst allowance. A cancellation or replacement consumes messaging capacity, so a strategy sending many adjustments needs to count its total order traffic rather than just new trades. The broker also describes a demo conformance environment and direct developer support for approved integrations.

Main drawback: this connection costs engineering effort even if a separate interface tariff is not listed publicly. FIX session maintenance, sequence recovery, network configuration, monitoring and incident response all add to ownership cost. tastyfx describes spread-based Standard pricing and separate Zero+ commission-based arrangements on its account pages; the exact account eligible for a FIX connection and any additional commercial charges require a written confirmation. For a simpler automation workflow, its FIX page points traders toward MetaTrader 5 Expert Advisors instead.

Forex market-data APIs are not broker trading APIs

For a dashboard, conversion engine or historical-analysis project, a non-broker data provider may be the more sensible choice. Twelve Data's forex API offers exchange-rate series and a separate live-data product; it explicitly describes itself as a market-data provider rather than an execution brokerage. It cannot place or close orders at OANDA, FOREX.com or tastyfx simply because an application subscribes to its feed.

When to use each API type
NeedUseWhat is missing
Send and monitor live US retail forex ordersA permitted broker execution API tied to the same live accountNo independent promise of a winning trading strategy or fill speed
Display currency rates, chart history or run data researchLicensed market-data feed, such as Twelve DataNo account balance, executable orders or broker-specific dealing spreads
Automate within MetaTrader without maintaining a FIX engineBroker-approved MetaTrader account and Expert AdvisorsNot equivalent to unrestricted broker REST or FIX access

Twelve Data's current Basic plan lists $0 per month, with 800 API requests per day and a per-minute credit allowance. Paid tiers change allowances and entitlements; the permitted commercial use of data can also differ from private development. Neither a large number of supported currency pairs nor a one-minute refresh claim establishes that the feed matches the price at which a broker will fill an order. Always check feed timestamps, bid/ask availability, redistribution rights and service terms.

US eligibility and protocol permissions come before coding

A brokerage's international developer page may include CFDs, instruments, FIX connections or accounts that cannot be opened through its US retail entity. The relevant comparison is the legal firm that will hold the account, the permissions available to that applicant and the instruments enabled for that account. A globally advertised API feature is not an assurance that a US trader can use it.

Start by checking the broker's legal name and status in NFA BASIC, including its registration, membership and disciplinary history. For this comparison, the US entities and their published identifiers are OANDA Corporation (0325821), GAIN Capital Group LLC / FOREX.com (0339826), and tastyfx, LLC (0509630). The identifiers appear in the firms' linked US disclosures; a final prepublication reviewer should independently check current BASIC records and account conditions. Registration does not certify an algorithm, guarantee an execution outcome or eliminate trading risk.

Before connecting a strategy, obtain written confirmation that the specific US retail account supports the intended API and that a demo environment is available. Confirm supported currency pairs and order types, hedging or first-in-first-out constraints, session security, data licensing and request quotas. Check whether a FIX or REST addendum creates extra charges or obligations. For example, testing a FIX feed in a controlled environment does not replace the broker's mandatory conformance approval.

API rate limits and execution reliability: the hidden comparison

A higher request limit does not prove better execution. OANDA's REST ceiling is applied per IP, while tastyfx's FIX message allowance is published per account. Those figures measure different things. FOREX.com's public overview lacks a directly comparable number. A fair technical assessment must also inspect quote staleness, acknowledgements, reconnect behavior, rejected orders and whether the client can resynchronize positions after an interruption.

  • Throttle deliberately: budget for quotes, account lookups, orders, cancellations and emergency controls. An HTTP 429 or FIX reject requires a documented retry policy rather than blind resubmission.
  • Reconcile state: after a timeout, query the broker's current orders, transactions and positions before deciding whether a trade failed. A lost response can follow a successful order.
  • Limit stale data: compare quote timestamps with the strategy's maximum acceptable age. A stream that updates four times per second is not a full tick-history feed.
  • Protect credentials: use secret storage, restricted host access and revocation procedures. Keep practice and live credentials separate, and rotate credentials after any suspected exposure.
  • Set a circuit breaker: cap order rate, gross exposure, open positions and strategy loss; stop sending orders when data or account state is uncertain.

For strategies that need a reliably running terminal or server, the forex VPS comparison explains hosting trade-offs. Hosting near a broker's infrastructure does not remove slippage or guarantee execution priority. For a broader introduction to system design, the algorithmic trading guide discusses automation approaches; check US-specific broker permissions separately.

How much does forex API trading actually cost?

Start with the account spread that was executable at the time of each strategy signal, then add any commission, swap or rollover, financing, currency conversion, market-data subscription and server cost. API access being technically available does not mean forex trading or all data usage is free. Published minimum spreads are unsuitable as assumed average fills.

OANDA's US core pricing explanation specifies $0.70 per 10,000 currency units for each leg on the relevant core spreads plus commission model. The actual trade size and currency determine the bill. FOREX.com's RAW schedule uses USD notional instead, and is not established here as available through the same REST account. tastyfx's Standard spread-only and Zero+ alternatives should be checked against the actual FIX agreement, not compared using only the lowest advertised spread.

As an illustrative calculation, one pip of spread on a 100,000-unit EUR/USD position is approximately $10 because USD is the quote currency. A hypothetical 1.0-pip entry spread therefore represents roughly $10 before any separate commission, slippage, overnight charges or differences on exit. That example is not a current quote from any provider. A robust backtest should use the same position units, timestamp and account pricing method for every candidate, then repeat the calculation with realistic spread widening and rejected orders.

Finally, check whether the strategy's quote feed is legally permitted for automated or commercial use. A free data key built for personal analysis is not necessarily licensed for a publicly distributed app. Infrastructure and licensing costs can exceed a broker's disclosed per-trade commission for low-volume strategies.

A controlled path from demo code to a live trading system

  1. Confirm the US legal entity and API entitlement. Obtain the appropriate account agreement or FIX approval in writing. Do not borrow credentials from a different regional division.
  2. Prototype the narrowest workflow. Authenticate to a practice environment, read a quote, check the account and submit a deliberately small simulated order where the API permits it.
  3. Record every request and response. Keep timestamps, order identifiers, position snapshots and error codes, without storing secrets or personal identifiers in logs.
  4. Test failures, not just success. Simulate delayed quotes, connection loss, duplicate acknowledgements, timeouts, limit breaches, rejection and partial order completion.
  5. Compare the actual cost model. Price the same signal using the broker's account-specific bid/ask spread, both commission legs where applicable, and holding costs.
  6. Apply conservative live safeguards. After all permissions and controls are confirmed, start with the minimum practical exposure, monitor the account separately and implement an independent shutdown route.

These steps are a testing framework, not a claim that live accounts were opened, API calls executed or order quality independently measured for this article. Practice accounts do not establish production latency, liquidity, rate-limit enforcement or fill prices, and none of those outcomes should be assumed from a public feature list.

Which forex API should a US trader choose?

Choose OANDA as the first technical comparison for a retail REST bot when documented token-based access, a separate practice environment and published request limits matter most. Choose FOREX.com as a serious alternative if its support team confirms REST activation, the allowed order workflow and the commercial terms fit the proposed trading account. Consider tastyfx FIX only with the infrastructure and engineering capability to justify session management, conformance tests and case-by-case approval.

For currency dashboards or backtesting without order entry, compare independent data vendors instead of choosing a forex broker solely for access to quotes. The final decision should follow a written review of US entity eligibility, the API license, account-level pricing, rate and failure limits, and a reproducible execution test. An API's feature list can identify a suitable candidate; it cannot establish which venue offers the best realized trading result.

FAQs

Which forex brokers offer a trading API to US retail customers?

OANDA provides a documented v20 REST API for eligible accounts. FOREX.com advertises US REST access after opening a spread-only account and requesting activation. tastyfx offers FIX access subject to approval, technical integration and conformance testing. Eligibility and terms depend on the actual US account and applicant.

What is the difference between a forex trading API and a forex data API?

A broker trading API can send or manage orders for an authorized account. A data API supplies current or historical currency prices without executing orders. Twelve Data, for example, is a market-data service, not an execution broker. Data-feed prices may differ from executable broker bid and ask quotes.

Does OANDA have API rate limits?

OANDA documents 120 REST requests per second per requesting IP address, 20 active streaming connections per IP and a maximum of two new connections per second. Its price stream supplies at most four price updates per second per requested instrument. These are documented interface limits, not guaranteed trade-execution capacity.

Can individuals use the tastyfx FIX API?

Individuals may apply, but approval is case by case and the broker requires a FIX engine, static IPs, integration work and conformance tests. The published FIX limit is 240 order messages per minute per account, with bursts up to 20 per second. Simple automation through a MetaTrader Expert Advisor is a separate path.

Are forex trading APIs free to use?

No general no-fee assumption is safe. Brokers charge trading spreads and, for some account types, commissions and overnight costs. A provider may also have specific connectivity, licensing or market-data terms that must be confirmed. FOREX.com documents REST activation through a spread-only account, while its separately advertised RAW commission schedule is not evidence of RAW API eligibility.

How should a forex API strategy be tested before live trading?

Use an authorized demo or conformance environment, check order and position reconciliation, model account-specific spreads and fees, and simulate timeouts, duplicate requests, stale prices, rate-limit rejects and disconnections. Require limits on position exposure and losses. Demo performance is not a reliable forecast of live fills.

Jake Robins Author FxRanking

Jake Robins

Author Profile

Jake Robins is a Forex and cryptocurrency education contributor with over 10 years of experience helping readers better understand the financial markets. His work covers risk management, technical analysis, trading psychology, broker platforms, and scam awareness. Through clear, practical guidance, Jake helps traders approach the markets with greater discipline, caution, and confidence.

Leave Your Comment

Name:

Email:

Comment:

Other Articles

Cryptocurrency deposit options at forex brokers, comparing USDT networks, broker entities, fees and withdrawal conditions

Forex Brokers Accepting Cryptocurrency Deposits: Payment Rules (2026)

Compare Capital.com, FXGT, Pepperstone and ThinkMarkets on cryptocurrency deposits, legal entities, USDT networks, regional eligibility, costs and withdrawal rules.

UK forex brokers with no inactivity fee, comparing entity terms, dormancy triggers and trading costs

Forex Brokers With No Inactivity Fee: 4 UK Options (2026)

Compare 4 UK forex brokers with no inactivity fee, including legal entities, archiving conditions, trading costs, and how OANDA and CMC dormancy fees differ.