firstrade 0.0.34__py3-none-any.whl → 0.0.35__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.
firstrade/account.py CHANGED
@@ -8,6 +8,7 @@ import requests
8
8
  from firstrade import urls
9
9
  from firstrade.exceptions import (
10
10
  AccountResponseError,
11
+ LoginError,
11
12
  LoginRequestError,
12
13
  LoginResponseError,
13
14
  )
@@ -261,6 +262,11 @@ class FTSession:
261
262
  "t_token": self.t_token,
262
263
  }
263
264
  response = self.session.post(urls.verify_pin(), data=data)
265
+ else:
266
+ raise LoginError(
267
+ "MFA required but no valid MFA method "
268
+ "was provided (pin, email/phone, or mfa_secret)."
269
+ )
264
270
  self.login_json = response.json()
265
271
  if self.login_json["error"] == "":
266
272
  if self.pin or self.mfa_secret is not None:
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: firstrade
3
- Version: 0.0.34
3
+ Version: 0.0.35
4
4
  Summary: An unofficial API for Firstrade
5
5
  Home-page: https://github.com/MaxxRK/firstrade-api
6
- Download-URL: https://github.com/MaxxRK/firstrade-api/archive/refs/tags/0034.tar.gz
6
+ Download-URL: https://github.com/MaxxRK/firstrade-api/archive/refs/tags/0035.tar.gz
7
7
  Author: MaxxRK
8
8
  Author-email: maxxrk@pm.me
9
9
  License: MIT
@@ -13,8 +13,6 @@ Classifier: Intended Audience :: Developers
13
13
  Classifier: Topic :: Internet :: WWW/HTTP :: Session
14
14
  Classifier: License :: OSI Approved :: MIT License
15
15
  Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.8
17
- Classifier: Programming Language :: Python :: 3.9
18
16
  Classifier: Programming Language :: Python :: 3.10
19
17
  Classifier: Programming Language :: Python :: 3.11
20
18
  Classifier: Programming Language :: Python :: 3.12
@@ -22,8 +20,7 @@ Classifier: Programming Language :: Python :: 3.13
22
20
  Description-Content-Type: text/markdown
23
21
  License-File: LICENSE
24
22
  Requires-Dist: requests
25
- Requires-Dist: beautifulsoup4
26
- Requires-Dist: lxml
23
+ Requires-Dist: pyotp
27
24
  Dynamic: author
28
25
  Dynamic: author-email
29
26
  Dynamic: classifier
@@ -1,11 +1,11 @@
1
1
  firstrade/__init__.py,sha256=fNiWYgSTjElY1MNv0Ug-sVLMTR2z_Ngri_FY7Pekdrw,95
2
- firstrade/account.py,sha256=4tS-m_85RW6E5YM6Srn9Wn-6TJKV0fDZYnMId7Rb5B4,15870
2
+ firstrade/account.py,sha256=1SMh3fopaHJnyTtHFsbuHXihz7qqv9m8OReDZ3rk-XM,16066
3
3
  firstrade/exceptions.py,sha256=OrWB83rc33LSxrI7WxXo4o7FcIfmvPSC9bAY8K1pn7U,1886
4
4
  firstrade/order.py,sha256=_b1SnqagwBu7KUmvzSUcp8iMOC3I3k-QDjiDLhlVk7E,8710
5
5
  firstrade/symbols.py,sha256=RH36QLx5v3rKPpBidyJFwGJSDkF5u5f2ILTSZNAGXGQ,7903
6
6
  firstrade/urls.py,sha256=Iw10isyvoqKwiSl3TVuIbos5INZzIEwpln3HcZ7P5aw,2125
7
- firstrade-0.0.34.dist-info/licenses/LICENSE,sha256=wPEQjDqm5zMBmEcZp219Labmq_YIjhudpZiUzyVKaFA,1057
8
- firstrade-0.0.34.dist-info/METADATA,sha256=cEo6oLxI6nGGQGTOM1wAfISYjt-5jZ1B_WirQsalSdc,3367
9
- firstrade-0.0.34.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
10
- firstrade-0.0.34.dist-info/top_level.txt,sha256=tdA8v-KDxU1u4VV6soiNWGBlni4ojv_t_j2wFn5nZcs,10
11
- firstrade-0.0.34.dist-info/RECORD,,
7
+ firstrade-0.0.35.dist-info/licenses/LICENSE,sha256=wPEQjDqm5zMBmEcZp219Labmq_YIjhudpZiUzyVKaFA,1057
8
+ firstrade-0.0.35.dist-info/METADATA,sha256=6nQJDoEBpQBlai_7wzwZiWMqm5r8VWMoL21_2mNdH8M,3238
9
+ firstrade-0.0.35.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
10
+ firstrade-0.0.35.dist-info/top_level.txt,sha256=tdA8v-KDxU1u4VV6soiNWGBlni4ojv_t_j2wFn5nZcs,10
11
+ firstrade-0.0.35.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5