On this page

latest contributor to this doc

Last Edit:

@smk762

get_raw_transaction

The get_raw_transaction method takes coin and tx_hash as input, and returns the full signed raw transaction hex for any transaction that is confirmed or within the mempool.

Parameter* = requiredTypeDescription
coin*
string
Ticker of the enabled coin (e.g., "SIA").
tx_hash*
string
Transaction hash string.

Parameter* = requiredTypeDescription
tx_hex*
string
Raw transaction bytes encoded as hex string (for Sia this is JSON-serialized bytes).

POST
get_raw_transaction
{
  "id": 1,
  "method": "get_raw_transaction",
  "mmrpc": "2.0",
  "params": {
    "coin": "DOC",
    "tx_hash": "eb17aa87eececc3c0144432a97b5effa9f2b3e338083bf17fade8f557bf834e5"
  },
  "userpass": "RPC_UserP@SSW0RD"
}

Response (Success)

SUCCESS
{
  "id": 7,
  "mmrpc": "2.0",
  "result": {
    "tx_hex": "7b22736961636f696e496e70757473223a5b5d2c22736961636f696e4f757470757473223a5b5d2c226d696e6572466565223a2231303030303030303030303030303030303030227d"
  }
}

Response (Error (internal))

ERROR
{
  "error": "Internal error: eth:3221] Crypto error (Invalid EC signature)",
  "error_data": "eth:3221] Crypto error (Invalid EC signature)",
  "error_path": "eth",
  "error_trace": "eth:543]",
  "error_type": "InternalError",
  "hint": "Verify the tx_hash and that the coin is enabled and synced. If you need a known-good tx for testing, prefer DOC from test_data.json.",
  "id": 1,
  "mmrpc": "2.0"
}

Response (Error (invalid hash))

ERROR
{
  "error": "Invalid  hash: Invalid input length",
  "error_data": "Invalid input length",
  "error_path": "utxo_common",
  "error_trace": "utxo_common:1809]",
  "error_type": "InvalidHashError",
  "hint": "Provide a valid tx_hash. For testable values, see postman/generated/reports/test_data.json under native-hd.DOC.addresses[...].known_txids, or fetch via my_tx_history.",
  "id": 1,
  "mmrpc": "2.0"
}

Response (Error (no such coin))

ERROR
{
  "error": "No such coin KMD",
  "error_data": {
    "coin": "KMD"
  },
  "error_path": "lp_coins",
  "error_trace": "lp_coins:2234] lp_coins:2156]",
  "error_type": "NoSuchCoin",
  "hint": "If you don't have a known tx_hash, check postman/generated/reports/test_data.json for sample addresses and known_txids (e.g., DOC). You can also use my_tx_history to discover txids for enabled coins.",
  "id": 0,
  "mmrpc": "2.0"
}
POST
get_raw_transaction
{
  "id": 7,
  "method": "get_raw_transaction",
  "mmrpc": "2.0",
  "params": {
    "coin": "SIA",
    "tx_hash": "h:abcdef...1234"
  },
  "userpass": "RPC_UserP@SSW0RD"
}

Response (Success)

SUCCESS
{
  "id": 7,
  "mmrpc": "2.0",
  "result": {
    "tx_hex": "7b22736961636f696e496e70757473223a5b5d2c22736961636f696e4f757470757473223a5b5d2c226d696e6572466565223a2231303030303030303030303030303030303030227d"
  }
}

Response (Error (internal))

ERROR
{
  "error": "Internal error: eth:3221] Crypto error (Invalid EC signature)",
  "error_data": "eth:3221] Crypto error (Invalid EC signature)",
  "error_path": "eth",
  "error_trace": "eth:543]",
  "error_type": "InternalError",
  "hint": "Verify the tx_hash and that the coin is enabled and synced. If you need a known-good tx for testing, prefer DOC from test_data.json.",
  "id": 1,
  "mmrpc": "2.0"
}

Response (Error (invalid hash))

ERROR
{
  "error": "Invalid  hash: Invalid input length",
  "error_data": "Invalid input length",
  "error_path": "utxo_common",
  "error_trace": "utxo_common:1809]",
  "error_type": "InvalidHashError",
  "hint": "Provide a valid tx_hash. For testable values, see postman/generated/reports/test_data.json under native-hd.DOC.addresses[...].known_txids, or fetch via my_tx_history.",
  "id": 1,
  "mmrpc": "2.0"
}

Response (Error (no such coin))

