-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #90 from AsyncAlgoTrading/livetweaks
Fix spread construction, Add heartbeat, updated C++, start work on order book "lite"
- Loading branch information
Showing
17 changed files
with
365 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
from abc import ABC, abstractmethod | ||
from typing import List, Mapping, Optional | ||
|
||
from ...config import Side | ||
from ..models import Order | ||
|
||
|
||
class OrderBookBase(ABC): | ||
@abstractmethod | ||
def reset(self): | ||
pass | ||
|
||
@abstractmethod | ||
def add(self, order: Order) -> None: | ||
pass | ||
|
||
@abstractmethod | ||
def cancel(self, order: Order) -> None: | ||
pass | ||
|
||
@abstractmethod | ||
def change(self, order: Order) -> None: | ||
pass | ||
|
||
@abstractmethod | ||
def find(self, order: Order) -> Optional[Order]: | ||
pass | ||
|
||
@abstractmethod | ||
def topOfBook(self) -> Mapping[Side, List[float]]: | ||
pass | ||
|
||
@abstractmethod | ||
def spread(self) -> float: | ||
pass | ||
|
||
@abstractmethod | ||
def level(self, level: int = 0, price: float = None): | ||
pass | ||
|
||
@abstractmethod | ||
def levels(self, levels=0): | ||
pass | ||
|
||
@abstractmethod | ||
def __iter__(self): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.