tickerdb 0.2.1__tar.gz → 0.2.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 (28) hide show
  1. {tickerdb-0.2.1 → tickerdb-0.2.2}/PKG-INFO +3 -36
  2. {tickerdb-0.2.1 → tickerdb-0.2.2}/README.md +2 -35
  3. {tickerdb-0.2.1 → tickerdb-0.2.2}/examples/smoke_test.py +2 -5
  4. {tickerdb-0.2.1 → tickerdb-0.2.2}/src/tickerdb/_endpoints.py +0 -29
  5. {tickerdb-0.2.1 → tickerdb-0.2.2}/src/tickerdb/_version.py +1 -1
  6. {tickerdb-0.2.1 → tickerdb-0.2.2}/src/tickerdb/async_client.py +0 -62
  7. {tickerdb-0.2.1 → tickerdb-0.2.2}/src/tickerdb/client.py +0 -62
  8. {tickerdb-0.2.1 → tickerdb-0.2.2}/src/tickerdb/types/account.py +0 -2
  9. {tickerdb-0.2.1 → tickerdb-0.2.2}/src/tickerdb/types/summary.py +1 -2
  10. {tickerdb-0.2.1 → tickerdb-0.2.2}/tests/test_client.py +0 -6
  11. {tickerdb-0.2.1 → tickerdb-0.2.2}/tests/test_endpoints.py +0 -9
  12. {tickerdb-0.2.1 → tickerdb-0.2.2}/.claude/settings.local.json +0 -0
  13. {tickerdb-0.2.1 → tickerdb-0.2.2}/.gitattributes +0 -0
  14. {tickerdb-0.2.1 → tickerdb-0.2.2}/.gitignore +0 -0
  15. {tickerdb-0.2.1 → tickerdb-0.2.2}/CHANGELOG.md +0 -0
  16. {tickerdb-0.2.1 → tickerdb-0.2.2}/pyproject.toml +0 -0
  17. {tickerdb-0.2.1 → tickerdb-0.2.2}/src/tickerdb/__init__.py +0 -0
  18. {tickerdb-0.2.1 → tickerdb-0.2.2}/src/tickerdb/_transport.py +0 -0
  19. {tickerdb-0.2.1 → tickerdb-0.2.2}/src/tickerdb/exceptions.py +0 -0
  20. {tickerdb-0.2.1 → tickerdb-0.2.2}/src/tickerdb/py.typed +0 -0
  21. {tickerdb-0.2.1 → tickerdb-0.2.2}/src/tickerdb/query.py +0 -0
  22. {tickerdb-0.2.1 → tickerdb-0.2.2}/src/tickerdb/types/__init__.py +0 -0
  23. {tickerdb-0.2.1 → tickerdb-0.2.2}/src/tickerdb/types/common.py +0 -0
  24. {tickerdb-0.2.1 → tickerdb-0.2.2}/src/tickerdb/types/ohlcv.py +0 -0
  25. {tickerdb-0.2.1 → tickerdb-0.2.2}/src/tickerdb/types/search.py +0 -0
  26. {tickerdb-0.2.1 → tickerdb-0.2.2}/tests/conftest.py +0 -0
  27. {tickerdb-0.2.1 → tickerdb-0.2.2}/tests/test_query.py +0 -0
  28. {tickerdb-0.2.1 → tickerdb-0.2.2}/tests/test_transport.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tickerdb
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Connect your agent to pre-computed market context that improves reasoning and reduces token usage.
5
5
  Project-URL: Homepage, https://tickerdb.com
6
6
  Project-URL: Documentation, https://tickerdb.com/docs
@@ -42,7 +42,7 @@ Connect your agent to hundreds of indicators like trend_direction, support_level
42
42
  - Full type hints for IDE autocompletion
43
43
  - Typed exceptions for every error class
44
44
  - Rate limit information on every response
45
- - Covers the full v1 API: summaries, search, OHLCV, and watchlists
45
+ - Covers the full v1 API: summaries, search, and OHLCV
46
46
 
