Skip to main content
Sending XFG and querying your transaction history are the most frequently used wallet operations. The sendTransaction method handles the complete construction, signing, and broadcast of a transaction in one call. History methods return transactions grouped by the block they appear in, optionally filtered by address or payment ID. All calls go to POST http://127.0.0.1:8070/json_rpc.
The minimum transaction fee is 0.008 XFG = 80,000 atomic units. Transactions submitted with a lower fee will be rejected by the network. Use the default value when possible — the wallet uses this minimum by default if you omit the fee parameter.

sendTransaction

Constructs, signs, and broadcasts a transaction from one or more source addresses to one or more recipients. The wallet selects inputs, calculates change, and handles ring signature generation automatically.

Request

params.sourceAddresses
array of strings
List of addresses within the wallet to draw funds from. If omitted, the wallet uses all available addresses.
params.transfers
array of objects
required
One or more recipients. Each object has:
  • address (string, required) — destination Fuego address
  • amount (integer, required) — amount to send in atomic units
  • message (string) — optional encrypted message to include with the transfer
params.changeAddress
string
required
Address within the wallet where change outputs are sent. Must be one of the addresses managed by the wallet.
params.fee
integer
Transaction fee in atomic units. Defaults to 80000 (0.008 XFG). Must not be lower than the minimum.
params.anonymity
integer
Ring size (number of decoy inputs per real input). Defaults to 4. Minimum is 2 (MINIMUM_MIXIN = 2). Higher values improve privacy but increase transaction size and fee.
params.paymentId
string
Optional 64-character hex payment ID to embed in the transaction. Use this for merchant reconciliation. Mutually exclusive with encoding a payment ID in an integrated address.
params.extra
string
Optional raw hex extra data to include in the transaction’s extra field.
params.unlockTime
integer
Block height at which the outputs become spendable by the recipient. Defaults to 0 (immediately spendable). Use this to create time-locked outputs.
curl -s http://127.0.0.1:8070/json_rpc \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc": "2.0",
    "method": "sendTransaction",
    "params": {
      "transfers": [
        {
          "address": "fireXfGRecipientAddress...",
          "amount": 100000000
        }
      ],
      "changeAddress": "fireXfGMyAddress...",
      "fee": 80000,
      "anonymity": 4,
      "paymentId": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2"
    },
    "id": "1"
  }'

Response

{
  "jsonrpc": "2.0",
  "id": "1",
  "result": {
    "transactionHash": "c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
    "transactionSecretKey": "d4e5f6a7b8c9..."
  }
}
transactionHash
string
required
Hex-encoded hash of the submitted transaction. Use this to track confirmation status.
transactionSecretKey
string
required
The one-time secret key for this transaction. Keep this if you need to generate transaction proofs later.

getTransactions

Returns full transaction details grouped by block. Filter by address, payment ID, or block range. You must provide either blockHash (start from a specific block hash) or firstBlockIndex (start from a block index) — not both.

Request

params.addresses
array of strings
Filter to transactions involving only these addresses. Omit to include all addresses in the wallet.
params.blockHash
string
Hash of the block to start scanning from. Mutually exclusive with firstBlockIndex.
params.firstBlockIndex
integer
Block index to start scanning from (inclusive). Mutually exclusive with blockHash.
params.blockCount
integer
required
Number of blocks to scan forward from the starting point.
params.paymentId
string
If provided, only return transactions that include this payment ID.
curl -s http://127.0.0.1:8070/json_rpc \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc": "2.0",
    "method": "getTransactions",
    "params": {
      "firstBlockIndex": 890000,
      "blockCount": 1000
    },
    "id": "1"
  }'

Response

{
  "jsonrpc": "2.0",
  "id": "1",
  "result": {
    "items": [
      {
        "blockHash": "a1b2c3d4...",
        "transactions": [
          {
            "state": 0,
            "transactionHash": "c3d4e5f6...",
            "blockIndex": 890001,
            "timestamp": 1712345678,
            "confirmations": 9999,
            "isBase": false,
            "unlockTime": 0,
            "amount": 100000000,
            "fee": 80000,
            "transfers": [
              {
                "type": 0,
                "address": "fireXfGRecipientAddress...",
                "amount": 100000000,
                "message": ""
              }
            ],
            "extra": "",
            "paymentId": "a1b2c3d4...",
            "firstDepositId": 18446744073709551615,
            "depositCount": 0
          }
        ]
      }
    ]
  }
}
items
array of objects
required
One entry per block that contained relevant transactions.

getTransactionHashes

Returns only transaction hashes (not full details) grouped by block. Useful for lightweight scanning when you only need to know which transactions occurred, not their full content.

Request

Parameters are identical to getTransactions: addresses, blockHash or firstBlockIndex, blockCount, and paymentId.
curl -s http://127.0.0.1:8070/json_rpc \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc": "2.0",
    "method": "getTransactionHashes",
    "params": {
      "firstBlockIndex": 890000,
      "blockCount": 100,
      "paymentId": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2"
    },
    "id": "1"
  }'

Response

{
  "jsonrpc": "2.0",
  "id": "1",
  "result": {
    "items": [
      {
        "blockHash": "a1b2c3d4...",
        "transactionHashes": [
          "c3d4e5f6...",
          "d4e5f6a7..."
        ]
      }
    ]
  }
}
items
array of objects
required
One entry per block containing matching transactions.

getBlockHashes

Returns a sequential list of block hashes starting from a given index. Useful for building a local cache of the chain or verifying continuity.

Request

params.firstBlockIndex
integer
required
The block index to start from (inclusive).
params.blockCount
integer
required
Number of block hashes to return.
curl -s http://127.0.0.1:8070/json_rpc \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc": "2.0",
    "method": "getBlockHashes",
    "params": {
      "firstBlockIndex": 900000,
      "blockCount": 10
    },
    "id": "1"
  }'

Response

{
  "jsonrpc": "2.0",
  "id": "1",
  "result": {
    "blockHashes": [
      "a1b2c3d4...",
      "b2c3d4e5...",
      "c3d4e5f6..."
    ]
  }
}
blockHashes
array of strings
required
Block hashes in ascending height order, starting from firstBlockIndex.