davesag / ir-api

A NodeJS Client for Independent Reserve's API
MIT License
6 stars 6 forks source link

getTransactions limited by txType ? also mandatory parameters that shouldn't be mandatory? #770

Closed omniwolf closed 4 months ago

omniwolf commented 4 months ago

Hello, I know this is an old possibly unmaintained repository, but I'm trying to use it in my Node.JS app and found something strange In the /api/getTransactions.js file it has this:

txTypes: ['isRequired', isArrayOf(['Brokerage', 'Trade''])],

So it seems we can only request Brokerage and Trade transaction types? I want "Withdrawal". If I add it there it works, but I guess would be nice to allow all transaction types out of the box?

I also see that txType is IsRequired, as well as fromTimestampUtc and toTimestampUtc. None of these are actually required in the IR API, so seems odd that you would force it.

omniwolf commented 4 months ago

Made a PR with the fixes for this. https://github.com/davesag/ir-api/pull/772

davesag commented 4 months ago

thanks for the contributions - sorry it took so long to get to