How to get the amount of asset transfered in a transaction?

+2 votes

I made a transaction by transferring 0.01 units of an asset to another address . I used the getaddresstransaction API command to get the details of a transaction. The balance section is showing as empty. How do I get the units of asset transferred?

{
    "balance" : {
        "amount" : 0.00000000,
        "assets" : [
        ]
    },
    "myaddresses" : [
        "13uCQ6PABwx3bvrSp1iyuTHannu7FhieBXsXzy",
        "1WYSqZGHNGnyz7PxAqLWBFBL3LzRNEHqsyfpJf"
    ],
    "addresses" : [
    ],
    "permissions" : [
    ],
    "data" : [
    ],
    "confirmations" : 190,
    "blockhash" : "0000eb18ff5562d73a22117fffb957e18169c31791946f3b79631210f1d9bd29",
    "blockindex" : 1,
    "blocktime" : 1481715683,
    "txid" : "d7b6175d538f8e5cab2724f27b71947fc178eb47bd2639a4e5d49d051ef71ce5",
    "valid" : true,
    "time" : 1481715670,
    "timereceived" : 1481715670,
    "vin" : [
        {
            "txid" : "ae63859e125f60c688719be6ed3b65ca49ff498f5e69cfb5b572500b10c49949",
            "vout" : 1,
            "addresses" : [
                "1WYSqZGHNGnyz7PxAqLWBFBL3LzRNEHqsyfpJf"
            ],
            "type" : "pubkeyhash",
            "ismine" : true,
            "iswatchonly" : false,
            "amount" : 0.00000000,
            "assets" : [
                {
                    "name" : "{name:pcn,open:true}",
                    "assetref" : "41-265-9940",
                    "qty" : 3.82000000
                }
            ]
        }
    ],
    "vout" : [
        {
            "n" : 0,
            "addresses" : [
                "13uCQ6PABwx3bvrSp1iyuTHannu7FhieBXsXzy"
            ],
            "type" : "pubkeyhash",
            "ismine" : true,
            "iswatchonly" : false,
            "amount" : 0.00000000,
            "assets" : [
                {
                    "name" : "{name:pcn,open:true}",
                    "assetref" : "41-265-9940",
                    "qty" : 0.01000000,
                    "type" : "transfer"
                }
            ],
            "permissions" : [
            ]
        },
        {
            "n" : 1,
            "addresses" : [
                "1WYSqZGHNGnyz7PxAqLWBFBL3LzRNEHqsyfpJf"
            ],
            "type" : "pubkeyhash",
            "ismine" : true,
            "iswatchonly" : false,
            "amount" : 0.00000000,
            "assets" : [
                {
                    "name" : "{name:pcn,open:true}",
                    "assetref" : "41-265-9940",
                    "qty" : 3.81000000,
                    "type" : "transfer"
                }
            ],
            "permissions" : [
            ]
        }
    ],
    "hex" : "01000000014999c4100b5072b5b5cf695e8f49ff49ca653bede69b7188c6605f129e8563ae010000006a4730440220132c8b67262ae53bc85501dd0fd5ff1fb88980621f721b9b6c33a3a86636fb8a022021f1de859b4f638475743dc6cac7470a3af413466348d204c9aee184c500d8940121028160279b08056f359ede8a0da1c38d9bda25e4011f33e0f8758cd8e98075a0ffffffffff0200000000000000003176a9141574d94d7320c7e2fb421e8a90bb6353921fd90788ac1673706b712900000009010000d42601000000000000007500000000000000003176a914da948cc435cd02ffd590e0fbfdfc63434b04fe7788ac1673706b712900000009010000d4267d010000000000007500000000"
}

 

 

asked Dec 14, 2016 by Cypher

1 Answer

+2 votes

Did you use getwallettransaction or getaddresstransaction? That looks like the output from the former, but maybe there is a bug.

answered Dec 14, 2016 by MultiChain
It is the getwallettransaction output, but I observed the same in getaddresstransaction. It's weird that it got fixed automatically. Now the output looks fine.
...