Forex API
Tick-level quotes for 50+ currency pairs including majors, minors and exotics.
Stream tick-level Forex, Crypto, Stock, Commodity and Index data over a single WebSocket and REST API. Get a free key in seconds — no sales call required.
| Symbol | Asset class | Price | Latest move |
|---|---|---|---|
| EUR/USD ForexEuro / US Dollar | Forex | - | - |
| BTC/USDT CryptoBitcoin | Crypto | - | - |
| ETH/USDT CryptoEthereum | Crypto | - | - |
| AAPL StockApple Inc. | Stock | - | - |
| XAU/USD CommodityGold Spot | Commodity | - | - |
| USD/JPY ForexUS Dollar / Yen | Forex | - | - |
| NVDA StockNVIDIA Corp. | Stock | - | - |
| SPX IndexS&P 500 Index | Index | - | - |
Every market AllTick covers is available through the same unified REST and WebSocket interface.
Tick-level quotes for 50+ currency pairs including majors, minors and exotics.
Real-time spot and derivatives data, normalized into one feed.
Equities across US, Hong Kong and mainland China with trades and quotes.
Live pricing for precious metals and energy.
Benchmark index values and constituents for major global indices.
Compare coverage, latency and data types across every AllTick market.
Browse productsHow AllTick compares to a typical legacy market-data vendor.
| Capability | AllTick | Typical Legacy Vendor |
|---|---|---|
| Median WebSocket latency | ~150ms | 400–800ms |
| Asset classes in one API | 5 (FX, Crypto, Stock, Commodities, Indices) | 1–2 |
| Uptime SLA | 99.95% | 99.5% or none |
| Free tier | Yes — instant API key | Sales call required |
| WebSocket streaming | Native | Polling / limited |
Connect over WebSocket and subscribe to any symbol across any market.
# AllTick realtime financial data API
# forex crypto stock commodities indices
import asyncio, json, uuid
import websockets
subscribe = {
"cmd_id": 22004,
"seq_id": 1,
"trace": str(uuid.uuid4()),
"data": {"symbol_list": [{"code": "EURUSD"}]},
}
heartbeat = {"cmd_id": 22000, "seq_id": 1, "trace": "heartbeat", "data": {}}
async def stream():
uri = "wss://quote.alltick.co/quote-b-ws-api?token=YOUR_API_KEY"
async with websockets.connect(uri) as socket:
await socket.send(json.dumps(subscribe))
async def keep_alive():
while True:
await asyncio.sleep(10)
await socket.send(json.dumps(heartbeat))
asyncio.create_task(keep_alive())
async for message in socket:
print(json.loads(message))
asyncio.run(stream())Cut market-data costs by 60% while adding crypto coverage.
“Migrating to AllTick let us consolidate three vendors into one WebSocket feed and ship our trading app a quarter early.”Read case study
Served 40k concurrent users with sub-200ms quote updates.
“The 99.95% SLA and consistent latency were exactly what our retail brokerage needed to scale globally.”Read case study
Backtested 12 years of tick data across 5 asset classes.
“Having historical and live data from a single normalized API removed weeks of data-engineering work.”Read case study
Generate a free API key in seconds and connect to every market from one endpoint.
Practical writing on market data engineering, streaming APIs and building low-latency financial applications.
Generate a free API key in seconds and connect to every market from one endpoint.