ERROR
{
  "error": "No such coin KMD",
  "error_data": {
    "coin": "KMD"
  },
  "error_path": "lp_coins",
  "error_trace": "lp_coins:2234] lp_coins:2156]",
  "error_type": "NoSuchCoin",
  "hint": "If you don't have a known tx_hash, check postman/generated/reports/test_data.json for sample addresses and known_txids (e.g., DOC). You can also use my_tx_history to discover txids for enabled coins.",
  "id": 0,
  "mmrpc": "2.0"
}
POST
get_raw_transaction
{
  "id": 1,
  "method": "get_raw_transaction",
  "mmrpc": "2.0",
  "params": {
    "coin": "ETH",
    "tx_hash": "0x529aca42b6b592cca5d400832c83854135b924cada6e1c41b85f27fa0a0984b9"
  },
  "userpass": "RPC_UserP@SSW0RD"
}

Response (Success)

SUCCESS
{
  "id": 7,
  "mmrpc": "2.0",
  "result": {
    "tx_hex": "7b22736961636f696e496e70757473223a5b5d2c22736961636f696e4f757470757473223a5b5d2c226d696e6572466565223a2231303030303030303030303030303030303030227d"
  }
}

Response (Error (internal))

ERROR
{
  "error": "Internal error: eth:3221] Crypto error (Invalid EC signature)",
  "error_data": "eth:3221] Crypto error (Invalid EC signature)",
  "error_path": "eth",
  "error_trace": "eth:543]",
  "error_type": "InternalError",
  "hint": "Verify the tx_hash and that the coin is enabled and synced. If you need a known-good tx for testing, prefer DOC from test_data.json.",
  "id": 1,
  "mmrpc": "2.0"
}

Response (Error (invalid hash))

ERROR
{
  "error": "Invalid  hash: Invalid input length",
  "error_data": "Invalid input length",
  "error_path": "utxo_common",
  "error_trace": "utxo_common:1809]",
  "error_type": "InvalidHashError",
  "hint": "Provide a valid tx_hash. For testable values, see postman/generated/reports/test_data.json under native-hd.DOC.addresses[...].known_txids, or fetch via my_tx_history.",
  "id": 1,
  "mmrpc": "2.0"
}

Response (Error (no such coin))

ERROR
{
  "error": "No such coin KMD",
  "error_data": {
    "coin": "KMD"
  },
  "error_path": "lp_coins",
  "error_trace": "lp_coins:2234] lp_coins:2156]",
  "error_type": "NoSuchCoin",
  "hint": "If you don't have a known tx_hash, check postman/generated/reports/test_data.json for sample addresses and known_txids (e.g., DOC). You can also use my_tx_history to discover txids for enabled coins.",
  "id": 0,
  "mmrpc": "2.0"
}

Response (Success)

SUCCESS
{
  "id": 7,
  "mmrpc": "2.0",
  "result": {
    "tx_hex": "7b22736961636f696e496e70757473223a5b5d2c22736961636f696e4f757470757473223a5b5d2c226d696e6572466565223a2231303030303030303030303030303030303030227d"
  }
}

Response (Error (internal))

ERROR
{
  "error": "Internal error: eth:3221] Crypto error (Invalid EC signature)",
  "error_data": "eth:3221] Crypto error (Invalid EC signature)",
  "error_path": "eth",
  "error_trace": "eth:543]",
  "error_type": "InternalError",
  "hint": "Verify the tx_hash and that the coin is enabled and synced. If you need a known-good tx for testing, prefer DOC from test_data.json.",
  "id": 1,
  "mmrpc": "2.0"
}

Response (Error (invalid hash))

ERROR
{
  "error": "Invalid  hash: Invalid input length",
  "error_data": "Invalid input length",
  "error_path": "utxo_common",
  "error_trace": "utxo_common:1809]",
  "error_type": "InvalidHashError",
  "hint": "Provide a valid tx_hash. For testable values, see postman/generated/reports/test_data.json under native-hd.DOC.addresses[...].known_txids, or fetch via my_tx_history.",
  "id": 1,
  "mmrpc": "2.0"
}

Response (Error (no such coin))

ERROR
{
  "error": "No such coin KMD",
  "error_data": {
    "coin": "KMD"
  },
  "error_path": "lp_coins",
  "error_trace": "lp_coins:2234] lp_coins:2156]",
  "error_type": "NoSuchCoin",
  "hint": "If you don't have a known tx_hash, check postman/generated/reports/test_data.json for sample addresses and known_txids (e.g., DOC). You can also use my_tx_history to discover txids for enabled coins.",
  "id": 0,
  "mmrpc": "2.0"
}

Parameter* = requiredTypeDescription
InvalidHashError|HashNotExist|InvalidParam|DecodeError
string
Optional. Invalid hash, not found, or invalid params.
NoSuchCoin
string
Optional. No such coin is enabled.
NotImplemented
string
Optional. Not implemented for this coin.
Transport|InternalError|TransactionError
string
Optional. Transport or internal error.