BitShares Forum

Main => Technical Support => Topic started by: Btc38 on November 03, 2015, 09:04:52 am

Title: How to call get_account_history by RPC
Post by: Btc38 on November 03, 2015, 09:04:52 am
Our technical have met following problem when trying to call get_account_history by RPC.
Here is the detail.(http://chuantu.biz/t2/17/1446541454x-1566679533.png)
Please help, thanks
Title: Re: How to call get_account_history by RPC
Post by: monsterer on November 03, 2015, 10:51:54 am
Looks like you're using the wrong API - you need to connect to the CLI wallet to get account history. Either that or you haven't requested the history API from the cli wallet:

Take a look here: https://github.com/xeroc/python-graphenelib/blob/master/grapheneapi/graphenewsprotocol.py

Code: [Select]
self.wsexec([1,"history",[]], [
                             partial(self._set_api_id, "history"),
                            ])
Title: Re: How to call get_account_history by RPC
Post by: xeroc on November 09, 2015, 03:11:02 pm
Depending on whether you interface with the cli or the witness node you may also need to take a llook this script: https://github.com/xeroc/python-graphenelib/blob/master/scripts/monitor-deposits/monitor.py#L28

This interfaces with the witness node but requires to subscribe to the history-api