Skip to content

Commit

Permalink
ADD: Add three IntelligentCross MICs to Venue list
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack Culhane committed Nov 11, 2024
1 parent 1583310 commit 855c661
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ This release adds support for Python v3.13.

#### Enhancements
- Added support for Python 3.13
- Added new IntelligentCross venues `ASPN`, `ASMT`, and `ASPI`

#### Deprecations
- Deprecated `packaging` parameter for `Historical.batch.submit_job` which will be removed in a future release
Expand Down
27 changes: 27 additions & 0 deletions databento/common/publishers.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ class Venue(StringyMixin, str, Enum):
Long-Term Stock Exchange, Inc..
XOFF
Off-Exchange Transactions - Listed Instruments.
ASPN
IntelligentCross ASPEN Intelligent Bid/Offer.
ASMT
IntelligentCross ASPEN Maker/Taker.
ASPI
IntelligentCross ASPEN Inverted.
"""

Expand Down Expand Up @@ -148,6 +154,9 @@ class Venue(StringyMixin, str, Enum):
SPHR = "SPHR"
LTSE = "LTSE"
XOFF = "XOFF"
ASPN = "ASPN"
ASMT = "ASMT"
ASPI = "ASPI"

@classmethod
def from_int(cls, value: int) -> Venue:
Expand Down Expand Up @@ -240,6 +249,12 @@ def from_int(cls, value: int) -> Venue:
return Venue.LTSE
if value == 43:
return Venue.XOFF
if value == 44:
return Venue.ASPN
if value == 45:
return Venue.ASMT
if value == 46:
return Venue.ASPI
raise ValueError(f"Integer value {value} does not correspond with any Venue variant")

def to_int(self) -> int:
Expand Down Expand Up @@ -332,6 +347,12 @@ def to_int(self) -> int:
return 42
if self == Venue.XOFF:
return 43
if self == Venue.ASPN:
return 44
if self == Venue.ASMT:
return 45
if self == Venue.ASPI:
return 46
raise ValueError("Invalid Venue")

@property
Expand Down Expand Up @@ -425,6 +446,12 @@ def description(self) -> str:
return "Long-Term Stock Exchange, Inc."
if self == Venue.XOFF:
return "Off-Exchange Transactions - Listed Instruments"
if self == Venue.ASPN:
return "IntelligentCross ASPEN Intelligent Bid/Offer"
if self == Venue.ASMT:
return "IntelligentCross ASPEN Maker/Taker"
if self == Venue.ASPI:
return "IntelligentCross ASPEN Inverted"
raise ValueError("Unexpected Venue value")


Expand Down

0 comments on commit 855c661

Please sign in to comment.