Author Topic: How to call get_account_history by RPC  (Read 605 times)

0 Members and 1 Guest are viewing this topic.

Offline Btc38

  • Full Member
  • ***
  • Posts: 67
    • View Profile
How to call get_account_history by RPC
« 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.
Please help, thanks
BTC38: One step a footprint is true

Offline monsterer

Re: How to call get_account_history by RPC
« Reply #1 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"),
                            ])
My opinions do not represent those of metaexchange unless explicitly stated.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12915
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: How to call get_account_history by RPC
« Reply #2 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
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH