qan_getTransactionByHash

get

https://rpc-testnet.qanplatform.com/getTransactionByHash/{hash}/

API details

Returns the information about a transaction from a transaction hash.

Parameters for "qan_getTransactionByHash"

Path parameters
hashstringRequired

The hash of a transaction

Examples:0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060

HTTP response status codes for "qan_getTransactionByHash"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_getTransactionByHash"

Request examples

get

https://rpc-testnet.qanplatform.com/getTransactionByHash/{hash}/

cURLJavaScriptGoPythonJava
curl --request GET \
  --url https://rpc-testnet.qanplatform.com/getTransactionByHash/{hash}/ \
  --header 'Accept: application/json, application/problem+json'
const options = {method: 'GET', headers: {Accept: 'application/json, application/problem+json'}};

fetch('https://rpc-testnet.qanplatform.com/getTransactionByHash/{hash}/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

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

func main() {

  url := "https://rpc-testnet.qanplatform.com/getTransactionByHash/{hash}/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, application/problem+json")

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

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

  fmt.Println(string(body))

}
import requests

url = "https://rpc-testnet.qanplatform.com/getTransactionByHash/{hash}/"

headers = {"Accept": "application/json, application/problem+json"}

response = requests.get(url, headers=headers)

print(response.text)
HttpResponse<String> response = Unirest.get("https://rpc-testnet.qanplatform.com/getTransactionByHash/{hash}/")
  .header("Accept", "application/json, application/problem+json")
  .asString();

Responses

200400404422500

Description: OK

Content type: application/json

Example

{
  "$schema": "https://rpc-testnet.qanplatform.com/schemas/Output_getTransactionByHash.json",
  "Transaction": {}
}

Body

$schemastring<uri>

A URL to the JSON Schema for this object.

Example:https://rpc-testnet.qanplatform.com/schemas/Output_getTransactionByHash.json

TransactionobjectRequired

The transaction response object, or null if no transaction is found

AccessListstring

A list of addresses and storage keys that the transaction plans to access

BlockHashstring

The hash of the block where this transaction was in. Null when it's a pending transaction

BlockNumberstring

The block number where this transaction was in. Null when it's a pending transaction

ChainIdstring

The chain id of the transaction, if any

Fromstring

The address of the sender

Gasstring

The gas provided by the sender, encoded as decimal

GasPricestring

The gas price provided by the sender in wei encoded as decimal

Hashstring

The hash of the transaction

Inputstring

The data sent along with the transaction

MaxFeePerGasstring

The maximum fee per gas set in the transaction

MaxPriorityFeePerGasstring

The maximum priority gas fee set in the transaction

Noncestring

The number of transactions made by the sender prior to this one encoded as decimal

Rstring

The R field of the signature

Sstring

The S field of the signature

Tostring

The address of the receiver. Null when its a contract creation transaction

TransactionIndexstring

The integer of the transaction's index position that the log was created from. Null when it's a pending log

Typestring

The transaction type

Vstring

The standardized V field of the signature

Valuestring

The value transferred in wei encoded as decimal

Description: Bad Request

Content type: application/problem+json

Example

{
  "$schema": "https://rpc-testnet.qanplatform.com/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Body

$schemastring<uri>

A URL to the JSON Schema for this object.

Example:https://rpc-testnet.qanplatform.com/schemas/ErrorModel.json

detailstring

A human-readable explanation specific to this occurrence of the problem.

Example:Property foo is required but is missing.

errorsarray[object]

Optional list of individual error details

locationstring

Where the error occurred, e.g. 'body.items3.tags' or 'path.thing-id'

messagestring

Error message text

valueany

The value at the given location

instancestring<uri>

A URI reference that identifies the specific occurrence of the problem.

Example:https://example.com/error-log/abc123

statusinteger<int64>

HTTP status code

Example:400

titlestring

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

Example:Bad Request

typestring<uri>

A URI reference to human-readable documentation for the error.

Default:about:blank

Example:https://example.com/errors/example

Description: Not Found

Content type: application/problem+json

Example

{
  "$schema": "https://rpc-testnet.qanplatform.com/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Body

$schemastring<uri>

A URL to the JSON Schema for this object.

Example:https://rpc-testnet.qanplatform.com/schemas/ErrorModel.json

detailstring

A human-readable explanation specific to this occurrence of the problem.

Example:Property foo is required but is missing.

errorsarray[object]

Optional list of individual error details

locationstring

Where the error occurred, e.g. 'body.items3.tags' or 'path.thing-id'

messagestring

Error message text

valueany

The value at the given location

instancestring<uri>

A URI reference that identifies the specific occurrence of the problem.

Example:https://example.com/error-log/abc123

statusinteger<int64>

HTTP status code

Example:400

titlestring

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

Example:Bad Request

typestring<uri>

A URI reference to human-readable documentation for the error.

Default:about:blank

Example:https://example.com/errors/example

Description: Unprocessable Entity

Content type: application/problem+json

Example

{
  "$schema": "https://rpc-testnet.qanplatform.com/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Body

$schemastring<uri>

A URL to the JSON Schema for this object.

Example:https://rpc-testnet.qanplatform.com/schemas/ErrorModel.json

detailstring

A human-readable explanation specific to this occurrence of the problem.

Example:Property foo is required but is missing.

errorsarray[object]

Optional list of individual error details

locationstring

Where the error occurred, e.g. 'body.items3.tags' or 'path.thing-id'

messagestring

Error message text

valueany

The value at the given location

instancestring<uri>

A URI reference that identifies the specific occurrence of the problem.

Example:https://example.com/error-log/abc123

statusinteger<int64>

HTTP status code

Example:400

titlestring

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

Example:Bad Request

typestring<uri>

A URI reference to human-readable documentation for the error.

Default:about:blank

Example:https://example.com/errors/example

Description: Internal Server Error

Content type: application/problem+json

Example

{
  "$schema": "https://rpc-testnet.qanplatform.com/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Body

$schemastring<uri>

A URL to the JSON Schema for this object.

Example:https://rpc-testnet.qanplatform.com/schemas/ErrorModel.json

detailstring

A human-readable explanation specific to this occurrence of the problem.

Example:Property foo is required but is missing.

errorsarray[object]

Optional list of individual error details

locationstring

Where the error occurred, e.g. 'body.items3.tags' or 'path.thing-id'

messagestring

Error message text

valueany

The value at the given location

instancestring<uri>

A URI reference that identifies the specific occurrence of the problem.

Example:https://example.com/error-log/abc123

statusinteger<int64>

HTTP status code

Example:400

titlestring

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

Example:Bad Request

typestring<uri>

A URI reference to human-readable documentation for the error.

Default:about:blank

Example:https://example.com/errors/example

Previous

qan_getTransactionByBlockNumberAndIndex

Next

qan_getTransactionCount