tradesmart 2.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tradesmart/__init__.py +112 -0
- tradesmart/__main__.py +8 -0
- tradesmart/_cli.py +776 -0
- tradesmart/_client_core.py +308 -0
- tradesmart/_contract_cache.py +95 -0
- tradesmart/_key_store.py +183 -0
- tradesmart/_links.py +31 -0
- tradesmart/_logging.py +86 -0
- tradesmart/_option_contracts.py +550 -0
- tradesmart/_session.py +70 -0
- tradesmart/_slicing.py +344 -0
- tradesmart/_ticks.py +35 -0
- tradesmart/_token_store.py +226 -0
- tradesmart/_transport/__init__.py +1 -0
- tradesmart/_transport/async_http.py +185 -0
- tradesmart/_transport/codec.py +388 -0
- tradesmart/_transport/outcome.py +112 -0
- tradesmart/_transport/ratelimit.py +194 -0
- tradesmart/_transport/retry.py +31 -0
- tradesmart/_transport/sync_http.py +368 -0
- tradesmart/_version.py +1 -0
- tradesmart/analytics.py +170 -0
- tradesmart/async_client.py +822 -0
- tradesmart/auth.py +88 -0
- tradesmart/client.py +794 -0
- tradesmart/config.py +179 -0
- tradesmart/endpoints/__init__.py +1 -0
- tradesmart/endpoints/base.py +88 -0
- tradesmart/endpoints/gtt.py +251 -0
- tradesmart/endpoints/market.py +235 -0
- tradesmart/endpoints/orders.py +277 -0
- tradesmart/endpoints/portfolio.py +46 -0
- tradesmart/endpoints/user.py +16 -0
- tradesmart/enums.py +138 -0
- tradesmart/errors.py +154 -0
- tradesmart/greeks.py +556 -0
- tradesmart/instruments.py +500 -0
- tradesmart/models/__init__.py +1 -0
- tradesmart/models/base.py +387 -0
- tradesmart/models/gtt.py +190 -0
- tradesmart/models/market.py +249 -0
- tradesmart/models/orders.py +364 -0
- tradesmart/models/portfolio.py +159 -0
- tradesmart/models/stream.py +218 -0
- tradesmart/models/user.py +32 -0
- tradesmart/py.typed +0 -0
- tradesmart/stream/__init__.py +9 -0
- tradesmart/stream/async_stream.py +809 -0
- tradesmart/stream/delivery.py +194 -0
- tradesmart/stream/protocol.py +188 -0
- tradesmart/stream/state.py +88 -0
- tradesmart/stream/sync_stream.py +630 -0
- tradesmart/testing/__init__.py +14 -0
- tradesmart/testing/_broker.py +434 -0
- tradesmart/testing/_replies.py +849 -0
- tradesmart/testing/_rest.py +559 -0
- tradesmart/testing/_state.py +771 -0
- tradesmart/testing/_ws.py +225 -0
- tradesmart/testing/drills.py +72 -0
- tradesmart/testing/pytest_plugin.py +52 -0
- tradesmart-2.0.0.dist-info/METADATA +166 -0
- tradesmart-2.0.0.dist-info/RECORD +66 -0
- tradesmart-2.0.0.dist-info/WHEEL +4 -0
- tradesmart-2.0.0.dist-info/entry_points.txt +2 -0
- tradesmart-2.0.0.dist-info/licenses/LICENSE +202 -0
- tradesmart-2.0.0.dist-info/licenses/NOTICE +7 -0
tradesmart/__init__.py
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"""TradeSmart API V2 client."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from tradesmart._slicing import SlicedOrderResult
|
|
6
|
+
from tradesmart._ticks import round_to_tick
|
|
7
|
+
from tradesmart._version import __version__
|
|
8
|
+
from tradesmart.analytics import Buildup, BuildupReading, OptionChainSnapshot
|
|
9
|
+
from tradesmart.async_client import AsyncTradeSmart
|
|
10
|
+
from tradesmart.auth import AccessToken, build_authorize_url, compute_checksum
|
|
11
|
+
from tradesmart.client import TradeSmart
|
|
12
|
+
from tradesmart.config import ClientConfig
|
|
13
|
+
from tradesmart.enums import (
|
|
14
|
+
Exchange,
|
|
15
|
+
GttAlertType,
|
|
16
|
+
GttValidity,
|
|
17
|
+
OrderStatus,
|
|
18
|
+
OrderType,
|
|
19
|
+
Product,
|
|
20
|
+
TransactionType,
|
|
21
|
+
Validity,
|
|
22
|
+
)
|
|
23
|
+
from tradesmart.errors import (
|
|
24
|
+
APIError,
|
|
25
|
+
AuthenticationError,
|
|
26
|
+
ConfigurationError,
|
|
27
|
+
NetworkError,
|
|
28
|
+
NotFoundError,
|
|
29
|
+
OrderRejectedError,
|
|
30
|
+
OrderStatusUnknownError,
|
|
31
|
+
RateLimitError,
|
|
32
|
+
RequestTimeoutError,
|
|
33
|
+
RequestValidationError,
|
|
34
|
+
ResponseParseError,
|
|
35
|
+
ServerError,
|
|
36
|
+
SubscriptionLimitError,
|
|
37
|
+
TradeSmartError,
|
|
38
|
+
TransportError,
|
|
39
|
+
)
|
|
40
|
+
from tradesmart.greeks import OptionGreeks
|
|
41
|
+
from tradesmart.models.gtt import Gtt, TriggeredGtt
|
|
42
|
+
from tradesmart.models.stream import (
|
|
43
|
+
ConnectAck,
|
|
44
|
+
DepthAck,
|
|
45
|
+
DepthFeed,
|
|
46
|
+
HeartbeatAck,
|
|
47
|
+
OrderUpdate,
|
|
48
|
+
PositionAck,
|
|
49
|
+
PositionUpdate,
|
|
50
|
+
StreamMessage,
|
|
51
|
+
TouchlineAck,
|
|
52
|
+
TouchlineFeed,
|
|
53
|
+
UnknownMessage,
|
|
54
|
+
UnsubscribeAck,
|
|
55
|
+
)
|
|
56
|
+
from tradesmart.stream import AsyncTradeSmartStream, StreamState, TradeSmartStream
|
|
57
|
+
|
|
58
|
+
__all__ = [
|
|
59
|
+
"APIError",
|
|
60
|
+
"AccessToken",
|
|
61
|
+
"AsyncTradeSmart",
|
|
62
|
+
"AsyncTradeSmartStream",
|
|
63
|
+
"AuthenticationError",
|
|
64
|
+
"Buildup",
|
|
65
|
+
"BuildupReading",
|
|
66
|
+
"ClientConfig",
|
|
67
|
+
"ConfigurationError",
|
|
68
|
+
"ConnectAck",
|
|
69
|
+
"DepthAck",
|
|
70
|
+
"DepthFeed",
|
|
71
|
+
"Exchange",
|
|
72
|
+
"Gtt",
|
|
73
|
+
"GttAlertType",
|
|
74
|
+
"GttValidity",
|
|
75
|
+
"HeartbeatAck",
|
|
76
|
+
"NetworkError",
|
|
77
|
+
"NotFoundError",
|
|
78
|
+
"OptionChainSnapshot",
|
|
79
|
+
"OptionGreeks",
|
|
80
|
+
"OrderRejectedError",
|
|
81
|
+
"OrderStatus",
|
|
82
|
+
"OrderStatusUnknownError",
|
|
83
|
+
"OrderUpdate",
|
|
84
|
+
"PositionAck",
|
|
85
|
+
"PositionUpdate",
|
|
86
|
+
"OrderType",
|
|
87
|
+
"Product",
|
|
88
|
+
"RateLimitError",
|
|
89
|
+
"RequestTimeoutError",
|
|
90
|
+
"RequestValidationError",
|
|
91
|
+
"ResponseParseError",
|
|
92
|
+
"Validity",
|
|
93
|
+
"ServerError",
|
|
94
|
+
"SlicedOrderResult",
|
|
95
|
+
"StreamMessage",
|
|
96
|
+
"StreamState",
|
|
97
|
+
"SubscriptionLimitError",
|
|
98
|
+
"TouchlineAck",
|
|
99
|
+
"TouchlineFeed",
|
|
100
|
+
"TradeSmart",
|
|
101
|
+
"TradeSmartError",
|
|
102
|
+
"TradeSmartStream",
|
|
103
|
+
"TransactionType",
|
|
104
|
+
"TransportError",
|
|
105
|
+
"TriggeredGtt",
|
|
106
|
+
"UnknownMessage",
|
|
107
|
+
"UnsubscribeAck",
|
|
108
|
+
"__version__",
|
|
109
|
+
"build_authorize_url",
|
|
110
|
+
"compute_checksum",
|
|
111
|
+
"round_to_tick",
|
|
112
|
+
]
|