Identifiers ¶
- class AccountId ( unicode value ) ¶
-
Bases:
Identifier
Represents a valid account ID.
Must be correctly formatted with two valid strings either side of a hyphen. It is expected an account ID is the name of the issuer with an account number separated by a hyphen.
Example: “IB-D02851908”.
- Parameters :
-
value ( str ) – The account ID value.
Warning
-
The issuer and number ID combination must be unique at the firm level.
-
Panics at runtime if value is not a valid string containing a hyphen.
- get_id ( self ) unicode ¶
-
Return the account ID without issuer name.
- Returns :
-
str
- get_issuer ( self ) unicode ¶
-
Return the account issuer for this ID.
- Returns :
-
str
- value ¶
-
Return the identifier (ID) value.
- Returns :
-
str
- class ClientId ( unicode value ) ¶
-
Bases:
ComponentId
Represents a system client ID.
- Parameters :
-
value ( str ) – The client ID value.
- Raises :
-
ValueError – If value is not a valid string.
Warning
-
The ID value must be unique at the trader level.
-
Panics at runtime if value is not a valid string.
- value ¶
-
Return the identifier (ID) value.
- Returns :
-
str
- class ClientOrderId ( unicode value ) ¶
-
Bases:
Identifier
Represents a valid client order ID (assigned by the Nautilus system).
- Parameters :
-
value ( str ) – The client order ID value.
Warning
-
The ID value must be unique at the firm level.
-
Panics at runtime if value is not a valid string.
- value ¶
-
Return the identifier (ID) value.
- Returns :
-
str
- class ComponentId ( unicode value ) ¶
-
Bases:
Identifier
Represents a valid component ID.
- Parameters :
-
value ( str ) – The component ID value.
- Raises :
-
ValueError – If value is not a valid string.
Warning
-
The ID value must be unique at the trader level.
-
Panics at runtime if value is not a valid string.
- value ¶
-
Return the identifier (ID) value.
- Returns :
-
str
- class ExecAlgorithmId ( unicode value ) ¶
-
Bases:
ComponentId
Represents a valid execution algorithm ID.
- Parameters :
-
value ( str ) – The execution algorithm ID value.
Warning
-
Panics at runtime if value is not a valid string.
References
https://www.onixs.biz/fix-dictionary/5.0/tagnum_1003.html
- value ¶
-
Return the identifier (ID) value.
- Returns :
-
str
- class Identifier ¶
-
Bases:
object
The base class for all identifiers.
- value ¶
-
Return the identifier (ID) value.
- Returns :
-
str
- class InstrumentId ( Symbol symbol , Venue venue ) ¶
-
Bases:
Identifier
Represents a valid instrument ID.
The symbol and venue combination should uniquely identify the instrument.
- Parameters :
- static from_str ( unicode value: str ) InstrumentId ¶
-
Return an instrument ID parsed from the given string value. Must be correctly formatted including characters either side of a single period.
Examples: “AUD/USD.IDEALPRO”, “BTCUSDT.BINANCE”
- Parameters :
-
value ( str ) – The instrument ID string value to parse.
- Returns :
-
InstrumentId
- symbol ¶
-
The instrument ticker symbol.
- Returns :
-
Symbol
- value ¶
-
Return the identifier (ID) value.
- Returns :
-
str
- venue ¶
-
The instrument trading venue.
- Returns :
-
Venue
- class OrderListId ( unicode value ) ¶
-
Bases:
Identifier
Represents a valid order list ID (assigned by the Nautilus system).
- Parameters :
-
value ( str ) – The order list ID value.
Warning
-
Panics at runtime if value is not a valid string.
- value ¶
-
Return the identifier (ID) value.
- Returns :
-
str
- class PositionId ( unicode value ) ¶
-
Bases:
Identifier
Represents a valid position ID.
- Parameters :
-
value ( str ) – The position ID value.
Warning
-
Panics at runtime if value is not a valid string.
- value ¶
-
Return the identifier (ID) value.
- Returns :
-
str
- class StrategyId ( unicode value ) ¶
-
Bases:
ComponentId
Represents a valid strategy ID.
Must be correctly formatted with two valid strings either side of a hyphen. It is expected a strategy ID is the class name of the strategy, with an order ID tag number separated by a hyphen.
Example: “EMACross-001”.
- Parameters :
-
value ( str ) – The strategy ID value.
Warning
-
The name and tag combination must be unique at the trader level.
-
Panics at runtime if value is not a valid string containing a hyphen.
- get_tag ( self ) unicode ¶
-
Return the order ID tag value for this ID.
- Returns :
-
str
- is_external ( self ) bool ¶
-
If the strategy ID is the global ‘external’ strategy. This represents the strategy for all orders interacting with this instance of the system which did not originate from any strategy being managed by the system.
- Returns :
-
bool
- value ¶
-
Return the identifier (ID) value.
- Returns :
-
str
- class Symbol ( unicode value ) ¶
-
Bases:
Identifier
Represents a valid ticker symbol ID for a tradable financial market instrument.
- Parameters :
-
value ( str ) – The ticker symbol ID value.
Warning
-
The ID value must be unique for a trading venue.
-
Panics at runtime if value is not a valid string.
References
https://en.wikipedia.org/wiki/Ticker_symbol
- value ¶
-
Return the identifier (ID) value.
- Returns :
-
str
- class TradeId ( unicode value ) ¶
-
Bases:
Identifier
Represents a valid trade match ID (assigned by a trading venue).
Can correspond to the TradeID <1003> field of the FIX protocol.
The unique ID assigned to the trade entity once it is received or matched by the exchange or central counterparty.
- Parameters :
-
value ( str ) – The trade match ID value.
Warning
-
Panics at runtime if value is not a valid string.
References
https://www.onixs.biz/fix-dictionary/5.0/tagnum_1003.html
- value ¶
-
Return the identifier (ID) value.
- Returns :
-
str
- class TraderId ( unicode value ) ¶
-
Bases:
ComponentId
Represents a valid trader ID.
Must be correctly formatted with two valid strings either side of a hyphen. It is expected a trader ID is the abbreviated name of the trader with an order ID tag number separated by a hyphen.
Example: “TESTER-001”.
- Parameters :
-
value ( str ) – The trader ID value.
Warning
-
The name and tag combination ID value must be unique at the firm level.
-
Panics at runtime if value is not a valid string containing a hyphen.
- get_tag ( self ) unicode ¶
-
Return the order ID tag value for this ID.
- Returns :
-
str
- value ¶
-
Return the identifier (ID) value.
- Returns :
-
str
- class Venue ( unicode name ) ¶
-
Bases:
Identifier
Represents a valid trading venue ID.
- Parameters :
-
name ( str ) – The venue ID value.
Warning
-
Panics at runtime if value is not a valid string.
- value ¶
-
Return the identifier (ID) value.
- Returns :
-
str
- class VenueOrderId ( unicode value ) ¶
-
Bases:
Identifier
Represents a valid venue order ID (assigned by a trading venue).
- Parameters :
-
value ( str ) – The venue assigned order ID value.
Warning
-
Panics at runtime if value is not a valid string.
- value ¶
-
Return the identifier (ID) value.
- Returns :
-
str