tickflow 0.1.0.dev4__tar.gz → 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.
Files changed (23) hide show
  1. {tickflow-0.1.0.dev4 → tickflow-0.1.1}/PKG-INFO +1 -2
  2. {tickflow-0.1.0.dev4 → tickflow-0.1.1}/pyproject.toml +2 -2
  3. {tickflow-0.1.0.dev4 → tickflow-0.1.1}/tickflow/generated_model.py +4 -4
  4. {tickflow-0.1.0.dev4 → tickflow-0.1.1}/tickflow/resources/klines.py +14 -20
  5. {tickflow-0.1.0.dev4 → tickflow-0.1.1}/tickflow.egg-info/PKG-INFO +1 -2
  6. {tickflow-0.1.0.dev4 → tickflow-0.1.1}/README.md +0 -0
  7. {tickflow-0.1.0.dev4 → tickflow-0.1.1}/setup.cfg +0 -0
  8. {tickflow-0.1.0.dev4 → tickflow-0.1.1}/tickflow/__init__.py +0 -0
  9. {tickflow-0.1.0.dev4 → tickflow-0.1.1}/tickflow/_base_client.py +0 -0
  10. {tickflow-0.1.0.dev4 → tickflow-0.1.1}/tickflow/_exceptions.py +0 -0
  11. {tickflow-0.1.0.dev4 → tickflow-0.1.1}/tickflow/_types.py +0 -0
  12. {tickflow-0.1.0.dev4 → tickflow-0.1.1}/tickflow/client.py +0 -0
  13. {tickflow-0.1.0.dev4 → tickflow-0.1.1}/tickflow/resources/__init__.py +0 -0
  14. {tickflow-0.1.0.dev4 → tickflow-0.1.1}/tickflow/resources/_base.py +0 -0
  15. {tickflow-0.1.0.dev4 → tickflow-0.1.1}/tickflow/resources/exchanges.py +0 -0
  16. {tickflow-0.1.0.dev4 → tickflow-0.1.1}/tickflow/resources/instruments.py +0 -0
  17. {tickflow-0.1.0.dev4 → tickflow-0.1.1}/tickflow/resources/quotes.py +0 -0
  18. {tickflow-0.1.0.dev4 → tickflow-0.1.1}/tickflow/resources/universes.py +0 -0
  19. {tickflow-0.1.0.dev4 → tickflow-0.1.1}/tickflow/utils.py +0 -0
  20. {tickflow-0.1.0.dev4 → tickflow-0.1.1}/tickflow.egg-info/SOURCES.txt +0 -0
  21. {tickflow-0.1.0.dev4 → tickflow-0.1.1}/tickflow.egg-info/dependency_links.txt +0 -0
  22. {tickflow-0.1.0.dev4 → tickflow-0.1.1}/tickflow.egg-info/requires.txt +0 -0
  23. {tickflow-0.1.0.dev4 → tickflow-0.1.1}/tickflow.egg-info/top_level.txt +0 -0
@@ -1,11 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tickflow
3
- Version: 0.1.0.dev4
3
+ Version: 0.1.1
4
4
  Summary: TickFlow Python Client
5
5
  Author: TickFlow Team
6
6
  License: MIT
7
7
  Project-URL: Documentation, https://docs.tickflow.org
8
- Project-URL: Repository, https://github.com/tickflow/tickflow-python
9
8
  Keywords: finance,stock,market-data,trading,api-client
10
9
  Classifier: Development Status :: 4 - Beta
11
10
  Classifier: Intended Audience :: Developers
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "tickflow"
3
- version = "0.1.0-dev4"
3
+ version = "0.1.1"
4
4
  description = "TickFlow Python Client"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.9"
