You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should return completed transactions that transfer fund from the address and that were broadcasted after the transaction with the hash equal to the afterHash .
If afterHash is empty, transactions should be read from the beginning.
Should include all transactions broadcasted even if not going through /transaction/broadcast/* API endpoints.
If there are no transactions to return, empty array should be returned. Amount of the returned transactions should not exceed take .
Response:
[{// Operation ID.// Can be empty.// Should be not empty for transactions that// broadcasted using this API“operationId”: “guid”,// Transaction moment as ISO 8601 in UTC“timestamp”: “datetime”,// Source address“fromAddress”: “string”,// Destination address“toAddress”: “string”,// Asset ID e.g. SKY“assetId”: “string”// Amount without fee. Is integer as string, aligned// to the asset accuracy. Actual value can be// calculated as// x = sourceAmount * (10 ^ asset.Accuracy)“amount”: “string”,// Transaction hash as base64 string“hash”: “string”}]
Python implementation
@api.route('/transactions/history/from/<string:address>', methods=['GET'])defget_history_from_address(address):
""" Returns completed transactions that transfer fund from the address """ifnotexists_address_transfer_observation_from(address):
returnmake_response(jsonify(build_error('No content. transactions from the address are not observed')), 204)
take=request.args.get('take')
iftakeisNone:
take=0else:
take=int(take)
afterhash=request.args.get('afterHash')
ifafterhashisNone:
afterhash=""update_index()
items=get_transactions_from(address, take, afterhash)
if'error'initems:
returnmake_response(jsonify(build_error(items['error'])), items['status'])
returnjsonify(items)
The text was updated successfully, but these errors were encountered:
[GET] /api/transactions/history/from/{address}?take=integer&[afterHash=string]
Should return completed transactions that transfer fund from the
address
and that were broadcasted after the transaction with thehash
equal to theafterHash
.If
afterHash
is empty, transactions should be read from the beginning.Should include all transactions broadcasted even if not going through
/transaction/broadcast/*
API endpoints.If there are no transactions to return, empty array should be returned. Amount of the returned transactions should not exceed
take
.Response:
Python implementation
The text was updated successfully, but these errors were encountered: