File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed
Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -146,10 +146,10 @@ Notional orders are slightly different from normal orders. Since the market will
146146 )
147147 resp = account.place_order(session, order, dry_run = False )
148148
149- Cryptocurrency orders
150- ---------------------
149+ Cryptocurrency market orders
150+ ----------------------------
151151
152- Cryptocurrency orders should use the special ``IOC `` TIF:
152+ Cryptocurrency market orders should use the special ``IOC `` TIF:
153153
154154.. code-block :: python
155155
Original file line number Diff line number Diff line change 44API_VERSION = "20251026"
55CERT_URL = "https://api.cert.tastyworks.com"
66VAST_URL = "https://vast.tastyworks.com"
7- VERSION = "11.0.0 "
7+ VERSION = "11.0.1 "
88
99__version__ = VERSION
1010version_str : str = f"tastyware/tastytrade:v{ VERSION } "
Original file line number Diff line number Diff line change @@ -344,9 +344,11 @@ def paginate(
344344 json = response .json ()
345345 res .extend ([model (** i ) for i in json ["data" ]["items" ]])
346346 # handle pagination
347+ pagination = json .get ("pagination" )
347348 if (
348- json [ "pagination" ][ "page-offset" ] >= json [ " pagination" ][ "total-pages" ] - 1
349+ not pagination
349350 or not paginate
351+ or pagination ["page-offset" ] >= pagination ["total-pages" ] - 1
350352 ):
351353 break
352354 params ["page-offset" ] += 1
@@ -382,9 +384,11 @@ async def a_paginate(
382384 json = response .json ()
383385 res .extend ([model (** i ) for i in json ["data" ]["items" ]])
384386 # handle pagination
387+ pagination = json .get ("pagination" )
385388 if (
386- json [ "pagination" ][ "page-offset" ] >= json [ " pagination" ][ "total-pages" ] - 1
389+ not pagination
387390 or not paginate
391+ or pagination ["page-offset" ] >= pagination ["total-pages" ] - 1
388392 ):
389393 break
390394 params ["page-offset" ] += 1
You can’t perform that action at this time.
0 commit comments