@@ -40,7 +40,7 @@ all = [
40
40
 
41
41
  [project.urls]
42
42
  Documentation = "https://docs.tickflow.org"
43
- Repository = "https://github.com/tickflow/tickflow-python"
43
+ # Repository = "https://docs.tickflow.org"
44
44
 
45
45
  [build-system]
46
46
  requires = ["setuptools>=61.0", "wheel"]
@@ -1,12 +1,12 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: openapi.json
3
- # timestamp: 2026-02-03T15:11:44+00:00
3
+ # timestamp: 2026-02-04T08:37:34+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
7
- from typing import Any, Dict, List, Literal, Optional, TypedDict, Union
7
+ from typing import Any, Dict, List, Optional, Union
8
8
 
9
- from typing_extensions import NotRequired, TypeAlias
9
+ from typing_extensions import Literal, NotRequired, TypeAlias, TypedDict
10
10
 
11
11
 
12
12
  class ApiError(TypedDict):
@@ -227,10 +227,10 @@ class Instrument(TypedDict):
227
227
  code: str
228
228
  exchange: str
229
229
  ext: NotRequired[Optional[InstrumentExt]]
230
- instrument_type: NotRequired[Optional[InstrumentType]]
231
230
  name: NotRequired[Optional[str]]
232
231
  region: str
233
232
  symbol: str
233
+ type: NotRequired[Optional[InstrumentType]]
234
234
 
235
235
 
236
236
  class InstrumentsResponse(TypedDict):
@@ -79,7 +79,9 @@ def _klines_to_dataframe(
79
79
  return df
80
80
 
81
81
 
82
- def _batch_klines_to_dataframe(data: Dict[str, "CompactKlineData"]) -> "pd.DataFrame":
82
+ def _batch_klines_to_dataframes(
83
+ data: Dict[str, "CompactKlineData"],
84
+ ) -> Dict[str, "pd.DataFrame"]:
83
85
  """Convert batch K-line data to a single pandas DataFrame.
84
86
 
85
87
  Parameters
@@ -89,25 +91,17 @@ def _batch_klines_to_dataframe(data: Dict[str, "CompactKlineData"]) -> "pd.DataF
89
91
 
90
92
  Returns
91
93
  -------
92
- pd.DataFrame
93
- Combined DataFrame with a 'symbol' column and MultiIndex (symbol, timestamp).
94
+ dict of str to pd.DataFrame
95
+ Dictionary mapping symbol codes to pandas DataFrames.
94
96
  """
95
97
  import pandas as pd
96
98
 
97
- dfs = []
99
+ dfs = {}
98
100
  for symbol, kline_data in data.items():
99
101
  df = _klines_to_dataframe(kline_data, symbol=symbol)
100
- dfs.append(df)
101
-
102
- if not dfs:
103
- return pd.DataFrame()
104
-
105
- combined = pd.concat(dfs)
106
- combined.reset_index(inplace=True)
107
- combined.set_index(["symbol", "timestamp"], inplace=True)
108
- combined.sort_index(inplace=True)
102
+ dfs[symbol] = df
109
103
 
110
- return combined
104
+ return dfs
111
105
 
112
106
 
113
107
  def _chunk_list(lst: List[str], chunk_size: int) -> List[List[str]]:
@@ -372,7 +366,7 @@ class Klines(SyncResource):
372
366
  >>> print(f"Got data for {len(df.index.get_level_values('symbol').unique())} symbols")
373
367
  """
374
368
  if not symbols:
375
- return {} if not as_dataframe else _batch_klines_to_dataframe({})
369
+ return {} if not as_dataframe else _batch_klines_to_dataframes({})
376
370
 
377
371
  # Build base params
378
372
  params: Dict[str, Any] = {}
@@ -392,7 +386,7 @@ class Klines(SyncResource):
392
386
  if len(chunks) == 1:
393
387
  data, errors = self._fetch_batch_chunk(chunks[0], params)
394
388
  if as_dataframe:
395
- return _batch_klines_to_dataframe(data)
389
+ return _batch_klines_to_dataframes(data)
396
390
  return data
397
391
 
398
392
  # Setup progress bar
@@ -433,7 +427,7 @@ class Klines(SyncResource):
433
427
  # Users can check if their symbols are in the result
434
428
 
435
429
  if as_dataframe:
436
- return _batch_klines_to_dataframe(all_data)
430
+ return _batch_klines_to_dataframes(all_data)
437
431
  return all_data
438
432
 
439
433
 
@@ -641,7 +635,7 @@ class AsyncKlines(AsyncResource):
641
635
  >>> df = await client.klines.batch(symbols[:500], as_dataframe=True, show_progress=True)
642
636
  """
643
637
  if not symbols:
644
- return {} if not as_dataframe else _batch_klines_to_dataframe({})
638
+ return {} if not as_dataframe else _batch_klines_to_dataframes({})
645
639
 
646
640
  # Build base params
647
641
  params: Dict[str, Any] = {}
@@ -661,7 +655,7 @@ class AsyncKlines(AsyncResource):
661
655
  if len(chunks) == 1:
662
656
  data, errors = await self._fetch_batch_chunk(chunks[0], params)
663
657
  if as_dataframe:
664
- return _batch_klines_to_dataframe(data)
658
+ return _batch_klines_to_dataframes(data)
665
659
  return data
666
660
 
667
661
  # Setup progress bar
@@ -699,5 +693,5 @@ class AsyncKlines(AsyncResource):
699
693
  pbar.close()
700
694
 
701
695
  if as_dataframe:
702
- return _batch_klines_to_dataframe(all_data)
696
+ return _batch_klines_to_dataframes(all_data)
703
697
  return all_data
@@ -1,11 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tickflow
3
- Version: 0.1.0.dev4
3
+ Version: 0.1.1
4
4
  Summary: TickFlow Python Client
5
5
  Author: TickFlow Team
6
6
  License: MIT
7
7
  Project-URL: Documentation, https://docs.tickflow.org
8
- Project-URL: Repository, https://github.com/tickflow/tickflow-python
9
8
  Keywords: finance,stock,market-data,trading,api-client
10
9
  Classifier: Development Status :: 4 - Beta
11
10
  Classifier: Intended Audience :: Developers
File without changes
File without changes