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.
Files changed (25) hide show
  1. {primary_api_models-0.4.1 → primary_api_models-0.4.2}/PKG-INFO +13 -13
  2. {primary_api_models-0.4.1 → primary_api_models-0.4.2}/README.md +12 -12
  3. {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models.egg-info/PKG-INFO +13 -13
  4. {primary_api_models-0.4.1 → primary_api_models-0.4.2}/pyproject.toml +1 -1
  5. {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/__init__.py +0 -0
  6. {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/account_report.py +0 -0
  7. {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/commons.py +0 -0
  8. {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/detailed_instruments.py +0 -0
  9. {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/detailed_position.py +0 -0
  10. {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/enhanced_models.py +0 -0
  11. {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/enums.py +0 -0
  12. {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/instrument_details.py +0 -0
  13. {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/instruments.py +0 -0
  14. {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/market_data.py +0 -0
  15. {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/order.py +0 -0
  16. {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/order_report.py +0 -0
  17. {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/order_status.py +0 -0
  18. {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/positions.py +0 -0
  19. {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models/segments.py +0 -0
  20. {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models.egg-info/SOURCES.txt +0 -0
  21. {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models.egg-info/dependency_links.txt +0 -0
  22. {primary_api_models-0.4.1 → primary_api_models-0.4.2}/primary_api_models.egg-info/top_level.txt +0 -0
  23. {primary_api_models-0.4.1 → primary_api_models-0.4.2}/setup.cfg +0 -0
  24. {primary_api_models-0.4.1 → primary_api_models-0.4.2}/tests/test_model_dump.py +0 -0
  25. {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.1
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.1
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
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.model_validate_json(response)
200
+ data = DetailedPositionsResponse.model_validate(response)
201
201
  print(data.detailed_position)
202
202
  ```
203
203
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "primary-api-models"
7
- version = "0.4.1"
7
+ version = "0.4.2"
8
8
  description = "Primary API models"
9
9
  authors = [
10
10
  { name="Chi Tudi", email="chitudi54@gmail.com" }