Skip to content

[api] Start observation to address #16

@olemis

Description

@olemis

[POST] /api/transactions/history/to/{address}/observation

Should start observation of the transactions that transfer fund to the address . Should affect result of the [GET] /api/transactions/history/to/{address} .

Errors:

* 409 Conflict : transactions to the  address  are already observed.

Python implementation

@api.route('/transactions/history/to/<string:address>/observation', methods=['POST'])
def add_history_to_address(address):
    """
    Starts observation of the transactions that transfer fund from the address
    """
    
    result = add_transaction_observation_to_address(address)
    
    # if successfully stored in observation list, return a plain 200
    if "error" in result:
        return make_response(jsonify(build_error(result["error"])), result["status"])
    else:
        return ""

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions