I try to get a transaction data from NIS API.
I can only get transaction datas from NEXT of the txid.
How to get a data of the TXID directly?
I try to get a transaction data from NIS API.
I can only get transaction datas from NEXT of the txid.
How to get a data of the TXID directly?
Getting a single tx by id is not possible since the id is different for each node, you can however get a transaction by its hash:
But you have to use a different api if you want to get one transaction by hash:
Notice however that not every node is supporting this api for transactions older than 36 hours.
You can enable it for your node in the config.properties by setting
nis.transactionHashRetentionTime = -1
You can also use nodes that are known to support this request type.
For testnet those are the node with ip
104.128.226.60 and
23.228.67.85
and for mainnet the nodes with the following ips support it:
62.75.171.41
104.251.212.131
45.124.65.125
185.53.131.101
Thank you ! I get a txdata with the way!
I am using API to get all transaction in first time., After that when I get last hit transaction ID. I will pass hash=โlast_transaction_idโ this will return old 25 transaction which is happened before this hash., but i want result which will return transactions happened after this particular hash. Could you please help me?
You can page only in one direction:
http://104.128.226.60:7890/account/transfers/incoming?address=TCVMRODPWHZ5QD4WLSDD2Z4ZCCC3FAXNNRIEKBFM (newest transactions)
http://104.128.226.60:7890/account/transfers/incoming?address=TCVMRODPWHZ5QD4WLSDD2Z4ZCCC3FAXNNRIEKBFM&hash=<last_hash_from_prev_request>
and so onโฆ
By default you receive 25 transactions in one request. To increase it you have param pageSize. You can set max 100.
Thank you for the help