Skip to main content
POST
/
transaction
/
batch
Transaction Info Batch
curl --request POST \
  --url https://xbt-mainnet.gomaestro-api.org/v0/rpc/transaction/batch \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --data '
{
  "tx_ids": [
    "<string>"
  ]
}
'
import requests

url = "https://xbt-mainnet.gomaestro-api.org/v0/rpc/transaction/batch"

payload = { "tx_ids": ["<string>"] }
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({tx_ids: ['<string>']})
};

fetch('https://xbt-mainnet.gomaestro-api.org/v0/rpc/transaction/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://xbt-mainnet.gomaestro-api.org/v0/rpc/transaction/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tx_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://xbt-mainnet.gomaestro-api.org/v0/rpc/transaction/batch"

payload := strings.NewReader("{\n \"tx_ids\": [\n \"<string>\"\n ]\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://xbt-mainnet.gomaestro-api.org/v0/rpc/transaction/batch")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tx_ids\": [\n \"<string>\"\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://xbt-mainnet.gomaestro-api.org/v0/rpc/transaction/batch")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tx_ids\": [\n \"<string>\"\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "data": [
    {
      "blockhash": "<string>",
      "blockheight": 123,
      "blocktime": 123,
      "confirmations": 123,
      "hash": "<string>",
      "hex": "<string>",
      "input_addresses": [
        "<string>"
      ],
      "locktime": 123,
      "output_addresses": [
        "<string>"
      ],
      "size": 123,
      "time": 123,
      "total_fees": 123,
      "total_input_volume": 123,
      "total_output_volume": 123,
      "txid": "<string>",
      "version": 123,
      "vin": [
        {
          "address": "<string>",
          "coinbase": "<string>",
          "scriptSig": {
            "asm": "<string>",
            "hex": "<string>"
          },
          "script_type": "<string>",
          "sequence": 123,
          "txid": "<string>",
          "txinwitness": [
            "<string>"
          ],
          "value": 123,
          "vout": 123
        }
      ],
      "vout": [
        {
          "address": "<string>",
          "n": 123,
          "scriptPubKey": {
            "address": "<string>",
            "asm": "<string>",
            "desc": "<string>",
            "hex": "<string>",
            "type": "<string>"
          },
          "script_type": "<string>",
          "value": 123
        }
      ],
      "vsize": 123,
      "weight": 123
    }
  ],
  "last_updated": {
    "block_hash": "<string>",
    "block_height": 123
  }
}
{
"code": 0,
"node rpc error": "node rpc error"
}
{
"error": "Bad Request"
}

Authorizations

api-key
string
header
required

Project API Key

Query Parameters

verbose
boolean
default:false

Verbose.

Body

application/json

Transaction hash array.

tx_ids
string[]
required
Maximum array length: 50

Response

OK

data
object[]
last_updated
object