Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement to_date, from_date & txTypesget_transactions() #2

Open
MelchiSalins opened this issue Sep 3, 2017 · 1 comment
Open

Implement to_date, from_date & txTypesget_transactions() #2

MelchiSalins opened this issue Sep 3, 2017 · 1 comment

Comments

@MelchiSalins
Copy link
Owner

get_transactions() currently doesn't accept the above parameters and needs to be implemented.

@PeerLabs
Copy link

Hi ... I want to query transactions

so i defined the following:

def debugTest(self):
		IR_APIKEY = 'XXXXXXXX'
		IR_APISECRET = 'XXXXXXX'

		irPvtAPI = ir.PrivateMethods(IR_APIKEY, IR_APISECRET)
		irPubAPI = ir.PublicMethods()

		txn_types = irPubAPI.get_valid_transaction_types()
		accounts = irPvtAPI.get_accounts()

		from_date = datetime(2014,11,1) 
		to_date= datetime(2017,11,30)

		irPvtAPI = ir.PrivateMethods(IR_APIKEY, IR_APISECRET)

		for account in accounts:
			acc_curr_code = account['CurrencyCode']
			acc_guid = account['AccountGuid']
			for txn_type in txn_types:
				print(acc_curr_code + ' GUID: ' + acc_guid)
				print("Txn Type: " + txn_type)
				print(irPvtAPI.get_transactions(acc_guid,from_date,to_date, txn_type))

print(irPvtAPI.get_transactions(acc_guid,from_date,to_date, txn_type)) <--- fails ....

ERROR:root:get_transactions() takes at most 4 arguments (5 given)

so i then replace it with ...
print(irPvtAPI.get_transactions(acc_guid))

then i randomly start to get this for some of the Currency/Txn_Types...

ERROR:root:400 Client Error: Bad Request for url:
https://api.independentreserve.com/Private/GetTransactions
None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants