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

Export calls missing #72

Open
molecular opened this issue Mar 6, 2021 · 1 comment
Open

Export calls missing #72

molecular opened this issue Mar 6, 2021 · 1 comment

Comments

@molecular
Copy link

molecular commented Mar 6, 2021

adding 'AddExport', 'ExportStatus', 'RetrieveExport', 'RemoveExport' to function list was easy.

But RetrieveExport response is binary data, not json, so I used this ugly hack to make it work and return a Buffer:

8c8
<       private : [ 'Balance', 'TradeBalance', 'OpenOrders', 'ClosedOrders', 'QueryOrders', 'TradesHistory', 'QueryTrades', 'OpenPositions', 'Ledgers', 'QueryLedgers', 'TradeVolume', 'AddOrder', 'CancelOrder', 'DepositMethods', 'DepositAddresses', 'DepositStatus', 'WithdrawInfo', 'Withdraw', 'WithdrawStatus', 'WithdrawCancel', 'GetWebSocketsToken', 'AddExport', 'ExportStatus', 'RetrieveExport', 'RemoveExport' ],
---
>       private : [ 'Balance', 'TradeBalance', 'OpenOrders', 'ClosedOrders', 'QueryOrders', 'TradesHistory', 'QueryTrades', 'OpenPositions', 'Ledgers', 'QueryLedgers', 'TradeVolume', 'AddOrder', 'CancelOrder', 'DepositMethods', 'DepositAddresses', 'DepositStatus', 'WithdrawInfo', 'Withdraw', 'WithdrawStatus', 'WithdrawCancel', 'GetWebSocketsToken' ],
42,46d41
<       // hackjob molec
<       if ( url.endsWith('RetrieveExport')) {
<               options.responseType = 'buffer'
<               return await got(url, options).buffer()
<       } else {
61,62d55
<               return response;
<       }
63a57
>       return response;
@molecular
Copy link
Author

Edit: sorry, I obviously did that patch the wrong way (reverse)

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

1 participant