primary-api-models 0.4.1__tar.gz → 0.4.2__tar.gz
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.
- {primary_api_models-0.4.1 → primary_api_models-0.4.2}/PKG-INFO +13 -13
- {primary_api_models-0.4.1 → primary_api_models-0.4.2}/README.md +12 -12
- {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models.egg-info/PKG-INFO +13 -13
- {primary_api_models-0.4.1 → primary_api_models-0.4.2}/pyproject.toml +1 -1
- {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/__init__.py +0 -0
- {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/account_report.py +0 -0
- {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/commons.py +0 -0
- {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/detailed_instruments.py +0 -0
- {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/detailed_position.py +0 -0
- {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/enhanced_models.py +0 -0
- {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/enums.py +0 -0
- {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/instrument_details.py +0 -0
- {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/instruments.py +0 -0
- {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/market_data.py +0 -0
- {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/order.py +0 -0
- {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/order_report.py +0 -0
- {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/order_status.py +0 -0
- {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/positions.py +0 -0
- {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/segments.py +0 -0
- {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models.egg-info/SOURCES.txt +0 -0
- {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models.egg-info/dependency_links.txt +0 -0
- {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models.egg-info/top_level.txt +0 -0
- {primary_api_models-0.4.1 → primary_api_models-0.4.2}/setup.cfg +0 -0
- {primary_api_models-0.4.1 → primary_api_models-0.4.2}/tests/test_model_dump.py +0 -0
- {primary_api_models-0.4.1 → primary_api_models-0.4.2}/tests/test_models.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: primary-api-models
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: Primary API models
|
|
5
5
|
Author-email: Chi Tudi <chitudi54@gmail.com>
|
|
6
6
|
Requires-Python: >=3.8
|
|
@@ -30,7 +30,7 @@ pyRofex.initialize(...)
|
|
|
30
30
|
|
|
31
31
|
# Get all segments
|
|
32
32
|
response = pyRofex.get_segments()
|
|
33
|
-
data = SegmentsResponse.
|
|
33
|
+
data = SegmentsResponse.model_validate(response)
|
|
34
34
|
print(data.segments)
|
|
35
35
|
```
|
|
36
36
|
|
|
@@ -44,7 +44,7 @@ pyRofex.initialize(...)
|
|
|
44
44
|
|
|
45
45
|
# Get available instrument list
|
|
46
46
|
response = pyRofex.get_all_instruments()
|
|
47
|
-
data = AllInstrumentsResponse.
|
|
47
|
+
data = AllInstrumentsResponse.model_validate(response)
|
|
48
48
|
print(data.instruments)
|
|
49
49
|
```
|
|
50
50
|
|
|
@@ -59,7 +59,7 @@ pyRofex.initialize(...)
|
|
|
59
59
|
# Get instrument list by given cfi code or segment:
|
|
60
60
|
response = pyRofex.get_instruments('by_cfi', ...)
|
|
61
61
|
response = pyRofex.get_instruments('by_segments', ...)
|
|
62
|
-
data = InstrumentsByResponse.
|
|
62
|
+
data = InstrumentsByResponse.model_validate(response)
|
|
63
63
|
print(data.instruments)
|
|
64
64
|
```
|
|
65
65
|
|
|
@@ -73,7 +73,7 @@ pyRofex.initialize(...)
|
|
|
73
73
|
|
|
74
74
|
# Get detailed instrument list
|
|
75
75
|
response = pyRofex.get_detailed_instruments()
|
|
76
|
-
data = DetailedInstrumentsResponse.
|
|
76
|
+
data = DetailedInstrumentsResponse.model_validate(response)
|
|
77
77
|
print(data.instruments)
|
|
78
78
|
```
|
|
79
79
|
|
|
@@ -87,7 +87,7 @@ pyRofex.initialize(...)
|
|
|
87
87
|
|
|
88
88
|
# Get instrument details
|
|
89
89
|
response = pyRofex.get_instrument_details(ticker="MERV - XMEV - AAPL - 24hs")
|
|
90
|
-
data = InstrumentDetailsResponse.
|
|
90
|
+
data = InstrumentDetailsResponse.model_validate(response)
|
|
91
91
|
print(data.instrument)
|
|
92
92
|
```
|
|
93
93
|
|
|
@@ -101,12 +101,12 @@ pyRofex.initialize(...)
|
|
|
101
101
|
|
|
102
102
|
# Get all order reports for the configured account
|
|
103
103
|
response = pyRofex.get_all_orders_status()
|
|
104
|
-
data = OrderStatusResponse.
|
|
104
|
+
data = OrderStatusResponse.model_validate(response)
|
|
105
105
|
print(data.orders)
|
|
106
106
|
|
|
107
107
|
# Get order status
|
|
108
108
|
response = pyRofex.get_order_status(...)
|
|
109
|
-
data = OrderStatusResponse.
|
|
109
|
+
data = OrderStatusResponse.model_validate(response)
|
|
110
110
|
print(data.order)
|
|
111
111
|
```
|
|
112
112
|
|
|
@@ -126,7 +126,7 @@ entries = [pyRofex.MarketDataEntry.BIDS,
|
|
|
126
126
|
pyRofex.MarketDataEntry.LAST]
|
|
127
127
|
|
|
128
128
|
response = pyRofex.get_market_data(ticker="MERV - XMEV - AAPL - 24hs", entries=entries)
|
|
129
|
-
data = MarketDataResponse.
|
|
129
|
+
data = MarketDataResponse.model_validate(response)
|
|
130
130
|
|
|
131
131
|
if data.status == StatusResponse.OK:
|
|
132
132
|
md = data.market_data
|
|
@@ -154,7 +154,7 @@ new_order = Order(
|
|
|
154
154
|
)
|
|
155
155
|
|
|
156
156
|
response = pyRofex.send_order(**new_order.model_dump())
|
|
157
|
-
data = OrderConfirmationResponse.
|
|
157
|
+
data = OrderConfirmationResponse.model_validate(response)
|
|
158
158
|
if data.status == StatusResponse.OK:
|
|
159
159
|
print(data.client_id)
|
|
160
160
|
```
|
|
@@ -169,7 +169,7 @@ pyRofex.initialize(...)
|
|
|
169
169
|
|
|
170
170
|
# Get account report
|
|
171
171
|
response = pyRofex.get_account_report(...)
|
|
172
|
-
data = AccountReportResponse.
|
|
172
|
+
data = AccountReportResponse.model_validate(response)
|
|
173
173
|
print(data.account_data)
|
|
174
174
|
```
|
|
175
175
|
|
|
@@ -183,7 +183,7 @@ pyRofex.initialize(...)
|
|
|
183
183
|
|
|
184
184
|
# Get all positions for an account
|
|
185
185
|
response = pyRofex.get_account_report(...)
|
|
186
|
-
data = PositionsResponse.
|
|
186
|
+
data = PositionsResponse.model_validate(response)
|
|
187
187
|
print(data.positions)
|
|
188
188
|
```
|
|
189
189
|
|
|
@@ -197,7 +197,7 @@ pyRofex.initialize(...)
|
|
|
197
197
|
|
|
198
198
|
# Get detailed positions for an account
|
|
199
199
|
response = pyRofex.get_detailed_position(...)
|
|
200
|
-
data = DetailedPositionsResponse.
|
|
200
|
+
data = DetailedPositionsResponse.model_validate(response)
|
|
201
201
|
print(data.detailed_position)
|
|
202
202
|
```
|
|
203
203
|
|
|
@@ -22,7 +22,7 @@ pyRofex.initialize(...)
|
|
|
22
22
|
|
|
23
23
|
# Get all segments
|
|
24
24
|
response = pyRofex.get_segments()
|
|
25
|
-
data = SegmentsResponse.
|
|
25
|
+
data = SegmentsResponse.model_validate(response)
|
|
26
26
|
print(data.segments)
|
|
27
27
|
```
|
|
28
28
|
|
|
@@ -36,7 +36,7 @@ pyRofex.initialize(...)
|
|
|
36
36
|
|
|
37
37
|
# Get available instrument list
|
|
38
38
|
response = pyRofex.get_all_instruments()
|
|
39
|
-
data = AllInstrumentsResponse.
|
|
39
|
+
data = AllInstrumentsResponse.model_validate(response)
|
|
40
40
|
print(data.instruments)
|
|
41
41
|
```
|
|
42
42
|
|
|
@@ -51,7 +51,7 @@ pyRofex.initialize(...)
|
|
|
51
51
|
# Get instrument list by given cfi code or segment:
|
|
52
52
|
response = pyRofex.get_instruments('by_cfi', ...)
|
|
53
53
|
response = pyRofex.get_instruments('by_segments', ...)
|
|
54
|
-
data = InstrumentsByResponse.
|
|
54
|
+
data = InstrumentsByResponse.model_validate(response)
|
|
55
55
|
print(data.instruments)
|
|
56
56
|
```
|
|
57
57
|
|
|
@@ -65,7 +65,7 @@ pyRofex.initialize(...)
|
|
|
65
65
|
|
|
66
66
|
# Get detailed instrument list
|
|
67
67
|
response = pyRofex.get_detailed_instruments()
|
|
68
|
-
data = DetailedInstrumentsResponse.
|
|
68
|
+
data = DetailedInstrumentsResponse.model_validate(response)
|
|
69
69
|
print(data.instruments)
|
|
70
70
|
```
|
|
71
71
|
|
|
@@ -79,7 +79,7 @@ pyRofex.initialize(...)
|
|
|
79
79
|
|
|
80
80
|
# Get instrument details
|
|
81
81
|
response = pyRofex.get_instrument_details(ticker="MERV - XMEV - AAPL - 24hs")
|
|
82
|
-
data = InstrumentDetailsResponse.
|
|
82
|
+
data = InstrumentDetailsResponse.model_validate(response)
|
|
83
83
|
print(data.instrument)
|
|
84
84
|
```
|
|
85
85
|
|
|
@@ -93,12 +93,12 @@ pyRofex.initialize(...)
|
|
|
93
93
|
|
|
94
94
|
# Get all order reports for the configured account
|
|
95
95
|
response = pyRofex.get_all_orders_status()
|
|
96
|
-
data = OrderStatusResponse.
|
|
96
|
+
data = OrderStatusResponse.model_validate(response)
|
|
97
97
|
print(data.orders)
|
|
98
98
|
|
|
99
99
|
# Get order status
|
|
100
100
|
response = pyRofex.get_order_status(...)
|
|
101
|
-
data = OrderStatusResponse.
|
|
101
|
+
data = OrderStatusResponse.model_validate(response)
|
|
102
102
|
print(data.order)
|
|
103
103
|
```
|
|
104
104
|
|
|
@@ -118,7 +118,7 @@ entries = [pyRofex.MarketDataEntry.BIDS,
|
|
|
118
118
|
pyRofex.MarketDataEntry.LAST]
|
|
119
119
|
|
|
120
120
|
response = pyRofex.get_market_data(ticker="MERV - XMEV - AAPL - 24hs", entries=entries)
|
|
121
|
-
data = MarketDataResponse.
|
|
121
|
+
data = MarketDataResponse.model_validate(response)
|
|
122
122
|
|
|
123
123
|
if data.status == StatusResponse.OK:
|
|
124
124
|
md = data.market_data
|
|
@@ -146,7 +146,7 @@ new_order = Order(
|
|
|
146
146
|
)
|
|
147
147
|
|
|
148
148
|
response = pyRofex.send_order(**new_order.model_dump())
|
|
149
|
-
data = OrderConfirmationResponse.
|
|
149
|
+
data = OrderConfirmationResponse.model_validate(response)
|
|
150
150
|
if data.status == StatusResponse.OK:
|
|
151
151
|
print(data.client_id)
|
|
152
152
|
```
|
|
@@ -161,7 +161,7 @@ pyRofex.initialize(...)
|
|
|
161
161
|
|
|
162
162
|
# Get account report
|
|
163
163
|
response = pyRofex.get_account_report(...)
|
|
164
|
-
data = AccountReportResponse.
|
|
164
|
+
data = AccountReportResponse.model_validate(response)
|
|
165
165
|
print(data.account_data)
|
|
166
166
|
```
|
|
167
167
|
|
|
@@ -175,7 +175,7 @@ pyRofex.initialize(...)
|
|
|
175
175
|
|
|
176
176
|
# Get all positions for an account
|
|
177
177
|
response = pyRofex.get_account_report(...)
|
|
178
|
-
data = PositionsResponse.
|
|
178
|
+
data = PositionsResponse.model_validate(response)
|
|
179
179
|
print(data.positions)
|
|
180
180
|
```
|
|
181
181
|
|
|
@@ -189,7 +189,7 @@ pyRofex.initialize(...)
|
|
|
189
189
|
|
|
190
190
|
# Get detailed positions for an account
|
|
191
191
|
response = pyRofex.get_detailed_position(...)
|
|
192
|
-
data = DetailedPositionsResponse.
|
|
192
|
+
data = DetailedPositionsResponse.model_validate(response)
|
|
193
193
|
print(data.detailed_position)
|
|
194
194
|
```
|
|
195
195
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: primary-api-models
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: Primary API models
|
|
5
5
|
Author-email: Chi Tudi <chitudi54@gmail.com>
|
|
6
6
|
Requires-Python: >=3.8
|
|
@@ -30,7 +30,7 @@ pyRofex.initialize(...)
|
|
|
30
30
|
|
|
31
31
|
# Get all segments
|
|
32
32
|
response = pyRofex.get_segments()
|
|
33
|
-
data = SegmentsResponse.
|
|
33
|
+
data = SegmentsResponse.model_validate(response)
|
|
34
34
|
print(data.segments)
|
|
35
35
|
```
|
|
36
36
|
|
|
@@ -44,7 +44,7 @@ pyRofex.initialize(...)
|
|
|
44
44
|
|
|
45
45
|
# Get available instrument list
|
|
46
46
|
response = pyRofex.get_all_instruments()
|
|
47
|
-
data = AllInstrumentsResponse.
|
|
47
|
+
data = AllInstrumentsResponse.model_validate(response)
|
|
48
48
|
print(data.instruments)
|
|
49
49
|
```
|
|
50
50
|
|
|
@@ -59,7 +59,7 @@ pyRofex.initialize(...)
|
|
|
59
59
|
# Get instrument list by given cfi code or segment:
|
|
60
60
|
response = pyRofex.get_instruments('by_cfi', ...)
|
|
61
61
|
response = pyRofex.get_instruments('by_segments', ...)
|
|
62
|
-
data = InstrumentsByResponse.
|
|
62
|
+
data = InstrumentsByResponse.model_validate(response)
|
|
63
63
|
print(data.instruments)
|
|
64
64
|
```
|
|
65
65
|
|
|
@@ -73,7 +73,7 @@ pyRofex.initialize(...)
|
|
|
73
73
|
|
|
74
74
|
# Get detailed instrument list
|
|
75
75
|
response = pyRofex.get_detailed_instruments()
|
|
76
|
-
data = DetailedInstrumentsResponse.
|
|
76
|
+
data = DetailedInstrumentsResponse.model_validate(response)
|
|
77
77
|
print(data.instruments)
|
|
78
78
|
```
|
|
79
79
|
|
|
@@ -87,7 +87,7 @@ pyRofex.initialize(...)
|
|
|
87
87
|
|
|
88
88
|
# Get instrument details
|
|
89
89
|
response = pyRofex.get_instrument_details(ticker="MERV - XMEV - AAPL - 24hs")
|
|
90
|
-
data = InstrumentDetailsResponse.
|
|
90
|
+
data = InstrumentDetailsResponse.model_validate(response)
|
|
91
91
|
print(data.instrument)
|
|
92
92
|
```
|
|
93
93
|
|
|
@@ -101,12 +101,12 @@ pyRofex.initialize(...)
|
|
|
101
101
|
|
|
102
102
|
# Get all order reports for the configured account
|
|
103
103
|
response = pyRofex.get_all_orders_status()
|
|
104
|
-
data = OrderStatusResponse.
|
|
104
|
+
data = OrderStatusResponse.model_validate(response)
|
|
105
105
|
print(data.orders)
|
|
106
106
|
|
|
107
107
|
# Get order status
|
|
108
108
|
response = pyRofex.get_order_status(...)
|
|
109
|
-
data = OrderStatusResponse.
|
|
109
|
+
data = OrderStatusResponse.model_validate(response)
|
|
110
110
|
print(data.order)
|
|
111
111
|
```
|
|
112
112
|
|
|
@@ -126,7 +126,7 @@ entries = [pyRofex.MarketDataEntry.BIDS,
|
|
|
126
126
|
pyRofex.MarketDataEntry.LAST]
|
|
127
127
|
|
|
128
128
|
response = pyRofex.get_market_data(ticker="MERV - XMEV - AAPL - 24hs", entries=entries)
|
|
129
|
-
data = MarketDataResponse.
|
|
129
|
+
data = MarketDataResponse.model_validate(response)
|
|
130
130
|
|
|
131
131
|
if data.status == StatusResponse.OK:
|
|
132
132
|
md = data.market_data
|
|
@@ -154,7 +154,7 @@ new_order = Order(
|
|
|
154
154
|
)
|
|
155
155
|
|
|
156
156
|
response = pyRofex.send_order(**new_order.model_dump())
|
|
157
|
-
data = OrderConfirmationResponse.
|
|
157
|
+
data = OrderConfirmationResponse.model_validate(response)
|
|
158
158
|
if data.status == StatusResponse.OK:
|
|
159
159
|
print(data.client_id)
|
|
160
160
|
```
|
|
@@ -169,7 +169,7 @@ pyRofex.initialize(...)
|
|
|
169
169
|
|
|
170
170
|
# Get account report
|
|
171
171
|
response = pyRofex.get_account_report(...)
|
|
172
|
-
data = AccountReportResponse.
|
|
172
|
+
data = AccountReportResponse.model_validate(response)
|
|
173
173
|
print(data.account_data)
|
|
174
174
|
```
|
|
175
175
|
|
|
@@ -183,7 +183,7 @@ pyRofex.initialize(...)
|
|
|
183
183
|
|
|
184
184
|
# Get all positions for an account
|
|
185
185
|
response = pyRofex.get_account_report(...)
|
|
186
|
-
data = PositionsResponse.
|
|
186
|
+
data = PositionsResponse.model_validate(response)
|
|
187
187
|
print(data.positions)
|
|
188
188
|
```
|
|
189
189
|
|
|
@@ -197,7 +197,7 @@ pyRofex.initialize(...)
|
|
|
197
197
|
|
|
198
198
|
# Get detailed positions for an account
|
|
199
199
|
response = pyRofex.get_detailed_position(...)
|
|
200
|
-
data = DetailedPositionsResponse.
|
|
200
|
+
data = DetailedPositionsResponse.model_validate(response)
|
|
201
201
|
print(data.detailed_position)
|
|
202
202
|
```
|
|
203
203
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/detailed_instruments.py
RENAMED
|
File without changes
|
{primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/detailed_position.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/instrument_details.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|