tickerdb 0.1.1__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.
- tickerdb-0.1.1/.gitattributes +2 -0
- tickerdb-0.1.1/.gitignore +7 -0
- tickerdb-0.1.1/PKG-INFO +216 -0
- tickerdb-0.1.1/README.md +188 -0
- tickerdb-0.1.1/pyproject.toml +39 -0
- tickerdb-0.1.1/tickerdb/__init__.py +64 -0
- tickerdb-0.1.1/tickerdb/async_client.py +502 -0
- tickerdb-0.1.1/tickerdb/client.py +500 -0
- tickerdb-0.1.1/tickerdb/exceptions.py +53 -0
- tickerdb-0.1.1/tickerdb/py.typed +0 -0
- tickerdb-0.1.1/tickerdb/types.py +140 -0
tickerdb-0.1.1/PKG-INFO
ADDED
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tickerdb
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Python SDK for the TickerDB financial data API
|
|
5
|
+
Project-URL: Homepage, https://tickerdb.com
|
|
6
|
+
Project-URL: Documentation, https://tickerdb.com/docs
|
|
7
|
+
Project-URL: Repository, https://github.com/tickerdb/tickerdb-python
|
|
8
|
+
Project-URL: Issues, https://github.com/tickerdb/tickerdb-python/issues
|
|
9
|
+
Author-email: TickerDB <support@tickerdb.com>
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
Keywords: api,crypto,etf,finance,market-data,stocks,ticker
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Topic :: Office/Business :: Financial :: Investment
|
|
24
|
+
Classifier: Typing :: Typed
|
|
25
|
+
Requires-Python: >=3.8
|
|
26
|
+
Requires-Dist: httpx>=0.24.0
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
|
|
29
|
+
# TickerDB Python SDK
|
|
30
|
+
|
|
31
|
+
[](https://pypi.org/project/tickerdb/)
|
|
32
|
+
[](https://pypi.org/project/tickerdb/)
|
|
33
|
+
|
|
34
|
+
The official Python SDK for [TickerDB](https://tickerdb.com) -- financial data and market intelligence API.
|
|
35
|
+
|
|
36
|
+
- Sync and async clients
|
|
37
|
+
- Full type hints for IDE autocompletion
|
|
38
|
+
- Typed exceptions for every error class
|
|
39
|
+
- Rate limit information on every response
|
|
40
|
+
|
|
41
|
+
**Full API documentation:** [https://tickerdb.com/docs](https://tickerdb.com/docs)
|
|
42
|
+
|
|
43
|
+
## Installation
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pip install tickerdb
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Quick Start
|
|
50
|
+
|
|
51
|
+
### Synchronous
|
|
52
|
+
|
|
53
|
+
```python
|
|
54
|
+
from tickerdb import TickerDB
|
|
55
|
+
|
|
56
|
+
client = TickerDB("your_api_key")
|
|
57
|
+
|
|
58
|
+
# Get a ticker summary
|
|
59
|
+
result = client.summary("AAPL")
|
|
60
|
+
print(result["data"])
|
|
61
|
+
|
|
62
|
+
# Rate limit info is included on every response
|
|
63
|
+
print(result["rate_limits"]["requests_remaining"])
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Asynchronous
|
|
67
|
+
|
|
68
|
+
```python
|
|
69
|
+
import asyncio
|
|
70
|
+
from tickerdb import AsyncTickerDB
|
|
71
|
+
|
|
72
|
+
async def main():
|
|
73
|
+
async with AsyncTickerDB("your_api_key") as client:
|
|
74
|
+
result = await client.summary("AAPL")
|
|
75
|
+
print(result["data"])
|
|
76
|
+
|
|
77
|
+
asyncio.run(main())
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Endpoints
|
|
81
|
+
|
|
82
|
+
### Summary
|
|
83
|
+
|
|
84
|
+
Get a detailed summary for a single ticker.
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
result = client.summary("AAPL")
|
|
88
|
+
result = client.summary("AAPL", timeframe="weekly")
|
|
89
|
+
result = client.summary("AAPL", date="2025-01-15")
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Summary with Date Range
|
|
93
|
+
|
|
94
|
+
Get a summary series for one ticker across a date range by passing `start` and `end`.
|
|
95
|
+
|
|
96
|
+
```python
|
|
97
|
+
result = client.summary("AAPL", start="2025-01-01", end="2025-03-31")
|
|
98
|
+
result = client.summary("AAPL", timeframe="weekly", start="2024-01-01", end="2025-03-31")
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Summary with Events Filter
|
|
102
|
+
|
|
103
|
+
Query event occurrences for a specific band field.
|
|
104
|
+
|
|
105
|
+
```python
|
|
106
|
+
result = client.summary("AAPL", field="rsi_zone", band="deep_oversold")
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Watchlist
|
|
110
|
+
|
|
111
|
+
Post a list of tickers to get watchlist data.
|
|
112
|
+
|
|
113
|
+
```python
|
|
114
|
+
result = client.watchlist(["AAPL", "MSFT", "TSLA"])
|
|
115
|
+
result = client.watchlist(["AAPL", "MSFT"], timeframe="weekly")
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Watchlist Changes
|
|
119
|
+
|
|
120
|
+
Get field-level state changes for your saved watchlist tickers since the last pipeline run.
|
|
121
|
+
|
|
122
|
+
```python
|
|
123
|
+
result = client.watchlist_changes()
|
|
124
|
+
result = client.watchlist_changes(timeframe="weekly")
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Band Stability Metadata
|
|
128
|
+
|
|
129
|
+
Every band field (trend direction, momentum zone, etc.) now includes a sibling `_meta` object with stability context. This tells you how long a state has been held, how often it has flipped recently, and an overall stability label.
|
|
130
|
+
|
|
131
|
+
```python
|
|
132
|
+
result = client.summary("AAPL")
|
|
133
|
+
data = result["data"]
|
|
134
|
+
|
|
135
|
+
# The band value itself
|
|
136
|
+
print(data["trend"]["direction"]) # "uptrend"
|
|
137
|
+
|
|
138
|
+
# Stability metadata for that band
|
|
139
|
+
print(data["trend"]["direction_meta"])
|
|
140
|
+
# {"stability": "established", "periods_in_current_state": 18, "flips_recent": 1, "flips_lookback": 20}
|
|
141
|
+
|
|
142
|
+
# Type hints available
|
|
143
|
+
from tickerdb import Stability, BandMeta
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
`Stability` is one of `"fresh"`, `"holding"`, `"established"`, or `"volatile"`. `BandMeta` contains the full metadata dict. Stability metadata is available on Plus and Pro tiers only.
|
|
147
|
+
|
|
148
|
+
Stability context also appears in **Watchlist Changes**, which include stability fields for each changed band.
|
|
149
|
+
|
|
150
|
+
### Query Builder
|
|
151
|
+
|
|
152
|
+
The SDK includes a fluent query builder for searching assets by categorical state. Chain methods in order: select, filters, sort, limit.
|
|
153
|
+
|
|
154
|
+
```python
|
|
155
|
+
results = client.query() \
|
|
156
|
+
.select('ticker', 'sector', 'momentum_rsi_zone') \
|
|
157
|
+
.eq('momentum_rsi_zone', 'oversold') \
|
|
158
|
+
.eq('sector', 'Technology') \
|
|
159
|
+
.sort('extremes_condition_percentile', 'asc') \
|
|
160
|
+
.limit(10) \
|
|
161
|
+
.execute()
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Error Handling
|
|
165
|
+
|
|
166
|
+
The SDK raises typed exceptions for all API errors:
|
|
167
|
+
|
|
168
|
+
```python
|
|
169
|
+
from tickerdb import TickerDB, TickerDBError, RateLimitError, NotFoundError
|
|
170
|
+
|
|
171
|
+
client = TickerDB("your_api_key")
|
|
172
|
+
|
|
173
|
+
try:
|
|
174
|
+
result = client.summary("INVALID_TICKER")
|
|
175
|
+
except NotFoundError as e:
|
|
176
|
+
print(f"Ticker not found: {e.message}")
|
|
177
|
+
except RateLimitError as e:
|
|
178
|
+
print(f"Rate limited! Resets at: {e.reset}")
|
|
179
|
+
print(f"Upgrade: {e.upgrade_url}")
|
|
180
|
+
except TickerDBError as e:
|
|
181
|
+
print(f"API error [{e.status_code}]: {e.message}")
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Exception Hierarchy
|
|
185
|
+
|
|
186
|
+
| Exception | Status Code | Description |
|
|
187
|
+
|---|---|---|
|
|
188
|
+
| `TickerDBError` | any | Base exception for all API errors |
|
|
189
|
+
| `AuthenticationError` | 401 | Invalid or missing API key |
|
|
190
|
+
| `ForbiddenError` | 403 | Endpoint restricted to higher tier |
|
|
191
|
+
| `NotFoundError` | 404 | Asset not found |
|
|
192
|
+
| `RateLimitError` | 429 | Rate limit exceeded |
|
|
193
|
+
| `DataUnavailableError` | 503 | Data temporarily unavailable |
|
|
194
|
+
|
|
195
|
+
All exceptions include `status_code`, `error_type`, `message`, and optionally `upgrade_url` and `reset` attributes.
|
|
196
|
+
|
|
197
|
+
## Rate Limits
|
|
198
|
+
|
|
199
|
+
Every response includes a `rate_limits` dict parsed from the API headers:
|
|
200
|
+
|
|
201
|
+
```python
|
|
202
|
+
result = client.summary("AAPL")
|
|
203
|
+
limits = result["rate_limits"]
|
|
204
|
+
|
|
205
|
+
print(limits["request_limit"]) # Total request limit
|
|
206
|
+
print(limits["requests_remaining"]) # Requests remaining
|
|
207
|
+
print(limits["request_reset"]) # Reset timestamp
|
|
208
|
+
print(limits["hourly_request_limit"]) # Hourly limit
|
|
209
|
+
print(limits["hourly_requests_remaining"]) # Hourly remaining
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Links
|
|
213
|
+
|
|
214
|
+
- [TickerDB Website](https://tickerdb.com)
|
|
215
|
+
- [API Documentation](https://tickerdb.com/docs)
|
|
216
|
+
- [PyPI Package](https://pypi.org/project/tickerdb/)
|
tickerdb-0.1.1/README.md
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# TickerDB Python SDK
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/tickerdb/)
|
|
4
|
+
[](https://pypi.org/project/tickerdb/)
|
|
5
|
+
|
|
6
|
+
The official Python SDK for [TickerDB](https://tickerdb.com) -- financial data and market intelligence API.
|
|
7
|
+
|
|
8
|
+
- Sync and async clients
|
|
9
|
+
- Full type hints for IDE autocompletion
|
|
10
|
+
- Typed exceptions for every error class
|
|
11
|
+
- Rate limit information on every response
|
|
12
|
+
|
|
13
|
+
**Full API documentation:** [https://tickerdb.com/docs](https://tickerdb.com/docs)
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip install tickerdb
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Quick Start
|
|
22
|
+
|
|
23
|
+
### Synchronous
|
|
24
|
+
|
|
25
|
+
```python
|
|
26
|
+
from tickerdb import TickerDB
|
|
27
|
+
|
|
28
|
+
client = TickerDB("your_api_key")
|
|
29
|
+
|
|
30
|
+
# Get a ticker summary
|
|
31
|
+
result = client.summary("AAPL")
|
|
32
|
+
print(result["data"])
|
|
33
|
+
|
|
34
|
+
# Rate limit info is included on every response
|
|
35
|
+
print(result["rate_limits"]["requests_remaining"])
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Asynchronous
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
import asyncio
|
|
42
|
+
from tickerdb import AsyncTickerDB
|
|
43
|
+
|
|
44
|
+
async def main():
|
|
45
|
+
async with AsyncTickerDB("your_api_key") as client:
|
|
46
|
+
result = await client.summary("AAPL")
|
|
47
|
+
print(result["data"])
|
|
48
|
+
|
|
49
|
+
asyncio.run(main())
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Endpoints
|
|
53
|
+
|
|
54
|
+
### Summary
|
|
55
|
+
|
|
56
|
+
Get a detailed summary for a single ticker.
|
|
57
|
+
|
|
58
|
+
```python
|
|
59
|
+
result = client.summary("AAPL")
|
|
60
|
+
result = client.summary("AAPL", timeframe="weekly")
|
|
61
|
+
result = client.summary("AAPL", date="2025-01-15")
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Summary with Date Range
|
|
65
|
+
|
|
66
|
+
Get a summary series for one ticker across a date range by passing `start` and `end`.
|
|
67
|
+
|
|
68
|
+
```python
|
|
69
|
+
result = client.summary("AAPL", start="2025-01-01", end="2025-03-31")
|
|
70
|
+
result = client.summary("AAPL", timeframe="weekly", start="2024-01-01", end="2025-03-31")
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Summary with Events Filter
|
|
74
|
+
|
|
75
|
+
Query event occurrences for a specific band field.
|
|
76
|
+
|
|
77
|
+
```python
|
|
78
|
+
result = client.summary("AAPL", field="rsi_zone", band="deep_oversold")
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Watchlist
|
|
82
|
+
|
|
83
|
+
Post a list of tickers to get watchlist data.
|
|
84
|
+
|
|
85
|
+
```python
|
|
86
|
+
result = client.watchlist(["AAPL", "MSFT", "TSLA"])
|
|
87
|
+
result = client.watchlist(["AAPL", "MSFT"], timeframe="weekly")
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Watchlist Changes
|
|
91
|
+
|
|
92
|
+
Get field-level state changes for your saved watchlist tickers since the last pipeline run.
|
|
93
|
+
|
|
94
|
+
```python
|
|
95
|
+
result = client.watchlist_changes()
|
|
96
|
+
result = client.watchlist_changes(timeframe="weekly")
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Band Stability Metadata
|
|
100
|
+
|
|
101
|
+
Every band field (trend direction, momentum zone, etc.) now includes a sibling `_meta` object with stability context. This tells you how long a state has been held, how often it has flipped recently, and an overall stability label.
|
|
102
|
+
|
|
103
|
+
```python
|
|
104
|
+
result = client.summary("AAPL")
|
|
105
|
+
data = result["data"]
|
|
106
|
+
|
|
107
|
+
# The band value itself
|
|
108
|
+
print(data["trend"]["direction"]) # "uptrend"
|
|
109
|
+
|
|
110
|
+
# Stability metadata for that band
|
|
111
|
+
print(data["trend"]["direction_meta"])
|
|
112
|
+
# {"stability": "established", "periods_in_current_state": 18, "flips_recent": 1, "flips_lookback": 20}
|
|
113
|
+
|
|
114
|
+
# Type hints available
|
|
115
|
+
from tickerdb import Stability, BandMeta
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
`Stability` is one of `"fresh"`, `"holding"`, `"established"`, or `"volatile"`. `BandMeta` contains the full metadata dict. Stability metadata is available on Plus and Pro tiers only.
|
|
119
|
+
|
|
120
|
+
Stability context also appears in **Watchlist Changes**, which include stability fields for each changed band.
|
|
121
|
+
|
|
122
|
+
### Query Builder
|
|
123
|
+
|
|
124
|
+
The SDK includes a fluent query builder for searching assets by categorical state. Chain methods in order: select, filters, sort, limit.
|
|
125
|
+
|
|
126
|
+
```python
|
|
127
|
+
results = client.query() \
|
|
128
|
+
.select('ticker', 'sector', 'momentum_rsi_zone') \
|
|
129
|
+
.eq('momentum_rsi_zone', 'oversold') \
|
|
130
|
+
.eq('sector', 'Technology') \
|
|
131
|
+
.sort('extremes_condition_percentile', 'asc') \
|
|
132
|
+
.limit(10) \
|
|
133
|
+
.execute()
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Error Handling
|
|
137
|
+
|
|
138
|
+
The SDK raises typed exceptions for all API errors:
|
|
139
|
+
|
|
140
|
+
```python
|
|
141
|
+
from tickerdb import TickerDB, TickerDBError, RateLimitError, NotFoundError
|
|
142
|
+
|
|
143
|
+
client = TickerDB("your_api_key")
|
|
144
|
+
|
|
145
|
+
try:
|
|
146
|
+
result = client.summary("INVALID_TICKER")
|
|
147
|
+
except NotFoundError as e:
|
|
148
|
+
print(f"Ticker not found: {e.message}")
|
|
149
|
+
except RateLimitError as e:
|
|
150
|
+
print(f"Rate limited! Resets at: {e.reset}")
|
|
151
|
+
print(f"Upgrade: {e.upgrade_url}")
|
|
152
|
+
except TickerDBError as e:
|
|
153
|
+
print(f"API error [{e.status_code}]: {e.message}")
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Exception Hierarchy
|
|
157
|
+
|
|
158
|
+
| Exception | Status Code | Description |
|
|
159
|
+
|---|---|---|
|
|
160
|
+
| `TickerDBError` | any | Base exception for all API errors |
|
|
161
|
+
| `AuthenticationError` | 401 | Invalid or missing API key |
|
|
162
|
+
| `ForbiddenError` | 403 | Endpoint restricted to higher tier |
|
|
163
|
+
| `NotFoundError` | 404 | Asset not found |
|
|
164
|
+
| `RateLimitError` | 429 | Rate limit exceeded |
|
|
165
|
+
| `DataUnavailableError` | 503 | Data temporarily unavailable |
|
|
166
|
+
|
|
167
|
+
All exceptions include `status_code`, `error_type`, `message`, and optionally `upgrade_url` and `reset` attributes.
|
|
168
|
+
|
|
169
|
+
## Rate Limits
|
|
170
|
+
|
|
171
|
+
Every response includes a `rate_limits` dict parsed from the API headers:
|
|
172
|
+
|
|
173
|
+
```python
|
|
174
|
+
result = client.summary("AAPL")
|
|
175
|
+
limits = result["rate_limits"]
|
|
176
|
+
|
|
177
|
+
print(limits["request_limit"]) # Total request limit
|
|
178
|
+
print(limits["requests_remaining"]) # Requests remaining
|
|
179
|
+
print(limits["request_reset"]) # Reset timestamp
|
|
180
|
+
print(limits["hourly_request_limit"]) # Hourly limit
|
|
181
|
+
print(limits["hourly_requests_remaining"]) # Hourly remaining
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## Links
|
|
185
|
+
|
|
186
|
+
- [TickerDB Website](https://tickerdb.com)
|
|
187
|
+
- [API Documentation](https://tickerdb.com/docs)
|
|
188
|
+
- [PyPI Package](https://pypi.org/project/tickerdb/)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "tickerdb"
|
|
7
|
+
version = "0.1.1"
|
|
8
|
+
description = "Python SDK for the TickerDB financial data API"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
requires-python = ">=3.8"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "TickerDB", email = "support@tickerdb.com" },
|
|
14
|
+
]
|
|
15
|
+
keywords = ["finance", "stocks", "crypto", "etf", "market-data", "api", "ticker"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 4 - Beta",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"Intended Audience :: Financial and Insurance Industry",
|
|
20
|
+
"License :: OSI Approved :: MIT License",
|
|
21
|
+
"Programming Language :: Python :: 3",
|
|
22
|
+
"Programming Language :: Python :: 3.8",
|
|
23
|
+
"Programming Language :: Python :: 3.9",
|
|
24
|
+
"Programming Language :: Python :: 3.10",
|
|
25
|
+
"Programming Language :: Python :: 3.11",
|
|
26
|
+
"Programming Language :: Python :: 3.12",
|
|
27
|
+
"Programming Language :: Python :: 3.13",
|
|
28
|
+
"Topic :: Office/Business :: Financial :: Investment",
|
|
29
|
+
"Typing :: Typed",
|
|
30
|
+
]
|
|
31
|
+
dependencies = [
|
|
32
|
+
"httpx>=0.24.0",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
[project.urls]
|
|
36
|
+
Homepage = "https://tickerdb.com"
|
|
37
|
+
Documentation = "https://tickerdb.com/docs"
|
|
38
|
+
Repository = "https://github.com/tickerdb/tickerdb-python"
|
|
39
|
+
Issues = "https://github.com/tickerdb/tickerdb-python/issues"
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"""TickerDB Python SDK - Financial data at your fingertips.
|
|
2
|
+
|
|
3
|
+
Usage::
|
|
4
|
+
|
|
5
|
+
from tickerdb import TickerDB
|
|
6
|
+
|
|
7
|
+
client = TickerDB("your_api_key")
|
|
8
|
+
result = client.summary("AAPL")
|
|
9
|
+
|
|
10
|
+
For async usage::
|
|
11
|
+
|
|
12
|
+
from tickerdb import AsyncTickerDB
|
|
13
|
+
|
|
14
|
+
async with AsyncTickerDB("your_api_key") as client:
|
|
15
|
+
result = await client.summary("AAPL")
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
from .async_client import AsyncSearchQuery, AsyncTickerDB
|
|
19
|
+
from .client import SearchQuery, TickerDB
|
|
20
|
+
from .exceptions import (
|
|
21
|
+
AuthenticationError,
|
|
22
|
+
DataUnavailableError,
|
|
23
|
+
ForbiddenError,
|
|
24
|
+
NotFoundError,
|
|
25
|
+
RateLimitError,
|
|
26
|
+
TickerDBError,
|
|
27
|
+
)
|
|
28
|
+
from .types import (
|
|
29
|
+
APIResponse,
|
|
30
|
+
BandMeta,
|
|
31
|
+
Event,
|
|
32
|
+
EventsContext,
|
|
33
|
+
EventsResponse,
|
|
34
|
+
RateLimits,
|
|
35
|
+
SchemaResponse,
|
|
36
|
+
SearchParams,
|
|
37
|
+
SearchResponse,
|
|
38
|
+
Stability,
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
__all__ = [
|
|
42
|
+
"TickerDB",
|
|
43
|
+
"AsyncTickerDB",
|
|
44
|
+
"SearchQuery",
|
|
45
|
+
"AsyncSearchQuery",
|
|
46
|
+
"TickerDBError",
|
|
47
|
+
"AuthenticationError",
|
|
48
|
+
"ForbiddenError",
|
|
49
|
+
"NotFoundError",
|
|
50
|
+
"RateLimitError",
|
|
51
|
+
"DataUnavailableError",
|
|
52
|
+
"APIResponse",
|
|
53
|
+
"BandMeta",
|
|
54
|
+
"Event",
|
|
55
|
+
"EventsContext",
|
|
56
|
+
"EventsResponse",
|
|
57
|
+
"RateLimits",
|
|
58
|
+
"SchemaResponse",
|
|
59
|
+
"SearchParams",
|
|
60
|
+
"SearchResponse",
|
|
61
|
+
"Stability",
|
|
62
|
+
]
|
|
63
|
+
|
|
64
|
+
__version__ = "0.1.0"
|