Skip to content

Symbols API

Symbol information lookup and search operations.

Access via client.symbols.

SymbolsAPI

SymbolsAPI

Bases: BaseAPI

Symbol information and search operations.

Provides methods to list, retrieve, and search trading symbols.

Example
# List all available symbols
symbols = await client.symbols.list_all(account_id)

# Search for EUR pairs
eur_pairs = await client.symbols.search(account_id, "EUR")

# Get full details for specific symbols
eurusd = await client.symbols.get_by_id(account_id, 270)

list_all(account_id, timeout=None)

List all available symbols (lightweight info).

Returns basic symbol information without full trading parameters.
Use get_by_ids() for complete symbol details.

Parameters:

Name Type Description Default
account_id int

The cTID trader account ID.

required
timeout float | None

Request timeout (uses default if None).

None

Returns:

Type Description
list[SymbolInfo]

List of SymbolInfo objects with basic symbol data.

Raises:

Type Description
APIError

If request fails.

CTraderConnectionTimeoutError

If request times out.

get_by_ids(account_id, symbol_ids, timeout=None)

Get full symbol details by IDs.

Parameters:

Name Type Description Default
account_id int

The cTID trader account ID.

required
symbol_ids list[int]

List of symbol IDs to retrieve.

required
timeout float | None

Request timeout (uses default if None).

None

Returns:

Type Description
list[Symbol]

List of Symbol objects with full trading parameters.

Raises:

Type Description
APIError

If request fails.

CTraderConnectionTimeoutError

If request times out.

get_by_id(account_id, symbol_id, timeout=None)

Get a single symbol by ID.

Parameters:

Name Type Description Default
account_id int

The cTID trader account ID.

required
symbol_id int

The symbol ID.

required
timeout float | None

Request timeout (uses default if None).

None

Returns:

Type Description
Symbol

Symbol with full trading parameters.

Raises:

Type Description
ValueError

If symbol not found.

APIError

If request fails.

CTraderConnectionTimeoutError

If request times out.

search(account_id, query, timeout=None)

Search symbols by name.

Performs case-insensitive substring matching on symbol names.

Parameters:

Name Type Description Default
account_id int

The cTID trader account ID.

required
query str

Search string (e.g., "EUR", "BTCUSD").

required
timeout float | None

Request timeout (uses default if None).

None

Returns:

Type Description
list[SymbolInfo]

List of matching SymbolInfo objects.

Raises:

Type Description
APIError

If request fails.

CTraderConnectionTimeoutError

If request times out.

Usage Examples

List All Symbols

# Get lightweight info for all symbols
symbols = await client.symbols.list_all(account_id)

for sym in symbols:
    print(f"{sym.symbol_id}: {sym.name}")

Get Symbol by ID

# Get full symbol details
symbol = await client.symbols.get_by_id(account_id, 270)

print(f"Digits: {symbol.digits}")
print(f"Lot size: {symbol.lot_size}")
print(f"Min volume: {symbol.min_volume}")
print(f"Max volume: {symbol.max_volume}")

Get Multiple Symbols

symbols = await client.symbols.get_by_ids(account_id, [270, 271, 272])

for sym in symbols:
    print(f"{sym.name}: {sym.digits} digits, lot_size={sym.lot_size}")

Search Symbols

# Find all EUR pairs
eur_pairs = await client.symbols.search(account_id, "EUR")

for sym in eur_pairs:
    print(sym.name)

Commission

A broker states a commission as a rate and a type. The type says what the rate counts, so
you must read the two together. The same rate of 35 is 35 USD per million USD of volume
for one symbol, and 35 USD per lot for another.

from ctrader_api_client import CommissionType

symbol = await client.symbols.get_by_id(account_id, 270)
commission = symbol.commission

print(f"{commission.rate} ({commission.type.value})")
print(f"Minimum: {commission.minimum} {commission.minimum_asset}")
Type Meaning of the rate
USD_PER_MILLION_USD USD per million USD of traded volume. Usual for forex.
USD_PER_LOT USD per lot. Usual for commodity and index CFDs and futures.
PERCENTAGE_OF_VALUE Percent of the traded value. Usual for equities.
QUOTE_CCY_PER_LOT The symbol's quote currency per lot.

