<p>Use the getConstants API and check the "transactionSubTypes" JSON array for a mapping of transaction types and sub types to their display name.</p>

<pre><code>"transactionSubTypes": {
    "AssetIssuance": {
        "isPhasable": true,
        "subtype": 0,
        "mustHaveRecipient": false,
        "name": "AssetIssuance",
        "canHaveRecipient": false,
        "isGlobal": true,
        "type": 2,
        "isPhasingSafe": true
</code></pre>

CC BY-SA 4.0
2018-07-12T02:15:44.253Z
here is also a list to look up: https://github.com/mrv777/Ardor/blob/master/html/www/js/nrs.transactions.types.js
Patoshi パトシ
CC BY-SA 4.0
2018-07-11T21:40:56.993Z
2018-07-11T21:40:56.993Z
lyaffe
<p>This is the switch case I used to figure out what each $type is for:</p>

<pre><code>    switch($type) {
      case "-4":
        $type = "Coin Exchange";
        break;
      case "-3":
        $type = "Account Control";
        break;
      case "-2":
        $type = "Payment";
        break;
      case "-1":
        $type = "Child Chain Block";
        break;
      case "0":
        $type = "Payment";
        break;
      case "1":
        $type = "Messaging";
        break;
      case "2":
        $type = "Asset Exchange";
        break;
      case "3":
        $type = "Marketplace";
        break;
      case "4":
        $type = "Account Control";
        break;
      case "5":
        $type = "Monetary System";
        break;
      case "6":
        $type = "Data Cloud";
        break;
      case "7":
        $type = "Suffling";
        break;
      case "8":
        $type = "Aliases";
        break;
      case "9":
        $type = "Voting";
        break;
      case "10":
        $type = "Account Properties";
        break;
      case "11":
        $type = "Coin Exchange";
        break;
      default  :
        $type = "Unknown Type";
     }
</code></pre>

<p><a href="https://i.sstatic.net/4hryr.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/4hryr.png" alt="enter image description here"></a></p>

CC BY-SA 4.0
2018-07-13T06:44:23.750Z
This is correct for now but we will probably add new transaction types and subtypes in the future so a better design would be to iterate over the types returned by getConstants and create a hash table or several hash tables depending on your design. You can see how this is implemented in the wallet in nrs.transaction.types.js NRS.loadTransactionTypeConstants() function
lyaffe
CC BY-SA 4.0
2018-07-12T20:55:17.370Z
2018-07-12T20:55:17.370Z
Patoshi パトシ
<p>In the Ardor platform, there are different types of transactions. What do each number type represent? Some are asset transfers, send transaction, and voting. Where can I find a list of these types of transactions? </p>

<p><a href="https://i.sstatic.net/ZnThf.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ZnThf.png" alt="enter image description here"></a></p>

<ardor><ignis>
In the Ardor platform, what are all the different "types" and "subtypes" in a transaction?
Patoshi パトシ
# In the Ardor platform, what are all the different "types" and "subtypes" in a transaction?

(Asked by: username_0 on 2018-07-11)

In the Ardor platform, there are different types of transactions. What do each number type represent? Some are asset transfers, send transaction, and voting. Where can I find a list of these types of transactions?

[![enter image description here](https://i.sstatic.net/ZnThf.png)](https://i.sstatic.net/ZnThf.png)

**Tags:** ardor, ignis


---

## 2 answers

### Answer by username_1 on 2018-07-11. Score: 2 | Accepted answer

Use the getConstants API and check the "transactionSubTypes" JSON array for a mapping of transaction types and sub types to their display name.
"transactionSubTypes": {
    "AssetIssuance": {
        "isPhasable": true,
        "subtype": 0,
        "mustHaveRecipient": false,
        "name": "AssetIssuance",
        "canHaveRecipient": false,
        "isGlobal": true,
        "type": 2,
        "isPhasingSafe": true

> **Comments:**
> **username_0**: here is also a list to look up: https://github.com/mrv777/Ardor/blob/master/html/www/js/nrs.transactions.types.js  

---

### Answer by username_0 on 2018-07-12. Score: 0

This is the switch case I used to figure out what each $type is for:
    switch($type) {
      case "-4":
        $type = "Coin Exchange";
        break;
      case "-3":
        $type = "Account Control";
        break;
      case "-2":
        $type = "Payment";
        break;
      case "-1":
        $type = "Child Chain Block";
        break;
      case "0":
        $type = "Payment";
        break;
      case "1":
        $type = "Messaging";
        break;
      case "2":
        $type = "Asset Exchange";
        break;
      case "3":
        $type = "Marketplace";
        break;
      case "4":
        $type = "Account Control";
        break;
      case "5":
        $type = "Monetary System";
        break;
      case "6":
        $type = "Data Cloud";
        break;
      case "7":
        $type = "Suffling";
        break;
      case "8":
        $type = "Aliases";
        break;
      case "9":
        $type = "Voting";
        break;
      case "10":
        $type = "Account Properties";
        break;
      case "11":
        $type = "Coin Exchange";
        break;
      default  :
        $type = "Unknown Type";
     }

> **Comments:**
> **username_1**: This is correct for now but we will probably add new transaction types and subtypes in the future so a better design would be to iterate over the types returned by getConstants and create a hash table or several hash tables depending on your design. You can see how this is implemented in the wallet in nrs.transaction.types.js NRS.loadTransactionTypeConstants() function  

---

