# Generated by Scrape::ApiDefinitionsJob: 2019-10-08 17:22:36 UTC
# See: https://git.io/vx5CY
---
- name: Account history API
  description: Used to lookup account history information. **These AppBase API methods are still under development and subject to change.**
  methods:
    - api_method: account_history_api.get_account_history
      purpose: |
        Returns a history of all operations for a given account.
        
        Also see: [Paginated API Methods]({{ '/tutorials-recipes/paginated-api-methods.html#account_history_apiget_account_history' | relative_url }})
      parameter_json: {"account":"","start":"18446744073709551615","limit":1000}
      expected_response_json: |
        {"history": [
          [99, {
            "trx_id": "0000000000000000000000000000000000000000",
            "block": 0,
            "trx_in_block": 4294967295,
            "op_in_trx": 0,
            "virtual_op": 0,
            "timestamp": "2019-12-09T21:32:39",
            "op": {}
          }]
        ]}
      curl_examples:
        - '{"jsonrpc":"2.0", "method":"account_history_api.get_account_history", "params":{"account":"hiveio", "start":1000, "limit":1000}, "id":1}'
        - '{"jsonrpc":"2.0", "method":"account_history_api.get_account_history", "params":{"account":"hiveio", "start":-1, "limit":10000}, "id":1}'
      expected_curl_responses:
        - Could not find API account_history_api
        - Could not find API account_history_api
      client_docs:
        - '[hive-js](https://gitlab.syncad.com/hive/hive-js/tree/master/doc#get-account-history)'
        - '[beem](https://beem.readthedocs.io/en/latest/apidefinitions.html#get-account-history)'
        - '[hive-ruby](https://www.rubydoc.info/gems/hive-ruby/Hive/Api)'
    - api_method: account_history_api.get_ops_in_block
      purpose: Returns all operations contained in a block.
      parameter_json: {"block_num":0,"only_virtual":false}
      expected_response_json: |
        {
          "ops": [{
            "trx_id": "0000000000000000000000000000000000000000",
            "block": 0,
            "trx_in_block": 4294967295,
            "op_in_trx": 0,
            "virtual_op": 0,
            "timestamp": "2019-10-06T09:05:15",
            "op": {}
          }]
        }
      curl_examples:
        - '{"jsonrpc":"2.0", "method":"account_history_api.get_ops_in_block", "params":{"block_num":1,"only_virtual":false}, "id":1}'
        - '{"jsonrpc":"2.0", "method":"account_history_api.get_ops_in_block", "params":{"block_num":5443322,"only_virtual":true}, "id":1}'
      expected_curl_responses:
        - Could not find API account_history_api
        - Could not find API account_history_api
      client_docs:
        - '[hive-js](https://gitlab.syncad.com/hive/hive-js/tree/master/doc#get-ops-in-block)'
        - '[beem](https://beem.readthedocs.io/en/latest/apidefinitions.html#get-ops-in-block)'
        - '[hive-ruby](https://www.rubydoc.info/gems/hive-ruby/Hive/Api)'
    - api_method: account_history_api.get_transaction
      deprecated: true
      purpose: Returns the details of a transaction based on a transaction id.
      parameter_json: {"id":"0000000000000000000000000000000000000000"}
      expected_response_json: |
        {
          "ref_block_num": 0,
          "ref_block_prefix": 0,
          "expiration": "1970-01-01T00:00:00",
          "operations": [],
          "extensions": [],
          "signatures": [],
          "transaction_id": "0000000000000000000000000000000000000000",
          "block_num": 0,
          "transaction_num": 0
        }
      curl_examples:
        - '{"jsonrpc":"2.0", "method":"account_history_api.get_transaction", "params":{"id":"6fde0190a97835ea6d9e651293e90c89911f933c"}, "id":1}'
      expected_curl_responses:
        - Could not find API account_history_api
      client_docs:
        - '[hive-js](https://gitlab.syncad.com/hive/hive-js/tree/master/doc#get-transaction)'
        - '[beem](https://beem.readthedocs.io/en/latest/apidefinitions.html#get-transaction)'
        - '[hive-ruby](https://www.rubydoc.info/gems/hive-ruby/Hive/Api)'
    - api_method: account_history_api.enum_virtual_ops
      since: Mysterious Future
      purpose: 
      parameter_json: '{"block_range_begin":1,"block_range_end":2}'
      expected_response_json: |
        {
          "ops": [{
            "trx_id": "0000000000000000000000000000000000000000",
            "block": 0,
            "trx_in_block": 4294967295,
            "op_in_trx": 0,
            "virtual_op": 0,
            "timestamp": "2016-03-24T17:46:30",
            "op": {}
          }]
        }
      client_docs:
        - '[hive-ruby](https://www.rubydoc.info/gems/hive-ruby/Hive/Api)'
