Skip to content

Commit

Permalink
Improve exchange field description and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdsellers committed Mar 14, 2024
1 parent 84a4417 commit ddf2369
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 14 deletions.
5 changes: 3 additions & 2 deletions docs/integrations/databento.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,15 @@ by either the original source venue, or internally by Databento during normaliza
It's important to realize that this is different to the Nautilus `InstrumentId`
which is a string made up of a symbol + venue with a period separator i.e. `"{symbol}.{venue}"`.

The Nautilus decoder will use the Databento `raw_symbol` for the Nautilus `symbol` and an [ISO 10383 MIC](https://www.iso20022.org/market-identifier-codes) (Market Identification Code)
The Nautilus decoder will use the Databento `raw_symbol` for the Nautilus `symbol` and an [ISO 10383 MIC](https://www.iso20022.org/market-identifier-codes) (Market Identifier Code)
from the Databento instrument definition message for the Nautilus `venue`.

Databento datasets are identified with a *dataset code* which is not the same
as a venue identifier. You can read more about Databento dataset naming conventions [here](https://docs.databento.com/api-reference-historical/basics/datasets).

Of particular note is for CME Globex MDP 3.0 data (`GLBX.MDP3` dataset code), the following
exchanges are all grouped under the `GLBX` venue:
exchanges are all grouped under the `GLBX` venue. These mappings can be determined from the
instruments `exchange` field:
- `CBCM` - **XCME-XCBT inter-exchange spread**
- `NYUM` - **XNYM-DUMX inter-exchange spread**
- `XCBT` - **Chicago Board of Trade (CBOT)**
Expand Down
2 changes: 1 addition & 1 deletion nautilus_core/model/src/instruments/futures_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub struct FuturesContract {
pub id: InstrumentId,
pub raw_symbol: Symbol,
pub asset_class: AssetClass,
/// The exchanges ISO 10383 Market Identifier Code (MIC) where the instrument trades.
/// The exchange ISO 10383 Market Identifier Code (MIC) where the instrument trades.
pub exchange: Option<Ustr>,
pub underlying: Ustr,
pub activation_ns: UnixNanos,
Expand Down
2 changes: 1 addition & 1 deletion nautilus_core/model/src/instruments/futures_spread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub struct FuturesSpread {
pub id: InstrumentId,
pub raw_symbol: Symbol,
pub asset_class: AssetClass,
/// The exchanges ISO 10383 Market Identifier Code (MIC) where the instrument trades.
/// The exchange ISO 10383 Market Identifier Code (MIC) where the instrument trades.
pub exchange: Option<Ustr>,
pub underlying: Ustr,
pub strategy_type: Ustr,
Expand Down
2 changes: 1 addition & 1 deletion nautilus_core/model/src/instruments/options_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub struct OptionsContract {
pub id: InstrumentId,
pub raw_symbol: Symbol,
pub asset_class: AssetClass,
/// The exchanges ISO 10383 Market Identifier Code (MIC) where the instrument trades.
/// The exchange ISO 10383 Market Identifier Code (MIC) where the instrument trades.
pub exchange: Option<Ustr>,
pub underlying: Ustr,
pub option_kind: OptionKind,
Expand Down
2 changes: 1 addition & 1 deletion nautilus_core/model/src/instruments/options_spread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub struct OptionsSpread {
pub id: InstrumentId,
pub raw_symbol: Symbol,
pub asset_class: AssetClass,
/// The exchanges ISO 10383 Market Identifier Code (MIC) where the instrument trades.
/// The exchange ISO 10383 Market Identifier Code (MIC) where the instrument trades.
pub exchange: Option<Ustr>,
pub underlying: Ustr,
pub strategy_type: Ustr,
Expand Down
2 changes: 1 addition & 1 deletion nautilus_trader/model/instruments/futures_contract.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ from nautilus_trader.model.instruments.base cimport Instrument

cdef class FuturesContract(Instrument):
cdef readonly str exchange
"""The exchanges ISO 10383 Market Identifier Code (MIC) where the instrument trades.\n\n:returns: `str` or ``None``"""
"""The exchange ISO 10383 Market Identifier Code (MIC) where the instrument trades.\n\n:returns: `str` or ``None``"""
cdef readonly str underlying
"""The underlying asset for the contract.\n\n:returns: `str`"""
cdef readonly uint64_t activation_ns
Expand Down
2 changes: 1 addition & 1 deletion nautilus_trader/model/instruments/futures_contract.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ cdef class FuturesContract(Instrument):
ts_init : uint64_t
The UNIX timestamp (nanoseconds) when the data object was initialized.
exchange : str, optional
The instruments ISO 10383 Market Identifier Code (MIC).
The exchange ISO 10383 Market Identifier Code (MIC) where the instrument trades.
info : dict[str, object], optional
The additional instrument information.
Expand Down
2 changes: 1 addition & 1 deletion nautilus_trader/model/instruments/futures_spread.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ from nautilus_trader.model.instruments.base cimport Instrument

cdef class FuturesSpread(Instrument):
cdef readonly str exchange
"""The exchanges ISO 10383 Market Identifier Code (MIC) where the instrument trades.\n\n:returns: `str` or ``None``"""
"""The exchange ISO 10383 Market Identifier Code (MIC) where the instrument trades.\n\n:returns: `str` or ``None``"""
cdef readonly str underlying
"""The underlying asset for the spread.\n\n:returns: `str`"""
cdef readonly str strategy_type
Expand Down
2 changes: 1 addition & 1 deletion nautilus_trader/model/instruments/futures_spread.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ cdef class FuturesSpread(Instrument):
ts_init : uint64_t
The UNIX timestamp (nanoseconds) when the data object was initialized.
exchange : str, optional
The instruments ISO 10383 Market Identifier Code (MIC).
The exchange ISO 10383 Market Identifier Code (MIC) where the instrument trades.
info : dict[str, object], optional
The additional instrument information.
Expand Down
2 changes: 1 addition & 1 deletion nautilus_trader/model/instruments/options_contract.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ from nautilus_trader.model.objects cimport Price

cdef class OptionsContract(Instrument):
cdef readonly str exchange
"""The exchanges ISO 10383 Market Identifier Code (MIC) where the instrument trades.\n\n:returns: `str` or ``None``"""
"""The exchange ISO 10383 Market Identifier Code (MIC) where the instrument trades.\n\n:returns: `str` or ``None``"""
cdef readonly str underlying
"""The underlying asset for the contract.\n\n:returns: `str`"""
cdef readonly OptionKind option_kind
Expand Down
2 changes: 1 addition & 1 deletion nautilus_trader/model/instruments/options_contract.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ cdef class OptionsContract(Instrument):
ts_init : uint64_t
The UNIX timestamp (nanoseconds) when the data object was initialized.
exchange : str, optional
The instruments ISO 10383 Market Identifier Code (MIC).
The exchange ISO 10383 Market Identifier Code (MIC) where the instrument trades.
info : dict[str, object], optional
The additional instrument information.
Expand Down
2 changes: 1 addition & 1 deletion nautilus_trader/model/instruments/options_spread.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ from nautilus_trader.model.objects cimport Price

cdef class OptionsSpread(Instrument):
cdef readonly str exchange
"""The exchanges ISO 10383 Market Identifier Code (MIC) where the instrument trades.\n\n:returns: `str` or ``None``"""
"""The exchang ISO 10383 Market Identifier Code (MIC) where the instrument trades.\n\n:returns: `str` or ``None``"""
cdef readonly str underlying
"""The underlying asset for the contract.\n\n:returns: `str`"""
cdef readonly str strategy_type
Expand Down
2 changes: 1 addition & 1 deletion nautilus_trader/model/instruments/options_spread.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ cdef class OptionsSpread(Instrument):
ts_init : uint64_t
The UNIX timestamp (nanoseconds) when the data object was initialized.
exchange : str, optional
The instruments ISO 10383 Market Identifier Code (MIC).
The exchange ISO 10383 Market Identifier Code (MIC) where the instrument trades.
info : dict[str, object], optional
The additional instrument information.
Expand Down

0 comments on commit ddf2369

Please sign in to comment.