Skip to content

Commit fc776ba

Browse files
committed
update relative paths
1 parent baab82a commit fc776ba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+141
-124
lines changed

examples/03_position_management.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
from project_x_py import (
2626
ProjectX,
27+
ProjectXBase,
2728
create_data_manager,
2829
create_order_manager,
2930
create_position_manager,
@@ -35,7 +36,7 @@
3536

3637

3738
async def get_current_market_price(
38-
client: ProjectX,
39+
client: ProjectXBase,
3940
symbol="MNQ",
4041
realtime_data_manager: RealtimeDataManager | None = None,
4142
):

examples/08_order_and_position_tracking.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from contextlib import suppress
3535
from datetime import datetime
3636

37-
from project_x_py import ProjectX, create_trading_suite
37+
from project_x_py import ProjectX, ProjectXBase, create_trading_suite
3838
from project_x_py.models import BracketOrderResponse, Order, Position
3939

4040

@@ -375,7 +375,7 @@ async def cleanup_all_positions_and_orders(self):
375375
except Exception as e:
376376
print(f"❌ Error during cleanup: {e}")
377377

378-
async def run(self, client: ProjectX):
378+
async def run(self, client: ProjectXBase):
379379
"""Main demo execution."""
380380
self.setup_signal_handlers()
381381
self.client = client

src/project_x_py/__init__.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,18 @@
2929
__author__ = "TexasCoding"
3030

3131
# Core client classes - renamed from Async* to standard names
32-
from .client import ProjectX
32+
from project_x_py.client import ProjectX
3333

3434
# Configuration management
35-
from .config import (
35+
from project_x_py.config import (
3636
ConfigManager,
3737
create_custom_config,
3838
load_default_config,
3939
load_topstepx_config,
4040
)
4141

4242
# Exceptions
43-
from .exceptions import (
43+
from project_x_py.exceptions import (
4444
ProjectXAuthenticationError,
4545
ProjectXConnectionError,
4646
ProjectXDataError,
@@ -53,7 +53,7 @@
5353
)
5454

5555
# Technical Analysis - Import from indicators module for backward compatibility
56-
from .indicators import (
56+
from project_x_py.indicators import (
5757
calculate_adx,
5858
calculate_atr,
5959
calculate_bollinger_bands,
@@ -70,7 +70,7 @@
7070
)
7171

7272
# Data models
73-
from .models import (
73+
from project_x_py.models import (
7474
Account,
7575
BracketOrderResponse,
7676
# Trading entities
@@ -82,17 +82,17 @@
8282
ProjectXConfig,
8383
Trade,
8484
)
85-
from .order_manager import OrderManager
86-
from .orderbook import (
85+
from project_x_py.order_manager import OrderManager
86+
from project_x_py.orderbook import (
8787
OrderBook,
8888
create_orderbook,
8989
)
90-
from .position_manager import PositionManager
91-
from .realtime import ProjectXRealtimeClient as ProjectXRealtimeClient
92-
from .realtime_data_manager import RealtimeDataManager
90+
from project_x_py.position_manager import PositionManager
91+
from project_x_py.realtime import ProjectXRealtimeClient as ProjectXRealtimeClient
92+
from project_x_py.realtime_data_manager import RealtimeDataManager
9393

9494
# Utility functions
95-
from .utils import (
95+
from project_x_py.utils import (
9696
RateLimiter,
9797
# Market analysis utilities
9898
analyze_bid_ask_spread,

src/project_x_py/client/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
- OrderBook: Level 2 market depth and microstructure analysis
2424
"""
2525

26-
from .base import ProjectXBase
27-
from .rate_limiter import RateLimiter
26+
from project_x_py.client.base import ProjectXBase
27+
from project_x_py.client.rate_limiter import RateLimiter
2828

2929

3030
class ProjectX(ProjectXBase):

src/project_x_py/client/auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from project_x_py.models import Account
1414

1515
if TYPE_CHECKING:
16-
from .protocols import ProjectXClientProtocol
16+
from project_x_py.client.protocols import ProjectXClientProtocol
1717

1818
logger = logging.getLogger(__name__)
1919

src/project_x_py/client/base.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,16 @@
77

88
import httpx
99

10+
from project_x_py.client.auth import AuthenticationMixin
11+
from project_x_py.client.cache import CacheMixin
12+
from project_x_py.client.http import HttpMixin
13+
from project_x_py.client.market_data import MarketDataMixin
14+
from project_x_py.client.rate_limiter import RateLimiter
15+
from project_x_py.client.trading import TradingMixin
1016
from project_x_py.config import ConfigManager
1117
from project_x_py.exceptions import ProjectXAuthenticationError
1218
from project_x_py.models import Account, ProjectXConfig
1319

14-
from .auth import AuthenticationMixin
15-
from .cache import CacheMixin
16-
from .http import HttpMixin
17-
from .market_data import MarketDataMixin
18-
from .rate_limiter import RateLimiter
19-
from .trading import TradingMixin
20-
2120

2221
class ProjectXBase(
2322
AuthenticationMixin,

src/project_x_py/client/cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from project_x_py.models import Instrument
1111

1212
if TYPE_CHECKING:
13-
from .protocols import ProjectXClientProtocol
13+
from project_x_py.client.protocols import ProjectXClientProtocol
1414

1515
logger = logging.getLogger(__name__)
1616

src/project_x_py/client/http.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
)
1717

1818
if TYPE_CHECKING:
19-
from .protocols import ProjectXClientProtocol
19+
from project_x_py.client.protocols import ProjectXClientProtocol
2020

2121
logger = logging.getLogger(__name__)
2222

src/project_x_py/client/market_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from project_x_py.models import Instrument
1414

1515
if TYPE_CHECKING:
16-
from .protocols import ProjectXClientProtocol
16+
from project_x_py.client.protocols import ProjectXClientProtocol
1717

1818
logger = logging.getLogger(__name__)
1919

src/project_x_py/client/protocols.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@
88
import polars as pl
99

1010
if TYPE_CHECKING:
11+
from project_x_py.client.rate_limiter import RateLimiter
1112
from project_x_py.models import Account, Instrument, Position, ProjectXConfig, Trade
1213

13-
from .rate_limiter import RateLimiter
14-
1514

1615
class ProjectXClientProtocol(Protocol):
1716
"""Protocol defining the interface that client mixins expect."""

0 commit comments

Comments
 (0)