The broker charges the commission per side, so a round turn costs twice the rate. The
charge lands in USD for the first two types, and in the symbol's quote currency for
QUOTE_CCY_PER_LOT. Convert to your deposit currency yourself. See
Models for the arithmetic of each type,
and for how to apply minimum.

Swap

A broker states a swap as two rates and a type. The type says what the rates count, so
you must read them together. The same rate of -1.5 is pips per lot for one symbol, and
an annual percent for another. A negative rate is a charge.

from ctrader_api_client import SwapCalculationType

symbol = await client.symbols.get_by_id(account_id, 270)
swap = symbol.swap

print(f"{swap.long} / {swap.short} ({swap.calculation_type.value})")
print(f"Tripled on {swap.triple_day.value}")
print(f"Charged every {swap.period_hours} hours from {swap.charge_time} UTC")
Type Meaning of the rates
PIPS Pips per lot, per charge period.
PERCENTAGE Annual percent of the position value.
POINTS Points per lot, per charge period.

The broker charges the swap once per period_hours, starting at charge_time UTC. On
triple_day the charge is three times the rate, to cover the weekend. period_hours is
None when the broker does not publish it. See
Models for every field.

Trading Hours

Every Symbol arrives with its trading calendar attached, so asking when a symbol is open
costs no extra request:

from datetime import date

symbol = await client.symbols.get_by_id(account_id, 270)
hours = symbol.trading_hours

if hours.is_open():
    print("open now, closes at", hours.next_close())
else:
    print("closed, opens at", hours.next_open())

for session in hours.sessions_on(date(2026, 6, 19)):
    print(session.start, "->", session.end, f"({session.duration})")

Sessions are reported in the symbol's own schedule_timezone and are never merged, so a
schedule with a nightly maintenance break reports one session either side of it.

Holidays

Holidays are closed windows that cut into the weekly schedule rather than replacing a whole
day. A broker publishing an "early close" sends a window covering the rest of the day, which
brings the close forward:

# Regular Friday: 01:05 - 23:50. With a 20:00 early close holiday:
hours.sessions_on(date(2026, 6, 19))  # -> one session, 01:05 - 20:00

hours.holidays_on(date(2026, 6, 19))  # -> the holiday responsible

A holiday carries its own timezone, which is not always the symbol's. A closure defined in
a timezone an hour behind the symbol's straddles two of the symbol's calendar days, and both
are shortened accordingly.

A holiday whose window is empty (start_second >= end_second, which brokers send as 0/0)
closes the entire day.

Trading mode is separate

is_open() answers the calendar question only. A symbol can be closed to trading by its
trading_mode while the schedule says it is open, so check both:

tradable = hours.is_open() and symbol.trading_mode == TradingMode.ENABLED

Staleness

Schedules arrive only with a symbol fetch, so a long-lived Symbol can drift. Subscribe to
SymbolChangedEvent and re-fetch when the server reports a change. The API exposes no
historical schedules — what you receive is the current configuration.

Volume Conversion

The cTrader API uses volume in "cents" (smallest volume units). The relationship between lots and volume depends on the symbol's lot_size:

symbol = await client.symbols.get_by_id(account_id, 270)

# Lots to volume (for placing orders)
volume = symbol.lots_to_volume(1.0)    # e.g., 10000000 for standard forex

# Volume to lots (for display)
lots = symbol.volume_to_lots(10000000)   # e.g., 1.0 for standard forex

Note: Different instruments have different lot sizes. Always use the symbol's methods for conversion:

# Standard forex (lot_size=100000)
forex_symbol = await client.symbols.get_by_id(account_id, 1)  # EURUSD (lot_size=10000000)
forex_volume = forex_symbol.lots_to_volume(0.1)  # 1000000

# Index CFD might have different lot_size
index_symbol = await client.symbols.get_by_id(account_id, 270)  # US500 (lot_size=100)
index_volume = index_symbol.lots_to_volume(0.1)  # 10