Assets

Hint

The rules for generating queries to the node are given in module REST API Node.

GET/assets/balance/{address}

Returns balance of all address {address} assets.

Method Response:

{
  "address": "3Mv61qe6egMSjRDZiiuvJDnf3Q1qW9tTZDB",
  "balances": [
    {
      "assetId": "Ax9T4grFxx5m3KPUEKjMdnQkCKtBktf694wU2wJYvQUD",
      "balance": 4879179221,
      "quantity": 48791792210,
      "reissuable": true,
      "minSponsoredAssetFee" : 100,
      "sponsorBalance" : 1233221,
      "issueTransaction" : {
         "type" : 3,
         ...
      }
    },
    {
      "assetId": "49KfHPJcKvSAvNKwM7CTofjKHzL87SaSx8eyADBjv5Wi",
      "balance": 10,
      "quantity": 10000000000,
      "reissuable": false,
      "issueTransaction" : {
         "type" : 3,
         ...
      }
    }
  ]
}

Method Parameters:

  • “Address” - participant address
  • “balances” - object with participant balance
  • “assetId” - asset ID
  • “balance” - asset balance
  • “quantity” - number of issued assets
  • “reissuable” - indicator whether asset can be reissued or not
  • “issueTransaction” - asset creation transaction
  • “minSponsoredAssetFee” - minimum value of fee for sponsorship transactions
  • “sponsorBalance” - assets allocated for payment of sponsored asset transactions

GET /assets/balance/{address}/{assetId}

Returns address {address} balance by asset {assetId}.

Method Response:

{
  "address": "3Mv61qe6egMSjRDZiiuvJDnf3Q1qW9tTZDB",
  "assetId": "Ax9T4grFxx5m3KPUEKjMdnQkCKtBktf694wU2wJYvQUD",
  "balance": 4879179221
}

GET /assets/details/{assetId}

Returns description of asset {assetId}.

Method Response:

{
  "assetId" : "8tdULCMr598Kn2dUaKwHkvsNyFbDB1Uj5NxvVRTQRnMQ",
  "issueHeight" : 140194,
  "issueTimestamp" : 1504015013373,
  "issuer" : "3NCBMxgdghg4tUhEEffSXy11L6hUi6fcBpd",
  "name" : "name",
  "description" : "Sponsored asset",
  "decimals" : 1,
  "reissuable" : true,
  "quantity" : 1221905614,
  "script" : null,
  "scriptText" : null,
  "complexity" : 0,
  "extraFee": 0,
  "minSponsoredAssetFee" : 100000 // null assume no sponsorship, number - amount of assets for minimal fee
}

GET /assets/{assetId}/distribution

Returns distribution of asset {assetId}.

Method Response:

{
  "3P8GxcTEyZtG6LEfnn9knp9wu8uLKrAFHCb": 1,
  "3P2voHxcJg79csj4YspNq1akepX8TSmGhTE": 1200
}

POST /assets/balance

Returns the assets balance for one or few addresses.

Method Response

{
  "3GLWx8yUFcNSL3DER8kZyE4TpyAyNiEYsKG": [],
  "3GRLFi4rz3SniCuC7rbd9UuD2KUZyNh84pn": []
}