I. What Are Fractional Shares in U.S. Stock Trading? Fractional shares allow investors to buy stocks or ETFs in decimal quantities rather than being limited to whole shares such as “1 share” or “2 shares.” In typical implementations, the mi
Fractional shares allow investors to buy stocks or ETFs in decimal quantities rather than being limited to whole shares such as “1 share” or “2 shares.” In typical implementations, the minimum tradable unit can be as small as 0.0001 shares, and many brokers support notional orders, where users place orders by dollar amount—for example, buying $5 worth of a stock.
This mechanism significantly lowers the barrier to entry. For instance, if a large-cap tech stock trades at $500 per share, investors previously needed at least $500 to participate. With fractional shares, they can invest tens or even just a few dollars to own a proportional stake.
From a system design perspective, this means that the entire trading lifecycle—order placement, risk control, clearing, reporting, and corporate actions—must support decimal share quantities and notional-based orders.
Based on publicly available rules from major brokers such as Alpaca, Interactive Brokers, Futu, and Webull, fractional share trading follows a relatively consistent set of constraints.
Two mutually exclusive order modes are supported:
qty can be a decimal value, such as 0.1 shares or 0.0001 shares.notional specifies the dollar amount to invest, such as buying $10 worth of a stock.An order must specify either qty or notional, but never both.
Common hard constraint:
time_in_force = DAY.GTC, IOC, FOK, and similar options are typically not permitted.Not all stocks or ETFs support fractional trading. Typically, only high-liquidity, large-cap, and retail-friendly instruments are eligible.
fractionable to indicate whether a symbol supports fractional trading.0.0001 shares.Fractional trading can be broken down at the system level into:
order models, validation logic, capability flags, clearing/reporting, and dividend handling.
A typical fractional order request should include:
symbol: instrument symbolside: buy / selltype: market, limit, etc.timeInForce: usually restricted to DAYqty (optional): decimal share quantitynotional (optional): dollar amountlimitPrice: for limit or stop ordersextendedHours: pre-market / after-hours flagTypeScript Example: Frontend / Gateway DTO
export interface FractionalOrderRequest { // by alltick.co
symbol: string;
side: "buy" | "sell";
type: "market" | "limit" | "stop" | "stop_limit";
timeInForce: "day";
qty?: string; // decimal quantity, string-based
notional?: string; // dollar-based order
limitPrice?: string;
extendedHours?: boolean;
}
function validateFractionalOrder(req: FractionalOrderRequest) { // by alltick.co
const hasQty = !!req.qty;
const hasNotional = !!req.notional;
// qty / notional must be mutually exclusive
if (hasQty === hasNotional) {
throw new Error("Either qty or notional must be provided, but not both");
}
// timeInForce must be DAY
if (req.timeInForce !== "day") {
throw new Error("Fractional orders only support timeInForce=day");
}
// limit / stop orders require price
if (["limit", "stop", "stop_limit"].includes(req.type) && !req.limitPrice) {
throw new Error("limitPrice is required for type " + req.type);
}
const checkPrecision = (v: string, field: string) => {
if (!/^\d+(\.\d{1,6})?$/.test(v)) {
throw new Error(`${field} must have at most 6 decimal places`);
}
};
if (req.qty) checkPrecision(req.qty, "qty");
if (req.notional) checkPrecision(req.notional, "notional");
if (req.limitPrice) checkPrecision(req.limitPrice, "limitPrice");
}
On the backend—especially in Java stacks—fractional trading typically involves:
DTOs, validation, risk checks, broker API adapters, and clearing/reporting normalization.
public class FractionalOrderRequest { // by alltick.co
private String symbol;
private Side side;
private OrderType type;
private TimeInForce timeInForce;
// Exactly one of qty or notional
private String qty;
private String notional;
private String limitPrice;
private Boolean extendedHours;
public enum Side { BUY, SELL }
public enum OrderType { MARKET, LIMIT, STOP, STOP_LIMIT }
public enum TimeInForce { DAY, GTC, IOC }
// getters / setters omitted
}
import java.math.BigDecimal;
import java.util.Objects;
public class FractionalOrderValidator { // by alltick.co
public static void validate(FractionalOrderRequest req) {
Objects.requireNonNull(req.getSymbol(), "symbol is required");
Objects.requireNonNull(req.getSide(), "side is required");
Objects.requireNonNull(req.getType(), "type is required");
Objects.requireNonNull(req.getTimeInForce(), "timeInForce is required");
boolean hasQty = req.getQty() != null && !req.getQty().isEmpty();
boolean hasNotional = req.getNotional() != null && !req.getNotional().isEmpty();
if (hasQty == hasNotional) {
throw new IllegalArgumentException("Either qty or notional must be set, but not both");
}
if (req.getTimeInForce() != FractionalOrderRequest.TimeInForce.DAY) {
throw new IllegalArgumentException("Fractional orders only support timeInForce=DAY");
}
switch (req.getType()) {
case LIMIT:
case STOP:
case STOP_LIMIT:
if (req.getLimitPrice() == null) {
throw new IllegalArgumentException("limitPrice is required for type " + req.getType());
}
break;
default:
}
if (hasQty) checkScale(req.getQty(), "qty", 6);
if (hasNotional) checkScale(req.getNotional(), "notional", 6);
if (req.getLimitPrice() != null) checkScale(req.getLimitPrice(), "limitPrice", 6);
if (hasQty) {
BigDecimal q = new BigDecimal(req.getQty());
if (q.compareTo(new BigDecimal("0.0001")) < 0) {
throw new IllegalArgumentException("Minimum fractional qty is 0.0001");
}
}
if (hasNotional) {
BigDecimal n = new BigDecimal(req.getNotional());
if (n.compareTo(new BigDecimal("1")) < 0) {
throw new IllegalArgumentException("Minimum notional is 1 USD");
}
}
}
private static void checkScale(String value, String field, int scale) {
BigDecimal bd = new BigDecimal(value);
if (bd.scale() > scale) {
throw new IllegalArgumentException(field + " must have at most " + scale + " decimal places");
} if (bd.signum() <= 0) { throw new IllegalArgumentException(field + " must be positive"); } }}
Fractional trading significantly impacts clearing and regulatory reporting systems.
import java.math.BigDecimal;
import java.math.RoundingMode;
public class ReportingUtil { // by alltick.co
public static BigDecimal normalizeInternalQty(BigDecimal qty) {
return qty.setScale(8, RoundingMode.HALF_UP);
}
public static String toFinraFractionalQty(BigDecimal qty) {
return qty.setScale(6, RoundingMode.DOWN).toPlainString();
}
}
import java.math.BigDecimal;
import java.math.RoundingMode;
public class DividendService { // by alltick.co
public static BigDecimal calcDividend(String positionShares, String dividendPerShare) {
BigDecimal pos = new BigDecimal(positionShares);
BigDecimal div = new BigDecimal(dividendPerShare);
return pos.multiply(div).setScale(4, RoundingMode.HALF_UP);
}
}
To successfully support U.S. fractional share trading:
fractionable, minFractionQty to instrumentscanFractional, canShort, canMargin to accountsqty and notionaltime_in_force = DAYOnce all these components are in place, your system can smoothly support U.S. fractional share trading and scale to multiple brokers or even custom matching engines with minimal friction.
Generate a free API key in seconds and connect to every market from one endpoint.