Types
CalendarRecord
CalendarRecord(country: str, current: str, forecast: str, impact: str, period: str, previous: str, time: Time, title: str, _other: CatchAll)
ChartLastInfoRecord
ChartLastInfoRecord(period: Period, start: Time, symbol: str, _other: CatchAll)
ChartRangeInfoRecord
ChartRangeInfoRecord(period: Period, start: Time, symbol: str, end: Time, ticks: int, _other: CatchAll)
ChartResponseRecord
ChartResponseRecord(digits: int, rateInfos: list[RateInfoRecord], _other: CatchAll)
CHART_LAST_INFO_RESPONSE_RECORD
Command
Bases: IntEnum
Command enum
BALANCE
BALANCE = 6
Read only. Used in getTradesHistory for manager's deposit/withdrawal operations (profit>0 for deposit, profit<0 for withdrawal).
BUY
BUY = 0
BUY_LIMIT
BUY_LIMIT = 2
BUY_STOP
BUY_STOP = 4
CREDIT
CREDIT = 7
Read only
SELL
SELL = 1
SELL_LIMIT
SELL_LIMIT = 3
SELL_STOP
SELL_STOP = 5
CommissionDefResponseRecord
CommissionDefResponseRecord(commission: float, rateOfExchange: float, _other: CatchAll)
COMMISSION_DEF_RESPONSE_RECORD
CurrentUserDataRecord
CurrentUserDataRecord(companyUnit: int, currency: str, group: str, ibAccount: bool, leverage: Literal[1], leverageMultiplier: float, spreadType: Literal['FLOAT'] | None, trailingStop: bool, _other: CatchAll)
CURRENT_USER_DATA_RECORD
Day
Bases: IntEnum
Day enum
FRIDAY
FRIDAY = 5
MONDAY
MONDAY = 1
SATURDAY
SATURDAY = 6
SUNDAY
SUNDAY = 7
THURSDAY
THURSDAY = 4
TUESDAY
TUESDAY = 2
WEDNESDAY
WEDNESDAY = 3
IBRecord
IBRecord(close_price: float, login: str, nominal: float, openPrice: float, side: int, surname: str, symbol: str, timestamp: Time, volume: float, _other: CatchAll)
MarginLevelRecord
MarginLevelRecord(balance: float, credit: float, currency: str, equity: float, margin: float, margin_free: float, margin_level: float, _other: CatchAll)
MARGIN_LEVEL_RECORD
MarginMode
Bases: IntEnum
MarginMode enum
CFD
CFD = 103
CFD_LEVERAGED
CFD_LEVERAGED = 102
FOREX
FOREX = 101
UNKNOWN
UNKNOWN = 104
MarginTradeRecord
MarginTradeRecord(margin: float, _other: CatchAll)
MARGIN_TRADE_RECORD
NewsTopicRecord
NewsTopicRecord(body: str, bodylen: int, key: str, time: Time, timeString: str, title: str, _other: CatchAll)
Period
Bases: IntEnum
Period enum
PERIOD_D1
PERIOD_D1 = 1440
1440 minutes (1 day)
PERIOD_H1
PERIOD_H1 = 60
60 minutes (1 hour)
PERIOD_H4
PERIOD_H4 = 240
240 minutes (4 hours)
PERIOD_M1
PERIOD_M1 = 1
1 minute
PERIOD_M15
PERIOD_M15 = 15
15 minutes
PERIOD_M30
PERIOD_M30 = 30
30 minutes
PERIOD_M5
PERIOD_M5 = 5
5 minutes
PERIOD_MN1
PERIOD_MN1 = 43200
43200 minutes (30 days)
PERIOD_W1
PERIOD_W1 = 10080
10080 minutes (1 week)
ProfitCalculationRecord
ProfitCalculationRecord(profit: float, _other: CatchAll)
PROFIT_CALCULATION_RECORD
ProfitMode
Bases: IntEnum
ProfitMode enum
CFD
CFD = 6
FOREX
FOREX = 5
QuoteId
Bases: IntEnum
QuoteId enum
CROSS
CROSS = 4
DEPTH
DEPTH = 3
FIXED
FIXED = 1
FLOAT
FLOAT = 2
UNKNOWN_1
UNKNOWN_1 = 5
UNKNOWN_2
UNKNOWN_2 = 6
QuotesRecord
QuotesRecord(day: Day, fromT: Time, toT: Time, _other: CatchAll)
RateInfoRecord
RateInfoRecord(close: float, ctm: Time, ctmString: str, high: float, low: float, open: float, vol: float, _other: CatchAll)
RequestStatus
Bases: IntEnum
RequestStatus enum
ACCEPTED
ACCEPTED = 3
The transaction has been executed successfully
ERROR
ERROR = 0
PENDING
PENDING = 1
REJECTED
REJECTED = 4
The transaction has been rejected
ServerTimeRecord
ServerTimeRecord(time: Time, timeString: str, _other: CatchAll)
SERVER_TIME_RECORD
StepRecord
StepRecord(fromValue: float, step: float, _other: CatchAll)
StepRuleRecord
StepRuleRecord(id: int, name: str, steps: list[StepRecord], _other: CatchAll)
StreamingBalanceRecord
StreamingBalanceRecord(balance: float, credit: float, equity: float, margin: float, marginFree: float, marginLevel: float, _other: CatchAll)
STREAMING_BALANCE_RECORD
StreamingCandleRecord
StreamingCandleRecord(close: float, ctm: int, ctmString: str, high: float, low: float, open: float, quoteId: QuoteId, symbol: str, vol: float, _other: CatchAll)
STREAMING_CANDLE_RECORD
StreamingKeepAliveRecord
StreamingKeepAliveRecord(timestamp: int, _other: CatchAll)
STREAMING_KEEP_ALIVE_RECORD
StreamingNewsRecord
StreamingNewsRecord(body: str, key: str, time: str, title: str, _other: CatchAll)
STREAMING_NEWS_RECORD
StreamingProfitRecord
StreamingProfitRecord(order: int, order2: int, position: int, profit: float, _other: CatchAll)
STREAMING_PROFIT_RECORD
StreamingTickRecord
StreamingTickRecord(ask: float, askVolume: int, bid: float, bidVolume: int, high: float, level: int, low: float, quoteId: QuoteId, spreadRaw: float, spreadTable: float, symbol: str, timestamp: int, _other: CatchAll)
STREAMING_TICK_RECORD
StreamingTradeRecord
StreamingTradeRecord(close_price: float, close_time: int | None, closed: bool, cmd: int, comment: str, commission: float, customComment: str | None, digits: int, expiration: int | None, margin_rate: float, offset: int, open_price: float, open_time: int, order: int, order2: int, position: int, profit: float, sl: float, state: str, storage: float, symbol: str, tp: float, type: int, volume: float, _other: CatchAll)
STREAMING_TRADE_RECORD
StreamingTradeStatusRecord
StreamingTradeStatusRecord(customComment: str | None, message: str | None, order: int, price: float, requestStatus: int, _other: CatchAll)
STREAMING_TRADE_STATUS_RECORD
SymbolRecord
SymbolRecord(ask: float, bid: float, categoryName: str, contractSize: int, currency: str, currencyPair: bool, currencyProfit: str, description: str, expiration: Time | None, groupName: str, high: float, initialMargin: int, instantMaxVolume: int, leverage: float, longOnly: bool, lotMax: float, lotMin: float, lotStep: float, low: float, marginHedged: int, marginHedgedStrong: bool, marginMaintenance: int | None, marginMode: MarginMode, percentage: float, precision: int, profitMode: ProfitMode, quoteId: QuoteId, shortSelling: bool, spreadRaw: float, spreadTable: float, starting: Time | None, stepRuleId: int, stopsLevel: int, swap_rollover3days: int, swapEnable: bool, swapLong: float, swapShort: float, swapType: int, symbol: str, tickSize: float, tickValue: float, time: Time, timeString: str, trailingEnabled: bool, type: int, _other: CatchAll)
TickPricesResponseRecord
TickPricesResponseRecord(quotations: list[TickRecord], _other: CatchAll)
TICK_PRICES_RESPONSE_RECORD
TickRecord
TickRecord(ask: float, askVolume: int, bid: float, bidVolume: int, high: float, level: int, low: float, spreadRaw: float, spreadTable: float, symbol: str, timestamp: Time, _other: CatchAll)
TradeRecord
TradeRecord(close_price: float, close_time: Time | None, close_timeString: str | None, closed: bool, cmd: Command, comment: str, commission: float, customComment: str | None, digits: int, expiration: Time | None, expirationString: str | None, margin_rate: float, offset: int, open_price: float, open_time: Time, open_timeString: str, order: int, order2: int, position: int, profit: float | None, sl: float, storage: float, symbol: str, timestamp: Time, tp: float, volume: float, _other: CatchAll)
TradeTransInfoRecord
TradeTransInfoRecord(cmd: Command, customComment: str | None, expiration: float, offset: int, order: int, price: float, sl: float, symbol: str, tp: float, type: TransactionType, volume: float, _other: CatchAll)
TradeTransResponseRecord
TradeTransResponseRecord(order: int, _other: CatchAll)
TRADE_TRANS_RESPONSE_RECORD
TradeTransactionStatusResponseRecord
TradeTransactionStatusResponseRecord(ask: float, bid: float, customComment: str | None, message: str | None, order: int, requestStatus: RequestStatus, _other: CatchAll)
TRADE_TRANS_STATUS_RESPONSE_RECORD
TradingHoursRecord
TradingHoursRecord(quotes: list[QuotesRecord], symbol: str, trading: list[TradingRecord], _other: CatchAll)
TradingRecord
TradingRecord(day: Day, fromT: Time, toT: Time, _other: CatchAll)
TransactionType
Bases: IntEnum
TransactionType enum
CLOSE
CLOSE = 2
Order close
DELETE
DELETE = 4
Order delete, only used in the tradeTransaction command
MODIFY
MODIFY = 3
Order modify, only used in the tradeTransaction command
OPEN
OPEN = 0
Order open, used for opening orders
PENDING
PENDING = 1
Order pending, only used in the streaming getTrades command
VersionRecord
VersionRecord(version: str, _other: CatchAll)