47
47
  **Full API documentation:** [https://tickerdb.com/docs](https://tickerdb.com/docs)
48
48
 
@@ -180,42 +180,11 @@ result = client.summary(
180
180
  print(result["data"]["stats"])
181
181
  ```
182
182
 
183
- ### Watchlist
184
-
185
- Get the saved watchlist snapshot for the authenticated account.
186
-
187
- ```python
188
- result = client.watchlist()
189
- print(result["data"]["as_of_date"])
190
- result = client.watchlist(date="2025-01-15")
191
- ```
192
-
193
- Add tickers to the saved watchlist:
194
-
195
- ```python
196
- result = client.add_to_watchlist(["AAPL", "MSFT", "TSLA"])
197
- ```
198
-
199
- Remove tickers from the saved watchlist:
200
-
201
- ```python
202
- result = client.remove_from_watchlist(["TSLA"])
203
- ```
204
-
205
- ### Watchlist Changes
206
-
207
- Get field-level state changes for your saved watchlist tickers since the last pipeline run.
208
-
209
- ```python
210
- result = client.watchlist_changes()
211
- result = client.watchlist_changes(timeframe="weekly")
212
- ```
213
-
214
183
  ### Band Stability Metadata
215
184
 
216
185
  Summary omits sibling `_meta` objects by default so the primary band label stays front-and-center. Set `meta=True` to include full paid-tier stability metadata across the response, or request just the few `*_meta` fields you need via `fields`.
217
186
 
218
- Summary and watchlist responses also include `as_of_date` so you can tell which market session the snapshot represents.
187
+ Summary responses also include `as_of_date` so you can tell which market session the snapshot represents.
219
188
 
220
189
  ```python
221
190
  result = client.summary("AAPL", meta=True)
@@ -234,8 +203,6 @@ from tickerdb import Stability, BandMeta
234
203
 
235
204
  `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.
236
205
 
237
- Stability context also appears in **Watchlist**, which still includes paid-tier `_meta` objects by default, and in **Watchlist Changes**, which include stability fields inline for each changed band.
238
-
239
206
  ### Query Builder
240
207
 
241
208
  The SDK includes a fluent query builder for searching assets by categorical state. Chain methods in order: select, filters, sort, limit.
@@ -9,7 +9,7 @@ Connect your agent to hundreds of indicators like trend_direction, support_level
9
9
  - Full type hints for IDE autocompletion
10
10
  - Typed exceptions for every error class
11
11
  - Rate limit information on every response
12
- - Covers the full v1 API: summaries, search, OHLCV, and watchlists
12
+ - Covers the full v1 API: summaries, search, and OHLCV
13
13
 
14
14
  **Full API documentation:** [https://tickerdb.com/docs](https://tickerdb.com/docs)
15
15
 
@@ -147,42 +147,11 @@ result = client.summary(
147
147
  print(result["data"]["stats"])
148
148
  ```
149
149
 
150
- ### Watchlist
151
-
152
- Get the saved watchlist snapshot for the authenticated account.
153
-
154
- ```python
155
- result = client.watchlist()
156
- print(result["data"]["as_of_date"])
157
- result = client.watchlist(date="2025-01-15")
158
- ```
159
-
160
- Add tickers to the saved watchlist:
161
-
162
- ```python
163
- result = client.add_to_watchlist(["AAPL", "MSFT", "TSLA"])
164
- ```
165
-
166
- Remove tickers from the saved watchlist:
167
-
168
- ```python
169
- result = client.remove_from_watchlist(["TSLA"])
170
- ```
171
-
172
- ### Watchlist Changes
173
-
174
- Get field-level state changes for your saved watchlist tickers since the last pipeline run.
175
-
176
- ```python
177
- result = client.watchlist_changes()
178
- result = client.watchlist_changes(timeframe="weekly")
179
- ```
180
-
181
150
  ### Band Stability Metadata
182
151
 
183
152
  Summary omits sibling `_meta` objects by default so the primary band label stays front-and-center. Set `meta=True` to include full paid-tier stability metadata across the response, or request just the few `*_meta` fields you need via `fields`.
184
153
 
185
- Summary and watchlist responses also include `as_of_date` so you can tell which market session the snapshot represents.
154
+ Summary responses also include `as_of_date` so you can tell which market session the snapshot represents.
186
155
 
187
156
  ```python
188
157
  result = client.summary("AAPL", meta=True)
@@ -201,8 +170,6 @@ from tickerdb import Stability, BandMeta
201
170
 
202
171
  `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.
203
172
 
204
- Stability context also appears in **Watchlist**, which still includes paid-tier `_meta` objects by default, and in **Watchlist Changes**, which include stability fields inline for each changed band.
205
-
206
173
  ### Query Builder
207
174
 
208
175
  The SDK includes a fluent query builder for searching assets by categorical state. Chain methods in order: select, filters, sort, limit.
@@ -1,8 +1,8 @@
1
1
  """Read-only smoke test against the live TickerDB API.
2
2
 
3
3
  Exercises the main read endpoints with a real API key so you can confirm the
4
- SDK talks to production correctly. It performs no writes (no webhook/screener/
5
- team mutations), so it is safe to run against any account.
4
+ SDK talks to production correctly. It performs no writes, so it is safe to
5
+ run against any account.
6
6
 
7
7
  Usage::
8
8
 
@@ -52,9 +52,6 @@ def main() -> int:
52
52
  bars = client.ohlcv(ticker, limit=5)["data"].get("bars", [])
53
53
  print(f"ohlcv : {len(bars)} bars, latest close="
54
54
  f"{bars[0]['close'] if bars else 'n/a'}")
55
-
56
- wl = client.watchlist()["data"]
57
- print(f"watchlist: as_of={wl.get('as_of_date')}")
58
55
  except TickerDBError as e:
59
56
  print(f"\nAPI error [{e.status_code}] {e.error_type}: {e.message}")
60
57
  return 1
@@ -12,11 +12,6 @@ from typing import Any, Dict, List, Optional
12
12
  from ._transport import RequestSpec
13
13
 
14
14
 
15
- def _normalize_tickers(tickers: List[str]) -> List[str]:
16
- """Uppercase and trim ticker symbols for watchlist mutations."""
17
- return [str(t).strip().upper() for t in tickers]
18
-
19
-
20
15
  # ---------------------------------------------------------------------------
21
16
  # Summary / search / schema
22
17
  # ---------------------------------------------------------------------------
@@ -127,27 +122,3 @@ def ohlcv(
127
122
  },
128
123
  )
129
124
 
130
-
131
- # ---------------------------------------------------------------------------
132
- # Watchlist
133
- # ---------------------------------------------------------------------------
134
-
135
-
136
- def watchlist(*, date: Optional[str] = None) -> RequestSpec:
137
- return RequestSpec("GET", "/watchlist", params={"date": date})
138
-
139
-
140
- def add_to_watchlist(tickers: List[str]) -> RequestSpec:
141
- return RequestSpec("POST", "/watchlist", json={"tickers": _normalize_tickers(tickers)})
142
-
143
-
144
- def remove_from_watchlist(tickers: List[str]) -> RequestSpec:
145
- return RequestSpec(
146
- "DELETE", "/watchlist", json={"tickers": _normalize_tickers(tickers)}
147
- )
148
-
149
-
150
- def watchlist_changes(*, timeframe: Optional[str] = None) -> RequestSpec:
151
- return RequestSpec("GET", "/watchlist/changes", params={"timeframe": timeframe})
152
-
153
-
@@ -1,3 +1,3 @@
1
1
  """Single source of truth for the package version."""
2
2
 
3
- __version__ = "0.2.1"
3
+ __version__ = "0.2.2"
@@ -336,68 +336,6 @@ class AsyncTickerDB:
336
336
  if not data.get("has_more") or not cursor:
337
337
  break
338
338
 
339
- async def watchlist(
340
- self,
341
- *,
342
- date: Optional[str] = None,
343
- ) -> Dict[str, Any]:
344
- """Get the saved watchlist snapshot for the authenticated account.
345
-
346
- Args:
347
- date: Optional point-in-time snapshot date (``YYYY-MM-DD``).
348
-
349
- Returns:
350
- Dict with ``data`` and ``rate_limits`` keys.
351
- """
352
- return await self._send(endpoints.watchlist(date=date))
353
-
354
- async def add_to_watchlist(
355
- self,
356
- tickers: List[str],
357
- ) -> Dict[str, Any]:
358
- """Add ticker symbols to the saved watchlist.
359
-
360
- Args:
361
- tickers: List of ticker symbols to save.
362
-
363
- Returns:
364
- Dict with ``data`` and ``rate_limits`` keys.
365
- """
366
- return await self._send(endpoints.add_to_watchlist(tickers))
367
-
368
- async def remove_from_watchlist(
369
- self,
370
- tickers: List[str],
371
- ) -> Dict[str, Any]:
372
- """Remove ticker symbols from the saved watchlist.
373
-
374
- Args:
375
- tickers: List of ticker symbols to remove.
376
-
377
- Returns:
378
- Dict with ``data`` and ``rate_limits`` keys.
379
- """
380
- return await self._send(endpoints.remove_from_watchlist(tickers))
381
-
382
- async def watchlist_changes(
383
- self,
384
- *,
385
- timeframe: Optional[str] = None,
386
- ) -> Dict[str, Any]:
387
- """Get field-level state changes for your saved watchlist tickers.
388
-
389
- Returns structured diffs showing what changed since the last pipeline
390
- run (day-over-day for daily, week-over-week for weekly). Available on
391
- all tiers.
392
-
393
- Args:
394
- timeframe: ``"daily"`` or ``"weekly"``.
395
-
396
- Returns:
397
- Dict with ``data`` and ``rate_limits`` keys.
398
- """
399
- return await self._send(endpoints.watchlist_changes(timeframe=timeframe))
400
-
401
339
  # ------------------------------------------------------------------
402
340
  # Context manager support
403
341
  # ------------------------------------------------------------------
@@ -332,68 +332,6 @@ class TickerDB:
332
332
  if not data.get("has_more") or not cursor:
333
333
  break
334
334
 
335
- def watchlist(
336
- self,
337
- *,
338
- date: Optional[str] = None,
339
- ) -> Dict[str, Any]:
340
- """Get the saved watchlist snapshot for the authenticated account.
341
-
342
- Args:
343
- date: Optional point-in-time snapshot date (``YYYY-MM-DD``).
344
-
345
- Returns:
346
- Dict with ``data`` and ``rate_limits`` keys.
347
- """
348
- return self._send(endpoints.watchlist(date=date))
349
-
350
- def add_to_watchlist(
351
- self,
352
- tickers: List[str],
353
- ) -> Dict[str, Any]:
354
- """Add ticker symbols to the saved watchlist.
355
-
356
- Args:
357
- tickers: List of ticker symbols to save.
358
-
359
- Returns:
360
- Dict with ``data`` and ``rate_limits`` keys.
361
- """
362
- return self._send(endpoints.add_to_watchlist(tickers))
363
-
364
- def remove_from_watchlist(
365
- self,
366
- tickers: List[str],
367
- ) -> Dict[str, Any]:
368
- """Remove ticker symbols from the saved watchlist.
369
-
370
- Args:
371
- tickers: List of ticker symbols to remove.
372
-
373
- Returns:
374
- Dict with ``data`` and ``rate_limits`` keys.
375
- """
376
- return self._send(endpoints.remove_from_watchlist(tickers))
377
-
378
- def watchlist_changes(
379
- self,
380
- *,
381
- timeframe: Optional[str] = None,
382
- ) -> Dict[str, Any]:
383
- """Get field-level state changes for your saved watchlist tickers.
384
-
385
- Returns structured diffs showing what changed since the last pipeline
386
- run (day-over-day for daily, week-over-week for weekly). Available on
387
- all tiers.
388
-
389
- Args:
390
- timeframe: ``"daily"`` or ``"weekly"``.
391
-
392
- Returns:
393
- Dict with ``data`` and ``rate_limits`` keys.
394
- """
395
- return self._send(endpoints.watchlist_changes(timeframe=timeframe))
396
-
397
335
  # ------------------------------------------------------------------
398
336
  # Context manager support
399
337
  # ------------------------------------------------------------------
@@ -10,9 +10,7 @@ class AccountLimits(TypedDict, total=False):
10
10
 
11
11
  monthly_requests: int
12
12
  overage_enabled: bool
13
- watchlist_limit: int
14
13
  search_results: int
15
- webhook_urls: int
16
14
  history_days: int
17
15
 
18
16
 
@@ -11,8 +11,7 @@ class BandMeta(TypedDict, total=False):
11
11
  """Stability metadata for a band field (Plus/Pro tiers).
12
12
 
13
13
  Appears as a sibling key with ``_meta`` suffix next to each band value
14
- in summary responses when requested and in watchlist responses
15
- (e.g. ``rsi_zone_meta``).
14
+ in summary responses when requested (e.g. ``rsi_zone_meta``).
16
15
  """
17
16
 
18
17
  timeframe: Timeframe
@@ -25,12 +25,6 @@ def test_search_sends_filters(client, recorder):
25
25
  assert filters == [{"field": "sector", "op": "eq", "value": "Tech"}]
26
26
 
27
27
 
28
- def test_add_to_watchlist_body(client, recorder):
29
- client.add_to_watchlist([" aapl ", "msft"])
30
- assert json.loads(recorder.last.content) == {"tickers": ["AAPL", "MSFT"]}
31
- assert recorder.last.method == "POST"
32
-
33
-
34
28
  def test_iter_ohlcv_follows_cursor():
35
29
  # Two pages: first has_more with a cursor, second ends it.
36
30
  pages = [
@@ -53,15 +53,6 @@ def test_ohlcv_path_and_params():
53
53
  }
54
54
 
55
55
 
56
- def test_watchlist_mutations_normalize_tickers():
57
- add = endpoints.add_to_watchlist([" aapl ", "msft"])
58
- assert add.method == "POST"
59
- assert add.json == {"tickers": ["AAPL", "MSFT"]}
60
-
61
- remove = endpoints.remove_from_watchlist(["tsla"])
62
- assert remove.method == "DELETE"
63
- assert remove.json == {"tickers": ["TSLA"]}
64
-
65
56
 
66
57
  def test_bare_builders():
67
58
  assert endpoints.schema().path == "/schema/fields"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes