tastytrade 11.0.1__py3-none-any.whl → 11.0.3__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
@@ -1,10 +1,10 @@
1
1
  import logging
2
2
 
3
3
  API_URL = "https://api.tastyworks.com"
4
- API_VERSION = "20251026"
4
+ API_VERSION = "20251101"
5
5
  CERT_URL = "https://api.cert.tastyworks.com"
6
6
  VAST_URL = "https://vast.tastyworks.com"
7
- VERSION = "11.0.1"
7
+ VERSION = "11.0.3"
8
8
 
9
9
  __version__ = VERSION
10
10
  version_str: str = f"tastyware/tastytrade:v{VERSION}"
tastytrade/metrics.py CHANGED
@@ -2,7 +2,7 @@ from datetime import date, datetime
2
2
  from decimal import Decimal
3
3
 
4
4
  from tastytrade.session import Session
5
- from tastytrade.utils import TastytradeData
5
+ from tastytrade.utils import TastytradeData, validate_and_parse
6
6
 
7
7
 
8
8
  class DividendInfo(TastytradeData):
@@ -206,7 +206,12 @@ async def a_get_risk_free_rate(session: Session) -> Decimal:
206
206
 
207
207
  :param session: active user session to use
208
208
  """
209
- data = await session._a_get("/margin-requirements-public-configuration")
209
+ request = session.async_client.build_request(
210
+ "GET", "/margin-requirements-public-configuration", timeout=30
211
+ )
212
+ del request.headers["Authorization"]
213
+ response = await session.async_client.send(request)
214
+ data = validate_and_parse(response)
210
215
  return Decimal(data["risk-free-rate"])
211
216
 
212
217
 
@@ -216,5 +221,10 @@ def get_risk_free_rate(session: Session) -> Decimal:
216
221
 
217
222
  :param session: active user session to use
218
223
  """
219
- data = session._get("/margin-requirements-public-configuration")
224
+ request = session.sync_client.build_request(
225
+ "GET", "/margin-requirements-public-configuration", timeout=30
226
+ )
227
+ del request.headers["Authorization"]
228
+ response = session.sync_client.send(request)
229
+ data = validate_and_parse(response)
220
230
  return Decimal(data["risk-free-rate"])
tastytrade/order.py CHANGED
@@ -316,8 +316,8 @@ class PlacedOrder(TastytradeData):
316
316
  cancelled_at: datetime | None = None
317
317
  cancel_user_id: str | None = None
318
318
  cancel_username: str | None = None
319
- replacing_order_id: str | None = None
320
- replaces_order_id: str | None = None
319
+ replacing_order_id: int | None = None
320
+ replaces_order_id: int | None = None
321
321
  in_flight_at: datetime | None = None
322
322
  live_at: datetime | None = None
323
323
  received_at: datetime | None = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tastytrade
3
- Version: 11.0.1
3
+ Version: 11.0.3
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,11 +1,11 @@
1
- tastytrade/__init__.py,sha256=SHnweFT5WOwvQwP-opk9HGnmlGpXRDUuf93yqDoUM7s,531
1
+ tastytrade/__init__.py,sha256=tK0PtKkDY-OsRIPa_lVYvZeCxvDcqi8dKGDYGjb8diU,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
5
5
  tastytrade/market_sessions.py,sha256=r0L-4CSzjx2gC3pJS1C0ae9RiahaKWs67Ljng3DwODI,3382
6
- tastytrade/metrics.py,sha256=zExIU2cWrOom_D7uD9RZ7tOAU2Z03opGz_f6VU7MIxY,7101
6
+ tastytrade/metrics.py,sha256=LqpUZIR4L2bQwawf_L4gJ3Pjg_S72eURrJpu4ebKtpU,7495
7
7
  tastytrade/oauth.py,sha256=UePuYKwXfwgZ1gTwDa9-pAEYM9xnFWxgsF5v_3va314,4564
8
- tastytrade/order.py,sha256=NYl2YZSHnX02WXU-ihBtIPhOByQ_6uH__ls7gm5Ikrk,14868
8
+ tastytrade/order.py,sha256=Z-3Oa-0JcRXPQhNGUnRJCIWrkimHV4cKQUPC9G4FKIU,14868
9
9
  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
@@ -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.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,,
26
+ tastytrade-11.0.3.dist-info/METADATA,sha256=ePcD4OZ_WIoCDVNoxISSp9S-iZ4fT2gSRYnLfJ6GNZE,10904
27
+ tastytrade-11.0.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
28
+ tastytrade-11.0.3.dist-info/licenses/LICENSE,sha256=enBkMN4OsfLt6Z_AsrGC7u5dAJkCEODnoN7BwMCzSfc,1072
29
+ tastytrade-11.0.3.dist-info/RECORD,,