{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/hitbtc/main/json-schema/hitbtc-wallet-transaction-schema.json",
  "title": "wallet_Transaction",
  "x-generated": "2026-10-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hitbtc-v2-openapi.yml#/components/schemas/wallet_Transaction",
  "allOf": [
    {
      "required": [
        "id",
        "index",
        "type",
        "status",
        "currency",
        "amount",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Transaction identifier."
        },
        "index": {
          "type": "integer",
          "format": "uint64",
          "description": "Last update sequence identifier."
        },
        "type": {
          "type": "string",
          "description": "Transaction type.",
          "enum": [
            "DEPOSIT",
            "WITHDRAW",
            "TRANSFER",
            "SWAP",
            "OTC",
            "PRIMETRUST_DEPOSIT",
            "PRIMETRUST_WITHDRAWAL",
            "PRIMETRUST_TRANSFER"
          ]
        },
        "subType": {
          "type": "string",
          "description": "Transaction subtype.",
          "enum": [
            "UNCLASSIFIED",
            "BLOCKCHAIN",
            "AIRDROP",
            "AFFILIATE",
            "STAKING",
            "BUY_CRYPTO",
            "OFFCHAIN",
            "FIAT",
            "SUB_ACCOUNT",
            "WALLET_TO_SPOT",
            "SPOT_TO_WALLET",
            "WALLET_TO_DERIVATIVES",
            "DERIVATIVES_TO_WALLET",
            "CHAIN_SWITCH_FROM",
            "CHAIN_SWITCH_TO",
            "INSTANT_EXCHANGE"
          ]
        },
        "status": {
          "type": "string",
          "description": "Transaction status."
        },
        "currency": {
          "type": "string",
          "description": "Currency code."
        },
        "amount": {
          "type": "string",
          "description": "Amount of funds."
        },
        "fee": {
          "type": "string",
          "description": "Payment commission value."
        },
        "createdAt": {
          "type": "string",
          "description": "Date and time of the transaction creation."
        },
        "updatedAt": {
          "type": "string",
          "description": "Date and time of the last transaction update."
        },
        "hash": {
          "type": "string",
          "description": "Transaction blockchain hash."
        },
        "attemptHashes": {
          "type": "array",
          "description": "List of hashes of attempts to send a transaction to the blockchain.",
          "items": {
            "type": "string"
          }
        },
        "address": {
          "type": "string",
          "description": "Address used by both blockchain and off-chain payouts."
        },
        "paymentId": {
          "type": "string",
          "description": "Payment identifier used by both blockchain and off-chain payouts."
        },
        "offchainId": {
          "type": "string",
          "description": "Transaction identifier of an external system."
        },
        "confirmations": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Current count of confirmations for transaction."
        },
        "publicComment": {
          "type": "string",
          "description": "A text comment for the transaction."
        },
        "errorCode": {
          "type": "string",
          "enum": [
            "INVALID_ADDRESS",
            "INVALID_PAYMENT_ID",
            "BAD_PRECISION"
          ],
          "description": "Error reason."
        },
        "senders": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of senders' blockchain addresses."
        },
        "commitRisk": {
          "type": "object",
          "required": [
            "score",
            "rbf",
            "lowFee"
          ],
          "properties": {
            "score": {
              "type": [
                "integer",
                "null"
              ],
              "format": "uint64",
              "minimum": 0,
              "maximum": 100,
              "description": "Risk score that decreases non-linearly when the transaction gains confirmations.\n\nℹ️ Scores from 0 to 50 imply the transaction may be considered committed (but it is not guaranteed) or it may take at least half an hour otherwise.\n"
            },
            "rbf": {
              "type": [
                "boolean",
                "null"
              ],
              "description": "Flag indicating whether the transaction did not gain a sufficient number of confirmations and may be replaced by another one with different fees.\n\n⚠️ This value indicates the transaction is complete and do not affect the score.\n\nℹ️ `false` value along with a score above 50 gives a good chance that the transaction is irreversible.\n"
            },
            "lowFee": {
              "type": [
                "boolean",
                "null"
              ],
              "description": "Flag indicating whether the actual network fee is lower than the estimated one.\n\n⚠️ This value indicates the difference between the estimated fee and the actual paid fee and does not affect the score.\n"
            }
          }
        }
      }
    }
  ]
}