north7 0.1.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.
- north7-0.1.0/LICENSE +21 -0
- north7-0.1.0/MANIFEST.in +3 -0
- north7-0.1.0/PKG-INFO +232 -0
- north7-0.1.0/README.md +195 -0
- north7-0.1.0/north7/__init__.py +79 -0
- north7-0.1.0/north7/client.py +601 -0
- north7-0.1.0/north7/exceptions.py +38 -0
- north7-0.1.0/north7/models.py +350 -0
- north7-0.1.0/north7/py.typed +0 -0
- north7-0.1.0/north7.egg-info/PKG-INFO +232 -0
- north7-0.1.0/north7.egg-info/SOURCES.txt +15 -0
- north7-0.1.0/north7.egg-info/dependency_links.txt +1 -0
- north7-0.1.0/north7.egg-info/requires.txt +11 -0
- north7-0.1.0/north7.egg-info/top_level.txt +1 -0
- north7-0.1.0/pyproject.toml +68 -0
- north7-0.1.0/setup.cfg +4 -0
- north7-0.1.0/tests/test_client.py +203 -0
north7-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 NORTH7 GmbH
|
|
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.
|
north7-0.1.0/MANIFEST.in
ADDED
north7-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: north7
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python SDK for the NORTH7 Financial Intelligence API
|
|
5
|
+
Author-email: NORTH7 GmbH <dev@north7.ai>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://north7.ai
|
|
8
|
+
Project-URL: Documentation, https://north7.ai/developer
|
|
9
|
+
Project-URL: Repository, https://github.com/a10102010/north7-agent-api
|
|
10
|
+
Project-URL: Issues, https://github.com/a10102010/north7-agent-api/issues
|
|
11
|
+
Keywords: finance,trading,api,signals,risk,intelligence,north7
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Office/Business :: Financial
|
|
22
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
|
+
Classifier: Typing :: Typed
|
|
24
|
+
Requires-Python: >=3.9
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Requires-Dist: httpx>=0.24.0
|
|
28
|
+
Provides-Extra: langchain
|
|
29
|
+
Requires-Dist: langchain-core>=0.1.0; extra == "langchain"
|
|
30
|
+
Provides-Extra: dev
|
|
31
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
32
|
+
Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
|
|
33
|
+
Requires-Dist: respx>=0.20; extra == "dev"
|
|
34
|
+
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
35
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
36
|
+
Dynamic: license-file
|
|
37
|
+
|
|
38
|
+
# NORTH7 Python SDK
|
|
39
|
+
|
|
40
|
+
Official Python SDK for the [NORTH7 Financial Intelligence API](https://north7.ai).
|
|
41
|
+
|
|
42
|
+
Real-time risk scoring, market regime detection, trading signals, stock analysis,
|
|
43
|
+
commodity intelligence, and geopolitical briefings -- all from one API.
|
|
44
|
+
|
|
45
|
+
## Installation
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pip install north7
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
With LangChain support:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pip install north7[langchain]
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Quick Start
|
|
58
|
+
|
|
59
|
+
```python
|
|
60
|
+
from north7 import North7Client
|
|
61
|
+
|
|
62
|
+
# Free endpoints -- no API key required
|
|
63
|
+
client = North7Client()
|
|
64
|
+
|
|
65
|
+
risk = client.risk()
|
|
66
|
+
print(f"Risk: {risk.value}/100 - {risk.status}")
|
|
67
|
+
|
|
68
|
+
regime = client.regime()
|
|
69
|
+
print(f"Regime: {regime.regime}, VIX: {regime.vix_value}")
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Authentication
|
|
73
|
+
|
|
74
|
+
Get a free API key:
|
|
75
|
+
|
|
76
|
+
```python
|
|
77
|
+
info = North7Client.register(email="you@example.com", name="Your Name")
|
|
78
|
+
print(info.api_key) # n7_live_...
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Or sign up at [north7.ai/developer](https://north7.ai/developer).
|
|
82
|
+
|
|
83
|
+
Use the key:
|
|
84
|
+
|
|
85
|
+
```python
|
|
86
|
+
client = North7Client(api_key="n7_live_xxx")
|
|
87
|
+
|
|
88
|
+
# Or set the environment variable
|
|
89
|
+
# export NORTH7_API_KEY=n7_live_xxx
|
|
90
|
+
client = North7Client() # picks up from env
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Endpoints
|
|
94
|
+
|
|
95
|
+
### Free (no key needed)
|
|
96
|
+
|
|
97
|
+
| Method | Endpoint | Description |
|
|
98
|
+
|--------|----------|-------------|
|
|
99
|
+
| `client.risk()` | GET /v1/risk | Global risk index (0-100) |
|
|
100
|
+
| `client.regime()` | GET /v1/regime | Market regime (BULL/BEAR/NEUTRAL) |
|
|
101
|
+
| `client.health()` | GET /v1/health | API health check |
|
|
102
|
+
|
|
103
|
+
### Authenticated (costs credits)
|
|
104
|
+
|
|
105
|
+
| Method | Credits | Description |
|
|
106
|
+
|--------|---------|-------------|
|
|
107
|
+
| `client.signals()` | 1 | Latest trading signals |
|
|
108
|
+
| `client.alpha()` | 2 | Alpha stock picks |
|
|
109
|
+
| `client.prices(["AAPL", "MSFT"])` | 1 | Current prices |
|
|
110
|
+
| `client.price_history("AAPL")` | 1 | OHLCV price history |
|
|
111
|
+
| `client.analysis("AAPL")` | 5 | Full stock analysis |
|
|
112
|
+
| `client.sector_radar()` | 2 | Sector rotation radar |
|
|
113
|
+
| `client.commodities()` | 2 | Commodity signals |
|
|
114
|
+
| `client.intraday()` | 2 | Intraday scanner |
|
|
115
|
+
| `client.briefing()` | 10 | Geopolitical briefing |
|
|
116
|
+
| `client.portfolio()` | 10 | Model portfolio |
|
|
117
|
+
|
|
118
|
+
## Examples
|
|
119
|
+
|
|
120
|
+
### Trading Signals
|
|
121
|
+
|
|
122
|
+
```python
|
|
123
|
+
client = North7Client(api_key="n7_live_xxx")
|
|
124
|
+
|
|
125
|
+
signals = client.signals()
|
|
126
|
+
for s in signals:
|
|
127
|
+
print(f"{s.symbol}: {s.direction} ({s.confidence})")
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Stock Analysis
|
|
131
|
+
|
|
132
|
+
```python
|
|
133
|
+
report = client.analysis("NVDA")
|
|
134
|
+
print(f"{report.symbol}: {report.rating} ({report.score}/100)")
|
|
135
|
+
print(report.summary)
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Sector Rotation
|
|
139
|
+
|
|
140
|
+
```python
|
|
141
|
+
sectors = client.sector_radar()
|
|
142
|
+
for sector in sectors:
|
|
143
|
+
print(f"{sector.sector}: {sector.score} ({sector.trend})")
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Commodity Signals
|
|
147
|
+
|
|
148
|
+
```python
|
|
149
|
+
commodities = client.commodities()
|
|
150
|
+
for c in commodities:
|
|
151
|
+
print(f"{c.name} ({c.symbol}): {c.direction}")
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Geopolitical Briefing
|
|
155
|
+
|
|
156
|
+
```python
|
|
157
|
+
brief = client.briefing()
|
|
158
|
+
print(brief.summary)
|
|
159
|
+
for event in brief.events:
|
|
160
|
+
print(f" - {event}")
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Async Support
|
|
164
|
+
|
|
165
|
+
```python
|
|
166
|
+
import asyncio
|
|
167
|
+
from north7 import AsyncNorth7Client
|
|
168
|
+
|
|
169
|
+
async def main():
|
|
170
|
+
async with AsyncNorth7Client(api_key="n7_live_xxx") as client:
|
|
171
|
+
risk = await client.risk()
|
|
172
|
+
print(f"Risk: {risk.value}/100")
|
|
173
|
+
|
|
174
|
+
signals = await client.signals()
|
|
175
|
+
for s in signals:
|
|
176
|
+
print(f"{s.symbol}: {s.direction}")
|
|
177
|
+
|
|
178
|
+
asyncio.run(main())
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## LangChain Integration
|
|
182
|
+
|
|
183
|
+
Use NORTH7 as tools in a LangChain agent:
|
|
184
|
+
|
|
185
|
+
```python
|
|
186
|
+
from north7 import North7Client
|
|
187
|
+
|
|
188
|
+
client = North7Client(api_key="n7_live_xxx")
|
|
189
|
+
tools = client.get_langchain_tools()
|
|
190
|
+
|
|
191
|
+
# Use with any LangChain agent
|
|
192
|
+
from langchain.agents import AgentExecutor, create_tool_calling_agent
|
|
193
|
+
from langchain_openai import ChatOpenAI
|
|
194
|
+
|
|
195
|
+
llm = ChatOpenAI(model="gpt-4o")
|
|
196
|
+
agent = create_tool_calling_agent(llm, tools, prompt)
|
|
197
|
+
executor = AgentExecutor(agent=agent, tools=tools)
|
|
198
|
+
result = executor.invoke({"input": "What is the current market risk?"})
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
## Error Handling
|
|
202
|
+
|
|
203
|
+
```python
|
|
204
|
+
from north7 import North7Client, AuthenticationError, RateLimitError
|
|
205
|
+
|
|
206
|
+
client = North7Client(api_key="invalid")
|
|
207
|
+
|
|
208
|
+
try:
|
|
209
|
+
signals = client.signals()
|
|
210
|
+
except AuthenticationError:
|
|
211
|
+
print("Invalid API key")
|
|
212
|
+
except RateLimitError as e:
|
|
213
|
+
print(f"Rate limited. Retry after {e.retry_after}s")
|
|
214
|
+
except InsufficientCreditsError:
|
|
215
|
+
print("Not enough credits")
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
## Response Types
|
|
219
|
+
|
|
220
|
+
All methods return typed dataclasses, not raw dicts:
|
|
221
|
+
|
|
222
|
+
```python
|
|
223
|
+
risk = client.risk()
|
|
224
|
+
risk.value # int: 0-100
|
|
225
|
+
risk.status # str: "LOW", "MODERATE", "ELEVATED", "HIGH", "EXTREME"
|
|
226
|
+
risk.crises # List[Crisis]
|
|
227
|
+
risk.regions # List[RegionRisk]
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
## License
|
|
231
|
+
|
|
232
|
+
MIT -- see [LICENSE](LICENSE).
|
north7-0.1.0/README.md
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# NORTH7 Python SDK
|
|
2
|
+
|
|
3
|
+
Official Python SDK for the [NORTH7 Financial Intelligence API](https://north7.ai).
|
|
4
|
+
|
|
5
|
+
Real-time risk scoring, market regime detection, trading signals, stock analysis,
|
|
6
|
+
commodity intelligence, and geopolitical briefings -- all from one API.
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
pip install north7
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
With LangChain support:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pip install north7[langchain]
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Quick Start
|
|
21
|
+
|
|
22
|
+
```python
|
|
23
|
+
from north7 import North7Client
|
|
24
|
+
|
|
25
|
+
# Free endpoints -- no API key required
|
|
26
|
+
client = North7Client()
|
|
27
|
+
|
|
28
|
+
risk = client.risk()
|
|
29
|
+
print(f"Risk: {risk.value}/100 - {risk.status}")
|
|
30
|
+
|
|
31
|
+
regime = client.regime()
|
|
32
|
+
print(f"Regime: {regime.regime}, VIX: {regime.vix_value}")
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Authentication
|
|
36
|
+
|
|
37
|
+
Get a free API key:
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
info = North7Client.register(email="you@example.com", name="Your Name")
|
|
41
|
+
print(info.api_key) # n7_live_...
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Or sign up at [north7.ai/developer](https://north7.ai/developer).
|
|
45
|
+
|
|
46
|
+
Use the key:
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
client = North7Client(api_key="n7_live_xxx")
|
|
50
|
+
|
|
51
|
+
# Or set the environment variable
|
|
52
|
+
# export NORTH7_API_KEY=n7_live_xxx
|
|
53
|
+
client = North7Client() # picks up from env
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Endpoints
|
|
57
|
+
|
|
58
|
+
### Free (no key needed)
|
|
59
|
+
|
|
60
|
+
| Method | Endpoint | Description |
|
|
61
|
+
|--------|----------|-------------|
|
|
62
|
+
| `client.risk()` | GET /v1/risk | Global risk index (0-100) |
|
|
63
|
+
| `client.regime()` | GET /v1/regime | Market regime (BULL/BEAR/NEUTRAL) |
|
|
64
|
+
| `client.health()` | GET /v1/health | API health check |
|
|
65
|
+
|
|
66
|
+
### Authenticated (costs credits)
|
|
67
|
+
|
|
68
|
+
| Method | Credits | Description |
|
|
69
|
+
|--------|---------|-------------|
|
|
70
|
+
| `client.signals()` | 1 | Latest trading signals |
|
|
71
|
+
| `client.alpha()` | 2 | Alpha stock picks |
|
|
72
|
+
| `client.prices(["AAPL", "MSFT"])` | 1 | Current prices |
|
|
73
|
+
| `client.price_history("AAPL")` | 1 | OHLCV price history |
|
|
74
|
+
| `client.analysis("AAPL")` | 5 | Full stock analysis |
|
|
75
|
+
| `client.sector_radar()` | 2 | Sector rotation radar |
|
|
76
|
+
| `client.commodities()` | 2 | Commodity signals |
|
|
77
|
+
| `client.intraday()` | 2 | Intraday scanner |
|
|
78
|
+
| `client.briefing()` | 10 | Geopolitical briefing |
|
|
79
|
+
| `client.portfolio()` | 10 | Model portfolio |
|
|
80
|
+
|
|
81
|
+
## Examples
|
|
82
|
+
|
|
83
|
+
### Trading Signals
|
|
84
|
+
|
|
85
|
+
```python
|
|
86
|
+
client = North7Client(api_key="n7_live_xxx")
|
|
87
|
+
|
|
88
|
+
signals = client.signals()
|
|
89
|
+
for s in signals:
|
|
90
|
+
print(f"{s.symbol}: {s.direction} ({s.confidence})")
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Stock Analysis
|
|
94
|
+
|
|
95
|
+
```python
|
|
96
|
+
report = client.analysis("NVDA")
|
|
97
|
+
print(f"{report.symbol}: {report.rating} ({report.score}/100)")
|
|
98
|
+
print(report.summary)
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Sector Rotation
|
|
102
|
+
|
|
103
|
+
```python
|
|
104
|
+
sectors = client.sector_radar()
|
|
105
|
+
for sector in sectors:
|
|
106
|
+
print(f"{sector.sector}: {sector.score} ({sector.trend})")
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Commodity Signals
|
|
110
|
+
|
|
111
|
+
```python
|
|
112
|
+
commodities = client.commodities()
|
|
113
|
+
for c in commodities:
|
|
114
|
+
print(f"{c.name} ({c.symbol}): {c.direction}")
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Geopolitical Briefing
|
|
118
|
+
|
|
119
|
+
```python
|
|
120
|
+
brief = client.briefing()
|
|
121
|
+
print(brief.summary)
|
|
122
|
+
for event in brief.events:
|
|
123
|
+
print(f" - {event}")
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Async Support
|
|
127
|
+
|
|
128
|
+
```python
|
|
129
|
+
import asyncio
|
|
130
|
+
from north7 import AsyncNorth7Client
|
|
131
|
+
|
|
132
|
+
async def main():
|
|
133
|
+
async with AsyncNorth7Client(api_key="n7_live_xxx") as client:
|
|
134
|
+
risk = await client.risk()
|
|
135
|
+
print(f"Risk: {risk.value}/100")
|
|
136
|
+
|
|
137
|
+
signals = await client.signals()
|
|
138
|
+
for s in signals:
|
|
139
|
+
print(f"{s.symbol}: {s.direction}")
|
|
140
|
+
|
|
141
|
+
asyncio.run(main())
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## LangChain Integration
|
|
145
|
+
|
|
146
|
+
Use NORTH7 as tools in a LangChain agent:
|
|
147
|
+
|
|
148
|
+
```python
|
|
149
|
+
from north7 import North7Client
|
|
150
|
+
|
|
151
|
+
client = North7Client(api_key="n7_live_xxx")
|
|
152
|
+
tools = client.get_langchain_tools()
|
|
153
|
+
|
|
154
|
+
# Use with any LangChain agent
|
|
155
|
+
from langchain.agents import AgentExecutor, create_tool_calling_agent
|
|
156
|
+
from langchain_openai import ChatOpenAI
|
|
157
|
+
|
|
158
|
+
llm = ChatOpenAI(model="gpt-4o")
|
|
159
|
+
agent = create_tool_calling_agent(llm, tools, prompt)
|
|
160
|
+
executor = AgentExecutor(agent=agent, tools=tools)
|
|
161
|
+
result = executor.invoke({"input": "What is the current market risk?"})
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Error Handling
|
|
165
|
+
|
|
166
|
+
```python
|
|
167
|
+
from north7 import North7Client, AuthenticationError, RateLimitError
|
|
168
|
+
|
|
169
|
+
client = North7Client(api_key="invalid")
|
|
170
|
+
|
|
171
|
+
try:
|
|
172
|
+
signals = client.signals()
|
|
173
|
+
except AuthenticationError:
|
|
174
|
+
print("Invalid API key")
|
|
175
|
+
except RateLimitError as e:
|
|
176
|
+
print(f"Rate limited. Retry after {e.retry_after}s")
|
|
177
|
+
except InsufficientCreditsError:
|
|
178
|
+
print("Not enough credits")
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Response Types
|
|
182
|
+
|
|
183
|
+
All methods return typed dataclasses, not raw dicts:
|
|
184
|
+
|
|
185
|
+
```python
|
|
186
|
+
risk = client.risk()
|
|
187
|
+
risk.value # int: 0-100
|
|
188
|
+
risk.status # str: "LOW", "MODERATE", "ELEVATED", "HIGH", "EXTREME"
|
|
189
|
+
risk.crises # List[Crisis]
|
|
190
|
+
risk.regions # List[RegionRisk]
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## License
|
|
194
|
+
|
|
195
|
+
MIT -- see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"""NORTH7 Python SDK -- Financial Intelligence API.
|
|
2
|
+
|
|
3
|
+
Usage::
|
|
4
|
+
|
|
5
|
+
from north7 import North7Client
|
|
6
|
+
|
|
7
|
+
client = North7Client() # free endpoints
|
|
8
|
+
client = North7Client(api_key="n7_live_xxx") # authenticated endpoints
|
|
9
|
+
|
|
10
|
+
Async::
|
|
11
|
+
|
|
12
|
+
from north7 import AsyncNorth7Client
|
|
13
|
+
|
|
14
|
+
async with AsyncNorth7Client() as client:
|
|
15
|
+
risk = await client.risk()
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
from .client import AsyncNorth7Client, North7Client
|
|
19
|
+
from .exceptions import (
|
|
20
|
+
AuthenticationError,
|
|
21
|
+
ForbiddenError,
|
|
22
|
+
InsufficientCreditsError,
|
|
23
|
+
North7Error,
|
|
24
|
+
NotFoundError,
|
|
25
|
+
RateLimitError,
|
|
26
|
+
ServerError,
|
|
27
|
+
)
|
|
28
|
+
from .models import (
|
|
29
|
+
AlphaPick,
|
|
30
|
+
Analysis,
|
|
31
|
+
ApiKeyInfo,
|
|
32
|
+
Briefing,
|
|
33
|
+
CommoditySignal,
|
|
34
|
+
Crisis,
|
|
35
|
+
HealthData,
|
|
36
|
+
IntradayHit,
|
|
37
|
+
ModelPortfolio,
|
|
38
|
+
PortfolioPosition,
|
|
39
|
+
Price,
|
|
40
|
+
PriceBar,
|
|
41
|
+
RegimeData,
|
|
42
|
+
RegionRisk,
|
|
43
|
+
RiskData,
|
|
44
|
+
SectorEntry,
|
|
45
|
+
Signal,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
__version__ = "0.1.0"
|
|
49
|
+
__all__ = [
|
|
50
|
+
# Clients
|
|
51
|
+
"North7Client",
|
|
52
|
+
"AsyncNorth7Client",
|
|
53
|
+
# Models
|
|
54
|
+
"AlphaPick",
|
|
55
|
+
"Analysis",
|
|
56
|
+
"ApiKeyInfo",
|
|
57
|
+
"Briefing",
|
|
58
|
+
"CommoditySignal",
|
|
59
|
+
"Crisis",
|
|
60
|
+
"HealthData",
|
|
61
|
+
"IntradayHit",
|
|
62
|
+
"ModelPortfolio",
|
|
63
|
+
"PortfolioPosition",
|
|
64
|
+
"Price",
|
|
65
|
+
"PriceBar",
|
|
66
|
+
"RegimeData",
|
|
67
|
+
"RegionRisk",
|
|
68
|
+
"RiskData",
|
|
69
|
+
"SectorEntry",
|
|
70
|
+
"Signal",
|
|
71
|
+
# Exceptions
|
|
72
|
+
"AuthenticationError",
|
|
73
|
+
"ForbiddenError",
|
|
74
|
+
"InsufficientCreditsError",
|
|
75
|
+
"North7Error",
|
|
76
|
+
"NotFoundError",
|
|
77
|
+
"RateLimitError",
|
|
78
|
+
"ServerError",
|
|
79
|
+
]
|