Polkadot
Get Transaction Status
Check the status of the transaction.
GET
/
api
/
v1
/
polkadot
/
{network}
/
tx
/
status
/
{blockHash}
/
{transactionHash}
Get Transaction Status
curl --request GET \
--url https://api.p2p.org/api/api/v1/polkadot/{network}/tx/status/{blockHash}/{transactionHash} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.p2p.org/api/api/v1/polkadot/{network}/tx/status/{blockHash}/{transactionHash}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.p2p.org/api/api/v1/polkadot/{network}/tx/status/{blockHash}/{transactionHash}', 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://api.p2p.org/api/api/v1/polkadot/{network}/tx/status/{blockHash}/{transactionHash}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.p2p.org/api/api/v1/polkadot/{network}/tx/status/{blockHash}/{transactionHash}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.p2p.org/api/api/v1/polkadot/{network}/tx/status/{blockHash}/{transactionHash}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.p2p.org/api/api/v1/polkadot/{network}/tx/status/{blockHash}/{transactionHash}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"error": null,
"result": {
"network": "westend",
"signedTransaction": "0xbd018400cc7cb7325ad1208212e2d8ee41a7572e816d53ac1bcac1be5df433486819213c011a6fc75a4d779e13a789ce9fe03d5cbb090b1e9833ae38c2c873571b73e2d7393f30bf097d93ca1692d426196f263d609e4d421cef3e017ad8bd388604e47e839502a80006010700e40b5402",
"status": "success",
"blockHash": "0x0628743b05ffb4c9d5ea2144b359af38910f0ae439a685f57d85b50b9481ba3f",
"blockId": "17168395",
"extrinsicId": "17177570-2",
"transactionHash": "0xbd018400cc7cb7325ad1208212e2d8ee41a7572e816d53ac1bcac1be5df433486819213c011a6fc75a4d779e13a789ce9fe03d5cbb090b1e9833ae38c2c873571b73e2d7393f30bf097d93ca1692d426196f263d609e4d421cef3e017ad8bd388604e47e839502a80006010700e40b5402",
"signerAccount": "5H6ryBWChC5w7eaQ4GZjo329sEnhvjetSr6MBEt42mZ5tPw5",
"data": "<string>",
"createdAt": "2023-08-24T08:14:50.455Z"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Polkadot network:
- `mainnet` — Polkadot mainnet.
- `kusama` — Kusama mainnet.
- `westend` — Polkadot testnet.
Available options:
mainnet, kusama, westend Block hash in which the transaction was included.
Extrinsic transaction hash.
Get Transaction Status
curl --request GET \
--url https://api.p2p.org/api/api/v1/polkadot/{network}/tx/status/{blockHash}/{transactionHash} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.p2p.org/api/api/v1/polkadot/{network}/tx/status/{blockHash}/{transactionHash}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.p2p.org/api/api/v1/polkadot/{network}/tx/status/{blockHash}/{transactionHash}', 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://api.p2p.org/api/api/v1/polkadot/{network}/tx/status/{blockHash}/{transactionHash}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.p2p.org/api/api/v1/polkadot/{network}/tx/status/{blockHash}/{transactionHash}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.p2p.org/api/api/v1/polkadot/{network}/tx/status/{blockHash}/{transactionHash}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.p2p.org/api/api/v1/polkadot/{network}/tx/status/{blockHash}/{transactionHash}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"error": null,
"result": {
"network": "westend",
"signedTransaction": "0xbd018400cc7cb7325ad1208212e2d8ee41a7572e816d53ac1bcac1be5df433486819213c011a6fc75a4d779e13a789ce9fe03d5cbb090b1e9833ae38c2c873571b73e2d7393f30bf097d93ca1692d426196f263d609e4d421cef3e017ad8bd388604e47e839502a80006010700e40b5402",
"status": "success",
"blockHash": "0x0628743b05ffb4c9d5ea2144b359af38910f0ae439a685f57d85b50b9481ba3f",
"blockId": "17168395",
"extrinsicId": "17177570-2",
"transactionHash": "0xbd018400cc7cb7325ad1208212e2d8ee41a7572e816d53ac1bcac1be5df433486819213c011a6fc75a4d779e13a789ce9fe03d5cbb090b1e9833ae38c2c873571b73e2d7393f30bf097d93ca1692d426196f263d609e4d421cef3e017ad8bd388604e47e839502a80006010700e40b5402",
"signerAccount": "5H6ryBWChC5w7eaQ4GZjo329sEnhvjetSr6MBEt42mZ5tPw5",
"data": "<string>",
"createdAt": "2023-08-24T08:14:50.455Z"
}
}