NORTH7 Python SDK
Official Python SDK for the NORTH7 Financial Intelligence API.
Real-time risk scoring, market regime detection, trading signals, stock analysis, commodity intelligence, and geopolitical briefings -- all from one API.
Installation
pip install north7
With LangChain support:
pip install north7[langchain]
Quick Start
from north7 import North7Client
# Free endpoints -- no API key required
client = North7Client()
risk = client.risk()
print(f"Risk: {risk.value}/100 - {risk.status}")
regime = client.regime()
print(f"Regime: {regime.regime}, VIX: {regime.vix_value}")
Authentication
Get a free API key:
info = North7Client.register(email="you@example.com", name="Your Name")
print(info.api_key) # n7_live_...
Or sign up at north7.ai/developer.
Use the key:
client = North7Client(api_key="n7_live_xxx")
# Or set the environment variable
# export NORTH7_API_KEY=n7_live_xxx
client = North7Client() # picks up from env
Endpoints
Free (no key needed)
| Method | Endpoint | Description |
|---|---|---|
client.risk() |
GET /v1/risk | Global risk index (0-100) |
client.regime() |
GET /v1/regime | Market regime (BULL/BEAR/NEUTRAL) |
client.health() |
GET /v1/health | API health check |
Authenticated (costs credits)
| Method | Credits | Description |
|---|---|---|
client.signals() |
1 | Latest trading signals |
client.alpha() |
2 | Alpha stock picks |
client.prices(["AAPL", "MSFT"]) |
1 | Current prices |
client.price_history("AAPL") |
1 | OHLCV price history |
client.analysis("AAPL") |
5 | Full stock analysis |
client.sector_radar() |
2 | Sector rotation radar |
client.commodities() |
2 | Commodity signals |
client.intraday() |
2 | Intraday scanner |
client.briefing() |
10 | Geopolitical briefing |
client.portfolio() |
10 | Model portfolio |
Examples
Trading Signals
client = North7Client(api_key="n7_live_xxx")
signals = client.signals()
for s in signals:
print(f"{s.symbol}: {s.direction} ({s.confidence})")
Stock Analysis
report = client.analysis("NVDA")
print(f"{report.symbol}: {report.rating} ({report.score}/100)")
print(report.summary)
Sector Rotation
sectors = client.sector_radar()
for sector in sectors:
print(f"{sector.sector}: {sector.score} ({sector.trend})")
Commodity Signals
commodities = client.commodities()
for c in commodities:
print(f"{c.name} ({c.symbol}): {c.direction}")
Geopolitical Briefing
brief = client.briefing()
print(brief.summary)
for event in brief.events:
print(f" - {event}")
Async Support
import asyncio
from north7 import AsyncNorth7Client
async def main():
async with AsyncNorth7Client(api_key="n7_live_xxx") as client:
risk = await client.risk()
print(f"Risk: {risk.value}/100")
signals = await client.signals()
for s in signals:
print(f"{s.symbol}: {s.direction}")
asyncio.run(main())
LangChain Integration
Use NORTH7 as tools in a LangChain agent:
from north7 import North7Client
client = North7Client(api_key="n7_live_xxx")
tools = client.get_langchain_tools()
# Use with any LangChain agent
from langchain.agents import AgentExecutor, create_tool_calling_agent
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(model="gpt-4o")
agent = create_tool_calling_agent(llm, tools, prompt)
executor = AgentExecutor(agent=agent, tools=tools)
result = executor.invoke({"input": "What is the current market risk?"})
Error Handling
from north7 import North7Client, AuthenticationError, RateLimitError
client = North7Client(api_key="invalid")
try:
signals = client.signals()
except AuthenticationError:
print("Invalid API key")
except RateLimitError as e:
print(f"Rate limited. Retry after {e.retry_after}s")
except InsufficientCreditsError:
print("Not enough credits")
Response Types
All methods return typed dataclasses, not raw dicts:
risk = client.risk()
risk.value # int: 0-100
risk.status # str: "LOW", "MODERATE", "ELEVATED", "HIGH", "EXTREME"
risk.crises # List[Crisis]
risk.regions # List[RegionRisk]
License
MIT -- see LICENSE.
Metadata
Release files for north7 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| north7-0.1.1.tar.gz | 13.5 kB | Without provenance | Details for north7-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| north7-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for north7-0.1.1-py3-none-any.whl |
Total release size: 25.0 kB
Release files / north7-0.1.1.tar.gz
| Download URL | north7-0.1.1.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a2cf83dbf366fd71365a523925ce0252ba2d10dff20c339492eff64e98ade3ac
|
|
BLAKE2b-256 checksum How to use checksums |
ab4a888a1f5ede36dc71dd25374172d6075ddb63ba6cc958c121add709217fb0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / north7-0.1.1-py3-none-any.whl
| Download URL | north7-0.1.1-py3-none-any.whl |
|---|---|
| Size | 11.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ef6a420ecefaf351a8f32ba31e2ffac8af7c8a46ca95cc4cfe65e8388e15e81
|
|
BLAKE2b-256 checksum How to use checksums |
1235d4885794ca5b43659cedf85f4613634d6b2a18a3309fca6cf193660bba9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for north7 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.