diff --git a/piker/exchange/__init__.py b/piker/exchange/__init__.py new file mode 100644 index 00000000..c4fc2647 --- /dev/null +++ b/piker/exchange/__init__.py @@ -0,0 +1,20 @@ +# piker: trading gear for hackers +# Copyright (C) Tyler Goodlet (in stewardship for piker0) + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. + +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +""" +Market machinery for order executions, book, management. + +""" diff --git a/piker/_ems.py b/piker/exchange/_ems.py similarity index 99% rename from piker/_ems.py rename to piker/exchange/_ems.py index a0428e26..f594b4ac 100644 --- a/piker/_ems.py +++ b/piker/exchange/_ems.py @@ -33,10 +33,10 @@ import trio from trio_typing import TaskStatus import tractor -from . import data -from .log import get_logger -from .data._source import Symbol -from .data._normalize import iterticks +from .. import data +from ..log import get_logger +from ..data._source import Symbol +from ..data._normalize import iterticks log = get_logger(__name__) diff --git a/piker/ui/_chart.py b/piker/ui/_chart.py index b89eede9..f11ad0f0 100644 --- a/piker/ui/_chart.py +++ b/piker/ui/_chart.py @@ -62,7 +62,7 @@ from ..log import get_logger from ._exec import run_qtractor, current_screen from ._interaction import ChartView, open_order_mode from .. import fsp -from .._ems import open_ems +from ..exchange._ems import open_ems log = get_logger(__name__) diff --git a/piker/ui/_interaction.py b/piker/ui/_interaction.py index 696f24b3..4f6ee19e 100644 --- a/piker/ui/_interaction.py +++ b/piker/ui/_interaction.py @@ -33,7 +33,7 @@ import numpy as np from ..log import get_logger from ._style import _min_points_to_show, hcolor, _font from ._graphics._lines import order_line, LevelLine -from .._ems import OrderBook +from ..exchange._ems import OrderBook from ..data._source import Symbol diff --git a/piker/ui/cli.py b/piker/ui/cli.py index 1dfea298..78100523 100644 --- a/piker/ui/cli.py +++ b/piker/ui/cli.py @@ -149,6 +149,6 @@ def chart(config, symbol, profile): tractor_kwargs={ 'debug_mode': True, 'loglevel': tractorloglevel, - 'rpc_module_paths': ['piker._ems'], + 'enable_modules': ['piker.exchange._ems'], }, )