tx

The tx method retrieves information on a single transaction.

Parameters

Field

Type

Description

transaction

String

The 256-bit hash of the transaction, as hex.

binary

Boolean

(Optional) If true, return transaction data and metadata as binary serialized to hexadecimal strings. If false, return transaction data and metadata as JSON. The default is false.

min_ledger

Number

(Optional) Use this with max_ledger to specify a range of up to 1000 ledger indexes, starting with this ledger (inclusive). If the server cannot find the transaction, it confirms whether it was able to search all the ledgers in this range.

max_ledger

Number

(Optional) Use this with min_ledger to specify a range of up to 1000 ledger indexes, ending with this ledger (inclusive). If the server cannot find the transaction, it confirms whether it was able to search all the ledgers in the requested range.

Returns

Information on a single transaction.

Example

//Request
curl -H 'Content-Type: application/json' -d '{"method":"tx","params":[{"transaction":"E08D6E9754025BA2534A78707605E0601F03ACE063687A0CA1BDDACFCD1698C7","binary":false}]}' http://<your-app-id>.ankr.com
//Response
{
"result":{
"Account":"rhJYdAAiZPJpztnu13pHAATi4gsEi3Rf28",
"Fee":"12",
"Flags":0,
"LastLedgerSequence":60209791,
"OfferSequence":12601082,
"Sequence":12601086,
"SigningPubKey":"03ACB96D1F66D5E1A8A4AB82C62D3B700DB3AC188C155AD3CBB4793BB2C6831A31",
"TakerGets":{
"currency":"CNY",
"issuer":"rJ1adrpGS3xsnQMb9Cw54tWJVFPuSdZHK",
"value":"12929.22056094894"
},
"TakerPays":"4337398330",
"TransactionType":"OfferCreate",
"TxnSignature":"304402202C6EAEC2B28A624854A95B15B23A00C496BC4014C288140B251358B8CEE240FD02204C3B5EA952698C625C1A2E8B86E220562A3E6BC447477A30523F04DEB5102803",
"date":661255400,
"hash":"7212423DE2B349275395F89A7890651B2EC5CEC0F0B01385967E4F27F7F8ABB8",
"inLedger":60209789,
"ledger_index":60209789,
"meta":{
"AffectedNodes":[
{
"ModifiedNode":{
"FinalFields":{
"Flags":0,
"Owner":"rhJYdAAiZPJpztnu13pHAATi4gsEi3Rf28",
"RootIndex":"0BDA588DEE36FDF574915A44E9171BCFBFB37E610113D3EDED6ECB2C47044DDC"
},
"LedgerEntryType":"DirectoryNode",
"LedgerIndex":"0BDA588DEE36FDF574915A44E9171BCFBFB37E610113D3EDED6ECB2C47044DDC"
}
},
{
"DeletedNode":{
"FinalFields":{
"ExchangeRate":"5A0BEB0B20FD085A",
"Flags":0,
"RootIndex":"1AC09600F4B502C8F7F830F80B616DCB6F3970CB79AB70975A0BEB0B20FD085A",
"TakerGetsCurrency":"000000000000000000000000434E590000000000",
"TakerGetsIssuer":"0360E3E0751BD9A566CD03FA6CAFC78118B82BA0",
"TakerPaysCurrency":"0000000000000000000000000000000000000000",
"TakerPaysIssuer":"0000000000000000000000000000000000000000"
},
"LedgerEntryType":"DirectoryNode",
"LedgerIndex":"1AC09600F4B502C8F7F830F80B616DCB6F3970CB79AB70975A0BEB0B20FD085A"
}
},
{
"CreatedNode":{
"LedgerEntryType":"DirectoryNode",
"LedgerIndex":"1AC09600F4B502C8F7F830F80B616DCB6F3970CB79AB70975A0BEB1AD9B5B6F9",
"NewFields":{
"ExchangeRate":"5A0BEB1AD9B5B6F9",
"RootIndex":"1AC09600F4B502C8F7F830F80B616DCB6F3970CB79AB70975A0BEB1AD9B5B6F9",
"TakerGetsCurrency":"000000000000000000000000434E590000000000",
"TakerGetsIssuer":"0360E3E0751BD9A566CD03FA6CAFC78118B82BA0"
}
}
},
{
"ModifiedNode":{
"FinalFields":{
"Account":"rhJYdAAiZPJpztnu13pHAATi4gsEi3Rf28",
"Balance":"100524841",
"Flags":8388608,
"OwnerCount":7,
"Sequence":12601087
},
"LedgerEntryType":"AccountRoot",
"LedgerIndex":"25E4CCA2FDABEEA1685D1B23B5CEB0E71B14C98A86EBBDB5770057432F57DFF9",
"PreviousFields":{
"Balance":"100524853",
"Sequence":12601086
},
"PreviousTxnID":"F5873D9E35223D6AD5EE9D8D114398538C7736C0FF0F6E48D234C09F139E7189",
"PreviousTxnLgrSeq":60209789
}
},
{
"DeletedNode":{
"FinalFields":{
"Account":"rhJYdAAiZPJpztnu13pHAATi4gsEi3Rf28",
"BookDirectory":"1AC09600F4B502C8F7F830F80B616DCB6F3970CB79AB70975A0BEB0B20FD085A",
"BookNode":"0000000000000000",
"Flags":0,
"OwnerNode":"0000000000000000",
"PreviousTxnID":"BC6C00DA72BF1B5D3C2E29F1BD0577FA68C4DCCDDC102D09333513AAD4C32BE3",
"PreviousTxnLgrSeq":60209788,
"Sequence":12601082,
"TakerGets":{
"currency":"CNY",
"issuer":"rJ1adrpGS3xsnQMb9Cw54tWJVFPuSdZHK",
"value":"42258.67148661048"
},
"TakerPays":"14176338084"
},
"LedgerEntryType":"Offer",
"LedgerIndex":"2B3E1B4F1B1F223407828B697FD8040D90CEEC9E33A5B78F9413CB4B933323F2"
}
},
{
"CreatedNode":{
"LedgerEntryType":"Offer",
"LedgerIndex":"412F6666F15C159AD1C6E661F295AC8B31E5E02334551A8AD64EA63F9FEF1F96",
"NewFields":{
"Account":"rhJYdAAiZPJpztnu13pHAATi4gsEi3Rf28",
"BookDirectory":"1AC09600F4B502C8F7F830F80B616DCB6F3970CB79AB70975A0BEB1AD9B5B6F9",
"Sequence":12601086,
"TakerGets":{
"currency":"CNY",
"issuer":"rJ1adrpGS3xsnQMb9Cw54tWJVFPuSdZHK",
"value":"12929.22056094894"
},
"TakerPays":"4337398330"
}
}
}
],
"TransactionIndex":1,
"TransactionResult":"tesSUCCESS"
},
"status":"success",
"validated":true
}
}