File tree 3 files changed +25
-3
lines changed 3 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ def referral_url():
150
150
151
151
152
152
def stockloan_url ():
153
- return ('https://api.robinhood.com/stock_loan/payments /' )
153
+ return ('https://api.robinhood.com/accounts/stock_loan_payments /' )
154
154
155
155
156
156
def subscription_url ():
Original file line number Diff line number Diff line change 7
7
long_description = f .read ()
8
8
9
9
setup (name = 'robin_stocks' ,
10
- version = '3.1.0 ' ,
10
+ version = '3.1.1 ' ,
11
11
description = 'A Python wrapper around the Robinhood API' ,
12
12
long_description = long_description ,
13
13
long_description_content_type = 'text/x-rst' ,
Original file line number Diff line number Diff line change @@ -835,4 +835,26 @@ def isFloat(f):
835
835
assert isFloat (order ['quantity' ])
836
836
assert isFloat (order ['cumulative_quantity' ])
837
837
if (order ['state' ] == 'filled' ):
838
- assert (order ['quantity' ] == order ['cumulative_quantity' ])
838
+ assert (order ['quantity' ] == order ['cumulative_quantity' ])
839
+
840
+ class TestAccountInformation :
841
+ @classmethod
842
+ def setup_class (cls ):
843
+ totp = pyotp .TOTP (os .environ ['robin_mfa' ]).now ()
844
+ login = r .login (os .environ ['robin_username' ], os .environ ['robin_password' ], mfa_code = totp )
845
+
846
+ def test_get_stock_loan_payments (cls ):
847
+ def isFloat (f ):
848
+ try :
849
+ float (f )
850
+ return True
851
+ except ValueError :
852
+ return False
853
+
854
+ loanPayments = r .get_stock_loan_payments ()
855
+ assert loanPayments
856
+ for payment in loanPayments :
857
+ assert ('amount' in payment )
858
+ assert isFloat (payment ['amount' ]['amount' ])
859
+ assert ('symbol' in payment )
860
+ assert ('description' in payment )
You can’t perform that action at this time.
0 commit comments