{
  "openrpc": "1.0.0-rc1",
  "info": {
    "title": "Monero OpenRPC Specification",
    "version": "0.3.0",
    "description": "Machine-readable JSON-RPC interface description for the Monero daemon and wallet RPC, produced for the bounties.monero.social 'Monero OpenRPC Specification' bounty (#104). Covers the most-used methods with parameter/result schemas and examples. Amounts are atomic units (piconero); 1 XMR = 10^12 piconero. Mainnet by default.",
    "license": { "name": "MIT" },
    "contact": {
      "name": "Clara Oswald (XMR Income Engine)",
      "url": "https://x0.at/6XWB.html"
    }
  },
  "servers": [
    { "name": "monero-daemon-mainnet", "url": "http://localhost:18081/json_rpc", "description": "monerod JSON-RPC" },
    { "name": "monero-wallet-mainnet", "url": "http://localhost:28083/json_rpc", "description": "monero-wallet-rpc JSON-RPC" }
  ],
  "methods": [
    {
      "name": "get_height",
      "summary": "Returns the current blockchain height (daemon).",
      "params": [],
      "result": { "name": "height", "schema": { "type": "integer", "minimum": 0 } },
      "examples": [ { "name": "get_height", "params": [], "result": { "height": 3750116 } } ]
    },
    {
      "name": "get_info",
      "summary": "Network and daemon sync state.",
      "params": [],
      "result": {
        "name": "info",
        "schema": {
          "type": "object",
          "properties": {
            "height": { "type": "integer" },
            "target_height": { "type": "integer" },
            "difficulty": { "type": "integer" },
            "tx_count": { "type": "integer" },
            "tx_pool_size": { "type": "integer" },
            "incoming_connections_count": { "type": "integer" },
            "outgoing_connections_count": { "type": "integer" },
            "top_block_hash": { "type": "string" },
            "nettype": { "type": "string", "enum": ["mainnet", "testnet", "stagenet"] },
            "timestamp_utc": { "type": "integer" }
          }
        }
      },
      "examples": [ { "name": "get_info", "params": [], "result": { "height": 3750116, "nettype": "mainnet" } } ]
    },
    {
      "name": "get_block",
      "summary": "Fetch a block by height or hash.",
      "params": [
        { "name": "height", "description": "Block height.", "required": false, "schema": { "type": "integer", "minimum": 0 } },
        { "name": "hash", "description": "Block hash.", "required": false, "schema": { "type": "string" } }
      ],
      "result": {
        "name": "block",
        "schema": {
          "type": "object",
          "properties": {
            "blob": { "type": "string" },
            "miner_tx_hash": { "type": "string" },
            "block_header": { "type": "object" },
            "json": { "type": "object" }
          }
        }
      },
      "examples": [ { "name": "get_block_by_height", "params": [ { "height": 1 } ], "result": { "blob": "0102...", "block_header": { "height": 1 } } } ]
    },
    {
      "name": "get_transactions",
      "summary": "Fetch one or more transactions by hash.",
      "params": [
        { "name": "txs_hashes", "description": "List of transaction hashes.", "required": true, "schema": { "type": "array", "items": { "type": "string" } } },
        { "name": "decode_as_json", "description": "Return decoded JSON in addition to hex.", "required": false, "schema": { "type": "boolean" } }
      ],
      "result": {
        "name": "txs",
        "schema": {
          "type": "object",
          "properties": {
            "txs_as_hex": { "type": "array", "items": { "type": "string" } },
            "txs_as_json": { "type": "array", "items": { "type": "string" } },
            "missed_tx": { "type": "array", "items": { "type": "string" } }
          }
        }
      },
      "examples": [ { "name": "get_tx", "params": [ { "txs_hashes": ["d6e9..."], "decode_as_json": true } ], "result": { "txs_as_hex": ["0200..."] } } ]
    },
    {
      "name": "send_raw_transaction",
      "summary": "Submit a raw, already-signed transaction hex to the network.",
      "params": [ { "name": "tx_as_hex", "description": "Hex-encoded signed transaction.", "required": true, "schema": { "type": "string" } } ],
      "result": {
        "name": "status",
        "schema": {
          "type": "object",
          "properties": {
            "status": { "type": "string" },
            "double_spend": { "type": ["boolean", "null"] },
            "fee_too_low": { "type": ["boolean", "null"] },
            "not_relayed": { "type": ["boolean", "null"] },
            "reason": { "type": ["string", "null"] },
            "credits": { "type": ["integer", "null"] }
          }
        }
      },
      "examples": [ { "name": "send_raw", "params": [ { "tx_as_hex": "0200..." } ], "result": { "status": "OK" } } ]
    },
    {
      "name": "get_balance",
      "summary": "Wallet: total spendable + unspent balance for an account.",
      "params": [
        { "name": "account_index", "description": "Account index (default 0).", "required": false, "schema": { "type": "integer", "minimum": 0 } },
        { "name": "address_indices", "description": "Subaddress indices to break down.", "required": false, "schema": { "type": "array", "items": { "type": "integer" } } }
      ],
      "result": {
        "name": "balance",
        "schema": {
          "type": "object",
          "properties": {
            "balance": { "type": "integer", "description": "Atomic units (piconero). 1 XMR = 1e12." },
            "unlocked_balance": { "type": "integer" },
            "multisig_import_needed": { "type": "boolean" },
            "per_subaddress": { "type": "array", "items": { "type": "object" } }
          }
        }
      },
      "examples": [ { "name": "get_balance", "params": [ { "account_index": 0 } ], "result": { "balance": 1000000000000, "unlocked_balance": 1000000000000 } } ]
    },
    {
      "name": "get_address",
      "summary": "Wallet: primary address (or list of subaddresses) for an account.",
      "params": [
        { "name": "account_index", "required": false, "schema": { "type": "integer", "minimum": 0 } },
        { "name": "address_index", "description": "Subaddress indices to return.", "required": false, "schema": { "type": "array", "items": { "type": "integer" } } }
      ],
      "result": {
        "name": "address",
        "schema": {
          "type": "object",
          "properties": {
            "address": { "type": "string" },
            "addresses": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "address": { "type": "string" },
                  "label": { "type": "string" },
                  "index": { "type": "integer" }
                }
              }
            }
          }
        }
      },
      "examples": [ { "name": "get_address", "params": [ { "account_index": 0 } ], "result": { "address": "45bov..." } } ]
    },
    {
      "name": "create_address",
      "summary": "Wallet: generate a new subaddress in an account.",
      "params": [
        { "name": "account_index", "required": true, "schema": { "type": "integer", "minimum": 0 } },
        { "name": "label", "required": false, "schema": { "type": "string" } }
      ],
      "result": {
        "name": "address",
        "schema": {
          "type": "object",
          "properties": {
            "address": { "type": "string" },
            "address_index": { "type": "integer" }
          }
        }
      },
      "examples": [ { "name": "create_address", "params": [ { "account_index": 0, "label": "customer-7" } ], "result": { "address": "8A...", "address_index": 7 } } ]
    },
    {
      "name": "make_integrated_address",
      "summary": "Wallet: build an integrated address from a payment ID + optional standard address.",
      "params": [
        { "name": "payment_id", "description": "16-char (64 hex) or 8-char short payment id.", "required": false, "schema": { "type": "string" } },
        { "name": "standard_address", "description": "Base address; defaults to the wallet's primary.", "required": false, "schema": { "type": "string" } }
      ],
      "result": {
        "name": "integrated",
        "schema": {
          "type": "object",
          "properties": {
            "integrated_address": { "type": "string" },
            "payment_id": { "type": "string" }
          }
        }
      },
      "examples": [ { "name": "make_integrated", "params": [ { "payment_id": "0123456789abcdef" } ], "result": { "integrated_address": "4B...", "payment_id": "0123456789abcdef" } } ]
    },
    {
      "name": "transfer",
      "summary": "Wallet: send XMR to one or more destinations (default ring size applied).",
      "params": [
        { "name": "destinations", "required": true, "schema": { "type": "array", "items": { "type": "object", "properties": { "amount": { "type": "integer", "description": "Atomic units (piconero)." }, "address": { "type": "string" } }, "required": ["amount", "address"] } } },
        { "name": "account_index", "required": false, "schema": { "type": "integer", "minimum": 0 } },
        { "name": "subaddr_indices", "required": false, "schema": { "type": "array", "items": { "type": "integer" } } },
        { "name": "priority", "required": false, "schema": { "type": "string", "enum": ["default", "unimportant", "normal", "elevated", "priority"] } },
        { "name": "unlock_time", "required": false, "schema": { "type": "integer" } },
        { "name": "payment_id", "required": false, "schema": { "type": "string" } }
      ],
      "result": {
        "name": "result",
        "schema": {
          "type": "object",
          "properties": {
            "tx_hash": { "type": "string" },
            "tx_key": { "type": "string" },
            "amount": { "type": "integer" },
            "fee": { "type": "integer" },
            "tx_blob": { "type": "string" }
          }
        }
      },
      "examples": [ { "name": "transfer", "params": [ { "destinations": [ { "amount": 1000000000000, "address": "45bov..." } ] } ], "result": { "tx_hash": "d6e9...", "fee": 0 } } ]
    },
    {
      "name": "transfer_split",
      "summary": "Wallet: same as transfer but returns a list (one tx per destination when needed).",
      "params": [
        { "name": "destinations", "required": true, "schema": { "type": "array", "items": { "type": "object", "properties": { "amount": { "type": "integer" }, "address": { "type": "string" } }, "required": ["amount", "address"] } } },
        { "name": "account_index", "required": false, "schema": { "type": "integer", "minimum": 0 } },
        { "name": "priority", "required": false, "schema": { "type": "string", "enum": ["default", "unimportant", "normal", "elevated", "priority"] } }
      ],
      "result": {
        "name": "result",
        "schema": {
          "type": "object",
          "properties": {
            "tx_hash_list": { "type": "array", "items": { "type": "string" } },
            "amount_list": { "type": "array", "items": { "type": "integer" } },
            "fee_list": { "type": "array", "items": { "type": "integer" } }
          }
        }
      },
      "examples": [ { "name": "transfer_split", "params": [ { "destinations": [ { "amount": 1000000, "address": "45bov..." } ] } ], "result": { "tx_hash_list": ["d6e9..."] } } ]
    },
    {
      "name": "get_transfers",
      "summary": "Wallet: list incoming/outgoing/pending transfers, optionally filtered.",
      "params": [
        { "name": "in", "required": false, "schema": { "type": "boolean" } },
        { "name": "out", "required": false, "schema": { "type": "boolean" } },
        { "name": "pending", "required": false, "schema": { "type": "boolean" } },
        { "name": "failed", "required": false, "schema": { "type": "boolean" } },
        { "name": "account_index", "required": false, "schema": { "type": "integer", "minimum": 0 } },
        { "name": "subaddr_indices", "required": false, "schema": { "type": "array", "items": { "type": "integer" } } }
      ],
      "result": {
        "name": "transfers",
        "schema": {
          "type": "object",
          "properties": {
            "in": { "type": "array", "items": { "type": "object" } },
            "out": { "type": "array", "items": { "type": "object" } },
            "pending": { "type": "array", "items": { "type": "object" } }
          }
        }
      },
      "examples": [ { "name": "get_transfers", "params": [ { "in": true, "out": true } ], "result": { "in": [ { "amount": 1000000000000, "height": 3750116 } ] } } ]
    },
    {
      "name": "get_payments",
      "summary": "Wallet: list incoming payments matching a payment ID (for integrated-address reconciliation).",
      "params": [ { "name": "payment_id", "required": true, "schema": { "type": "string" } } ],
      "result": {
        "name": "payments",
        "schema": {
          "type": "object",
          "properties": {
            "payments": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "amount": { "type": "integer" },
                  "block_height": { "type": "integer" },
                  "tx_hash": { "type": "string" },
                  "unlock_time": { "type": "integer" }
                }
              }
            }
          }
        }
      },
      "examples": [ { "name": "get_payments", "params": [ { "payment_id": "0123456789abcdef" } ], "result": { "payments": [ { "amount": 1000000000000, "tx_hash": "d6e9..." } ] } } ]
    },
    {
      "name": "open_wallet",
      "summary": "Wallet RPC: open a wallet file by name + password.",
      "params": [
        { "name": "filename", "required": true, "schema": { "type": "string" } },
        { "name": "password", "required": true, "schema": { "type": "string" } }
      ],
      "result": { "name": "result", "schema": { "type": "object" } },
      "examples": [ { "name": "open_wallet", "params": [ { "filename": "primary", "password": "********" } ], "result": {} } ]
    }
  ],
  "components": {
    "schemas": {
      "MoneroAddress": { "type": "string", "pattern": "^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{95,106}$", "description": "Standard (95c), subaddress (95c), or integrated (106c) Monero address." },
      "AtomicAmount": { "type": "integer", "minimum": 0, "description": "piconero (1e-12 XMR)" },
      "PaymentId": { "type": "string", "description": "8 or 16 hex chars (short or full payment id)." }
    },
    "errors": [
      { "code": -32601, "message": "Method not found" },
      { "code": -32602, "message": "Invalid params" },
      { "code": -32603, "message": "Internal error" },
      { "code": -32000, "message": "Monero RPC error (e.g. not enough money, wrong password, node not synced) — see 'error' field in response" }
    ]
  }
}
