tastytrade 11.0.0__py3-none-any.whl → 11.0.1__py3-none-any.whl

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.
tastytrade/__init__.py CHANGED
@@ -4,7 +4,7 @@ API_URL = "https://api.tastyworks.com"
4
4
  API_VERSION = "20251026"
5
5
  CERT_URL = "https://api.cert.tastyworks.com"
6
6
  VAST_URL = "https://vast.tastyworks.com"
7
- VERSION = "11.0.0"
7
+ VERSION = "11.0.1"
8
8
 
9
9
  __version__ = VERSION
10
10
  version_str: str = f"tastyware/tastytrade:v{VERSION}"
tastytrade/utils.py CHANGED
@@ -344,9 +344,11 @@ def paginate(
344
344
  json = response.json()
345
345
  res.extend([model(**i) for i in json["data"]["items"]])
346
346
  # handle pagination
347
+ pagination = json.get("pagination")
347
348
  if (
348
- json["pagination"]["page-offset"] >= json["pagination"]["total-pages"] - 1
349
+ not pagination
349
350
  or not paginate
351
+ or pagination["page-offset"] >= pagination["total-pages"] - 1
350
352
  ):
351
353
  break
352
354
  params["page-offset"] += 1
@@ -382,9 +384,11 @@ async def a_paginate(
382
384
  json = response.json()
383
385
  res.extend([model(**i) for i in json["data"]["items"]])
384
386
  # handle pagination
387
+ pagination = json.get("pagination")
385
388
  if (
386
- json["pagination"]["page-offset"] >= json["pagination"]["total-pages"] - 1
389
+ not pagination
387
390
  or not paginate
391
+ or pagination["page-offset"] >= pagination["total-pages"] - 1
388
392
  ):
389
393
  break
390
394
  params["page-offset"] += 1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tastytrade
3
- Version: 11.0.0
3
+ Version: 11.0.1
4
4
  Summary: An unofficial, sync/async SDK for Tastytrade!
5
5
  Project-URL: Homepage, https://github.com/tastyware/tastytrade
6
6
  Project-URL: Documentation, https://tastyworks-api.rtfd.io
@@ -1,4 +1,4 @@
1
- tastytrade/__init__.py,sha256=pStfEUHLkVWHC6gGYQDDC84Cjr6T3JTAf9RuBooZHNo,531
1
+ tastytrade/__init__.py,sha256=SHnweFT5WOwvQwP-opk9HGnmlGpXRDUuf93yqDoUM7s,531
2
2
  tastytrade/account.py,sha256=EKRx2Yta4TjPB8U2DuIqiOZ_pdgBUXyeTMaGdNeVRwU,56859
3
3
  tastytrade/instruments.py,sha256=kH2AuAu6UaRwj7Uz1dYrLe6rFkJqEMXJ1Lg_cMyPg_E,46789
4
4
  tastytrade/market_data.py,sha256=iyBpleKvDWfXReo6DuKbXP-gN1Yv8iyvNs9z2x5Gxig,5940
@@ -10,7 +10,7 @@ tastytrade/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  tastytrade/search.py,sha256=LdoVEhiYNvtolXlf_jAVZUtA2ymUWOvHMhQxJxuVt_A,1529
11
11
  tastytrade/session.py,sha256=11iorsPLvjf9Y_lpOy9lmq6aPUNBlrFBO5laOgbVTXg,15433
12
12
  tastytrade/streamer.py,sha256=7HISXzo3AKloOafMDp5NHSxW19cRcobfrrOUoymt-g4,32609
13
- tastytrade/utils.py,sha256=D8yvNwK5KgILcSIPQyH5HJh5H7Mc3V_m7Ng-DXbpEig,12650
13
+ tastytrade/utils.py,sha256=bLKzR6L3QqEQB_SMXgSCKqTELvdkeelu8ksycImIkKI,12766
14
14
  tastytrade/watchlists.py,sha256=K9jpgXi9a9dklGl-jCXzpbM0tOd836GSkXa4fySeH3Q,8657
15
15
  tastytrade/dxfeed/__init__.py,sha256=GmC0aKtiUjs7aqbX7PeqMaROxqalwzHOnJOMJn8TaZk,458
16
16
  tastytrade/dxfeed/candle.py,sha256=j9nuWftzOT_qGDTZNNfFIABZp_n_5Gi7OFm5KPK2dnc,1757
@@ -23,7 +23,7 @@ tastytrade/dxfeed/theoprice.py,sha256=L5aH--F_6xLZCSYZ4APpzlihbW0-cYEwRdeGVI-aNa
23
23
  tastytrade/dxfeed/timeandsale.py,sha256=QuMFoccq8x3c2y6s3DnwBNIVTrLS6OPqV6GmCNoXQEQ,1903
24
24
  tastytrade/dxfeed/trade.py,sha256=qNo4oKb7iq0Opoq3FCBEUUcGGF6udda1bD0eKQVty_0,1402
25
25
  tastytrade/dxfeed/underlying.py,sha256=YYqJNlmrlt6Kpg0F6voQ18g60obXiYTVlroXirBWPR8,1226
26
- tastytrade-11.0.0.dist-info/METADATA,sha256=M12nKwGVrjY_fitAP3YKz-iylKeP9Mpr9SnXYzcAaqE,10904
27
- tastytrade-11.0.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
28
- tastytrade-11.0.0.dist-info/licenses/LICENSE,sha256=enBkMN4OsfLt6Z_AsrGC7u5dAJkCEODnoN7BwMCzSfc,1072
29
- tastytrade-11.0.0.dist-info/RECORD,,
26
+ tastytrade-11.0.1.dist-info/METADATA,sha256=GZ0KAkzYpQv7a2nqrJO3hz4GAqjjLtTAcU8Kkg2xqQ0,10904
27
+ tastytrade-11.0.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
28
+ tastytrade-11.0.1.dist-info/licenses/LICENSE,sha256=enBkMN4OsfLt6Z_AsrGC7u5dAJkCEODnoN7BwMCzSfc,1072
29
+ tastytrade-11.0.1.dist-info/RECORD,,