invezgo-sdk 1.0.0__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.
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Invezgo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
@@ -0,0 +1,5 @@
1
+ include README.md
2
+ include LICENSE
3
+ include requirements.txt
4
+ recursive-include invezgo *.py
5
+
@@ -0,0 +1,281 @@
1
+ Metadata-Version: 2.4
2
+ Name: invezgo-sdk
3
+ Version: 1.0.0
4
+ Summary: Python SDK for Invezgo API - Indonesian Stock Market Data
5
+ Home-page: https://invezgo.com
6
+ Author: Invezgo
7
+ Author-email: Invezgo <admin@invezgo.com>
8
+ License: MIT
9
+ Project-URL: Homepage, https://invezgo.com
10
+ Project-URL: Documentation, https://invezgo.com
11
+ Project-URL: Repository, https://github.com/invezgo/invezgo-sdk-python
12
+ Project-URL: Bug Reports, https://github.com/invezgo/invezgo-sdk-python/issues
13
+ Keywords: invezgo,indonesia,stock,market,api,sdk,investment,trading
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.7
20
+ Classifier: Programming Language :: Python :: 3.8
21
+ Classifier: Programming Language :: Python :: 3.9
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Operating System :: OS Independent
25
+ Requires-Python: >=3.7
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE
28
+ Requires-Dist: requests>=2.28.0
29
+ Requires-Dist: typing-extensions>=4.0.0; python_version < "3.8"
30
+ Dynamic: author
31
+ Dynamic: home-page
32
+ Dynamic: license-file
33
+ Dynamic: requires-python
34
+
35
+ # Invezgo Python SDK
36
+
37
+ [![Python Version](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)
38
+ [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
39
+ [![PyPI](https://img.shields.io/pypi/v/invezgo-sdk.svg)](https://pypi.org/project/invezgo-sdk/)
40
+
41
+ Python SDK untuk mengakses [Invezgo API](https://invezgo.com) - Data Saham Indonesia yang lengkap dan terpercaya.
42
+
43
+ ## Fitur
44
+
45
+ - ✅ Akses lengkap ke semua endpoint Invezgo API
46
+ - ✅ Type hints untuk better IDE support
47
+ - ✅ Error handling yang comprehensive
48
+ - ✅ Async-ready (future support)
49
+ - ✅ Easy to use dan developer-friendly
50
+
51
+ ## Instalasi
52
+
53
+ ```bash
54
+ pip install invezgo-sdk
55
+ ```
56
+
57
+ ## Quick Start
58
+
59
+ ```python
60
+ from invezgo import InvezgoClient
61
+
62
+ # Inisialisasi client dengan API key
63
+ client = InvezgoClient(api_key="your-api-key-here")
64
+
65
+ # Atau dengan base URL custom
66
+ client = InvezgoClient(
67
+ api_key="your-api-key-here",
68
+ base_url="https://api.invezgo.com"
69
+ )
70
+
71
+ # Contoh: Dapatkan daftar saham
72
+ stocks = client.analysis.get_stock_list()
73
+ print(stocks)
74
+
75
+ # Contoh: Dapatkan informasi perusahaan
76
+ info = client.analysis.get_information(code="BBCA")
77
+ print(info)
78
+
79
+ # Contoh: Dapatkan chart harga saham
80
+ chart = client.analysis.get_chart(
81
+ code="BBCA",
82
+ from_date="2024-12-01",
83
+ to_date="2024-12-30"
84
+ )
85
+ print(chart)
86
+ ```
87
+
88
+ ## Dokumentasi Lengkap
89
+
90
+ ### Authentication
91
+
92
+ Semua request memerlukan API key yang valid. Dapatkan API key di [Invezgo API Settings](https://invezgo.com/id/setting/api).
93
+
94
+ ```python
95
+ client = InvezgoClient(api_key="your-api-key")
96
+ ```
97
+
98
+ ### Data Saham Indonesia
99
+
100
+ #### Daftar Saham dan Broker
101
+
102
+ ```python
103
+ # Daftar semua saham
104
+ stocks = client.analysis.get_stock_list()
105
+
106
+ # Daftar semua broker
107
+ brokers = client.analysis.get_broker_list()
108
+ ```
109
+
110
+ #### Informasi Perusahaan
111
+
112
+ ```python
113
+ # Informasi lengkap perusahaan
114
+ info = client.analysis.get_information(code="BBCA")
115
+ ```
116
+
117
+ #### Chart dan Harga
118
+
119
+ ```python
120
+ # Chart harga saham lengkap
121
+ chart = client.analysis.get_chart(
122
+ code="BBCA",
123
+ from_date="2024-12-01",
124
+ to_date="2024-12-30"
125
+ )
126
+
127
+ # Intraday chart
128
+ intraday = client.analysis.get_intraday(code="BBCA", market="RG")
129
+
130
+ # Chart dengan indikator
131
+ indicator_chart = client.analysis.get_indicator_chart(
132
+ code="BBCA",
133
+ indicator="rsi",
134
+ from_date="2024-12-01",
135
+ to_date="2024-12-30"
136
+ )
137
+ ```
138
+
139
+ #### Top Gainer & Loser
140
+
141
+ ```python
142
+ # Top gainer dan loser harian
143
+ top_change = client.analysis.get_top_change(date="2024-12-30")
144
+
145
+ # Top akumulasi dan distribusi asing
146
+ top_foreign = client.analysis.get_top_foreign(date="2024-12-30")
147
+ ```
148
+
149
+ #### Broker Analysis
150
+
151
+ ```python
152
+ # Broker summary per saham
153
+ summary = client.analysis.get_summary_stock(
154
+ code="BBCA",
155
+ from_date="2024-12-01",
156
+ to_date="2024-12-30",
157
+ investor="all",
158
+ market="RG"
159
+ )
160
+
161
+ # Broker summary per broker
162
+ broker_summary = client.analysis.get_summary_broker(
163
+ code="AG",
164
+ from_date="2024-12-01",
165
+ to_date="2024-12-30",
166
+ investor="all",
167
+ market="RG"
168
+ )
169
+ ```
170
+
171
+ #### Kepemilikan Saham
172
+
173
+ ```python
174
+ # Komposisi kepemilikan saham
175
+ shareholders = client.analysis.get_shareholder(code="BBCA")
176
+
177
+ # Jumlah pemegang saham
178
+ shareholder_count = client.analysis.get_shareholder_number(code="BBCA")
179
+
180
+ # Kepemilikan KSEI
181
+ ksei = client.analysis.get_shareholder_ksei(code="BBCA", range_months=6)
182
+ ```
183
+
184
+ ### Personal Features
185
+
186
+ #### Watchlists
187
+
188
+ ```python
189
+ # Daftar watchlist
190
+ watchlists = client.watchlists.list(group="default")
191
+
192
+ # Tambah watchlist baru
193
+ client.watchlists.add(data={...})
194
+
195
+ # Update watchlist
196
+ client.watchlists.update(id="watchlist-id", data={...})
197
+
198
+ # Hapus watchlist
199
+ client.watchlists.delete(data={...})
200
+ ```
201
+
202
+ #### Journals
203
+
204
+ ```python
205
+ # Daftar transaksi jurnal
206
+ transactions = client.journals.list()
207
+
208
+ # Tambah transaksi jurnal
209
+ client.journals.add(data={...})
210
+
211
+ # Ringkasan transaksi
212
+ summary = client.journals.get_summary()
213
+ ```
214
+
215
+ #### Portfolios
216
+
217
+ ```python
218
+ # Daftar portofolio
219
+ portfolios = client.portfolios.list()
220
+
221
+ # Ringkasan portofolio
222
+ summary = client.portfolios.get_summary()
223
+ ```
224
+
225
+ ### AI Features
226
+
227
+ ```python
228
+ # Analisa AI KSEI pemegang saham
229
+ ai_ksei = client.ai.analyze_shareholder_ksei(code="BBCA")
230
+
231
+ # Analisa AI berita saham
232
+ ai_news = client.ai.analyze_news(code="BBCA")
233
+
234
+ # Analisa AI broker summary
235
+ ai_summary = client.ai.analyze_broker_summary(
236
+ code="BBCA",
237
+ from_date="2024-12-01",
238
+ to_date="2024-12-30",
239
+ investor="all",
240
+ market="RG"
241
+ )
242
+ ```
243
+
244
+ ## Error Handling
245
+
246
+ SDK ini meng-handle berbagai jenis error:
247
+
248
+ ```python
249
+ from invezgo.exceptions import (
250
+ InvezgoError,
251
+ AuthenticationError,
252
+ PaymentRequiredError,
253
+ RateLimitError
254
+ )
255
+
256
+ try:
257
+ result = client.analysis.get_stock_list()
258
+ except AuthenticationError:
259
+ print("API key tidak valid")
260
+ except PaymentRequiredError:
261
+ print("Paket berlangganan tidak mencukupi")
262
+ except RateLimitError:
263
+ print("Melebihi batas permintaan API")
264
+ except InvezgoError as e:
265
+ print(f"Error: {e}")
266
+ ```
267
+
268
+ ## Lisensi
269
+
270
+ MIT License - lihat [LICENSE](LICENSE) untuk detail.
271
+
272
+ ## Support
273
+
274
+ - Email: admin@invezgo.com
275
+ - Website: https://invezgo.com
276
+ - Dokumentasi API: https://invezgo.com
277
+
278
+ ## Contributing
279
+
280
+ Contributions are welcome! Please feel free to submit a Pull Request.
281
+
@@ -0,0 +1,247 @@
1
+ # Invezgo Python SDK
2
+
3
+ [![Python Version](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)
4
+ [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
5
+ [![PyPI](https://img.shields.io/pypi/v/invezgo-sdk.svg)](https://pypi.org/project/invezgo-sdk/)
6
+
7
+ Python SDK untuk mengakses [Invezgo API](https://invezgo.com) - Data Saham Indonesia yang lengkap dan terpercaya.
8
+
9
+ ## Fitur
10
+
11
+ - ✅ Akses lengkap ke semua endpoint Invezgo API
12
+ - ✅ Type hints untuk better IDE support
13
+ - ✅ Error handling yang comprehensive
14
+ - ✅ Async-ready (future support)
15
+ - ✅ Easy to use dan developer-friendly
16
+
17
+ ## Instalasi
18
+
19
+ ```bash
20
+ pip install invezgo-sdk
21
+ ```
22
+
23
+ ## Quick Start
24
+
25
+ ```python
26
+ from invezgo import InvezgoClient
27
+
28
+ # Inisialisasi client dengan API key
29
+ client = InvezgoClient(api_key="your-api-key-here")
30
+
31
+ # Atau dengan base URL custom
32
+ client = InvezgoClient(
33
+ api_key="your-api-key-here",
34
+ base_url="https://api.invezgo.com"
35
+ )
36
+
37
+ # Contoh: Dapatkan daftar saham
38
+ stocks = client.analysis.get_stock_list()
39
+ print(stocks)
40
+
41
+ # Contoh: Dapatkan informasi perusahaan
42
+ info = client.analysis.get_information(code="BBCA")
43
+ print(info)
44
+
45
+ # Contoh: Dapatkan chart harga saham
46
+ chart = client.analysis.get_chart(
47
+ code="BBCA",
48
+ from_date="2024-12-01",
49
+ to_date="2024-12-30"
50
+ )
51
+ print(chart)
52
+ ```
53
+
54
+ ## Dokumentasi Lengkap
55
+
56
+ ### Authentication
57
+
58
+ Semua request memerlukan API key yang valid. Dapatkan API key di [Invezgo API Settings](https://invezgo.com/id/setting/api).
59
+
60
+ ```python
61
+ client = InvezgoClient(api_key="your-api-key")
62
+ ```
63
+
64
+ ### Data Saham Indonesia
65
+
66
+ #### Daftar Saham dan Broker
67
+
68
+ ```python
69
+ # Daftar semua saham
70
+ stocks = client.analysis.get_stock_list()
71
+
72
+ # Daftar semua broker
73
+ brokers = client.analysis.get_broker_list()
74
+ ```
75
+
76
+ #### Informasi Perusahaan
77
+
78
+ ```python
79
+ # Informasi lengkap perusahaan
80
+ info = client.analysis.get_information(code="BBCA")
81
+ ```
82
+
83
+ #### Chart dan Harga
84
+
85
+ ```python
86
+ # Chart harga saham lengkap
87
+ chart = client.analysis.get_chart(
88
+ code="BBCA",
89
+ from_date="2024-12-01",
90
+ to_date="2024-12-30"
91
+ )
92
+
93
+ # Intraday chart
94
+ intraday = client.analysis.get_intraday(code="BBCA", market="RG")
95
+
96
+ # Chart dengan indikator
97
+ indicator_chart = client.analysis.get_indicator_chart(
98
+ code="BBCA",
99
+ indicator="rsi",
100
+ from_date="2024-12-01",
101
+ to_date="2024-12-30"
102
+ )
103
+ ```
104
+
105
+ #### Top Gainer & Loser
106
+
107
+ ```python
108
+ # Top gainer dan loser harian
109
+ top_change = client.analysis.get_top_change(date="2024-12-30")
110
+
111
+ # Top akumulasi dan distribusi asing
112
+ top_foreign = client.analysis.get_top_foreign(date="2024-12-30")
113
+ ```
114
+
115
+ #### Broker Analysis
116
+
117
+ ```python
118
+ # Broker summary per saham
119
+ summary = client.analysis.get_summary_stock(
120
+ code="BBCA",
121
+ from_date="2024-12-01",
122
+ to_date="2024-12-30",
123
+ investor="all",
124
+ market="RG"
125
+ )
126
+
127
+ # Broker summary per broker
128
+ broker_summary = client.analysis.get_summary_broker(
129
+ code="AG",
130
+ from_date="2024-12-01",
131
+ to_date="2024-12-30",
132
+ investor="all",
133
+ market="RG"
134
+ )
135
+ ```
136
+
137
+ #### Kepemilikan Saham
138
+
139
+ ```python
140
+ # Komposisi kepemilikan saham
141
+ shareholders = client.analysis.get_shareholder(code="BBCA")
142
+
143
+ # Jumlah pemegang saham
144
+ shareholder_count = client.analysis.get_shareholder_number(code="BBCA")
145
+
146
+ # Kepemilikan KSEI
147
+ ksei = client.analysis.get_shareholder_ksei(code="BBCA", range_months=6)
148
+ ```
149
+
150
+ ### Personal Features
151
+
152
+ #### Watchlists
153
+
154
+ ```python
155
+ # Daftar watchlist
156
+ watchlists = client.watchlists.list(group="default")
157
+
158
+ # Tambah watchlist baru
159
+ client.watchlists.add(data={...})
160
+
161
+ # Update watchlist
162
+ client.watchlists.update(id="watchlist-id", data={...})
163
+
164
+ # Hapus watchlist
165
+ client.watchlists.delete(data={...})
166
+ ```
167
+
168
+ #### Journals
169
+
170
+ ```python
171
+ # Daftar transaksi jurnal
172
+ transactions = client.journals.list()
173
+
174
+ # Tambah transaksi jurnal
175
+ client.journals.add(data={...})
176
+
177
+ # Ringkasan transaksi
178
+ summary = client.journals.get_summary()
179
+ ```
180
+
181
+ #### Portfolios
182
+
183
+ ```python
184
+ # Daftar portofolio
185
+ portfolios = client.portfolios.list()
186
+
187
+ # Ringkasan portofolio
188
+ summary = client.portfolios.get_summary()
189
+ ```
190
+
191
+ ### AI Features
192
+
193
+ ```python
194
+ # Analisa AI KSEI pemegang saham
195
+ ai_ksei = client.ai.analyze_shareholder_ksei(code="BBCA")
196
+
197
+ # Analisa AI berita saham
198
+ ai_news = client.ai.analyze_news(code="BBCA")
199
+
200
+ # Analisa AI broker summary
201
+ ai_summary = client.ai.analyze_broker_summary(
202
+ code="BBCA",
203
+ from_date="2024-12-01",
204
+ to_date="2024-12-30",
205
+ investor="all",
206
+ market="RG"
207
+ )
208
+ ```
209
+
210
+ ## Error Handling
211
+
212
+ SDK ini meng-handle berbagai jenis error:
213
+
214
+ ```python
215
+ from invezgo.exceptions import (
216
+ InvezgoError,
217
+ AuthenticationError,
218
+ PaymentRequiredError,
219
+ RateLimitError
220
+ )
221
+
222
+ try:
223
+ result = client.analysis.get_stock_list()
224
+ except AuthenticationError:
225
+ print("API key tidak valid")
226
+ except PaymentRequiredError:
227
+ print("Paket berlangganan tidak mencukupi")
228
+ except RateLimitError:
229
+ print("Melebihi batas permintaan API")
230
+ except InvezgoError as e:
231
+ print(f"Error: {e}")
232
+ ```
233
+
234
+ ## Lisensi
235
+
236
+ MIT License - lihat [LICENSE](LICENSE) untuk detail.
237
+
238
+ ## Support
239
+
240
+ - Email: admin@invezgo.com
241
+ - Website: https://invezgo.com
242
+ - Dokumentasi API: https://invezgo.com
243
+
244
+ ## Contributing
245
+
246
+ Contributions are welcome! Please feel free to submit a Pull Request.
247
+
@@ -0,0 +1,29 @@
1
+ """
2
+ Invezgo Python SDK
3
+
4
+ Python SDK untuk mengakses Invezgo API - Data Saham Indonesia
5
+ """
6
+
7
+ from .client import InvezgoClient
8
+ from .exceptions import (
9
+ InvezgoError,
10
+ AuthenticationError,
11
+ PaymentRequiredError,
12
+ RateLimitError,
13
+ NotFoundError,
14
+ BadRequestError,
15
+ ServerError,
16
+ )
17
+
18
+ __version__ = "1.0.0"
19
+ __all__ = [
20
+ "InvezgoClient",
21
+ "InvezgoError",
22
+ "AuthenticationError",
23
+ "PaymentRequiredError",
24
+ "RateLimitError",
25
+ "NotFoundError",
26
+ "BadRequestError",
27
+ "ServerError",
28
+ ]
29
+