qan_getBlockTransactionCountByHash
https://rpc-testnet.qanplatform.com/getBlockTransactionCountByHash/{Hash}/
API details
Returns the number of transactions for the block matching the given block hash.
Parameters for "qan_getBlockTransactionCountByHash"
The hash of the block
Examples:0x4e3a3754410177e6937ef1f84bba68ea139e8d1a2258c5f85db9f1cd715a1bdd0X4E3A3754410177E6937EF1F84BBA68EA139E8D1A2258C5F85DB9F1CD715A1BDD
HTTP response status codes for "qan_getBlockTransactionCountByHash"
Status Code | Description |
---|---|
200 | OK |
400 | Bad Request |
404 | Not Found |
422 | Unprocessable Entity |
500 | Internal Server Error |
Code samples for "qan_getBlockTransactionCountByHash"
Request examples
https://rpc-testnet.qanplatform.com/getBlockTransactionCountByHash/{Hash}/
curl --request GET \
--url https://rpc-testnet.qanplatform.com/getBlockTransactionCountByHash/{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/getBlockTransactionCountByHash/{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/getBlockTransactionCountByHash/{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/getBlockTransactionCountByHash/{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/getBlockTransactionCountByHash/{Hash}/")
.header("Accept", "application/json, application/problem+json")
.asString();
Responses
Description: OK
Content type: application/json
Example
{
"$schema": "https://rpc-testnet.qanplatform.com/schemas/Output_getBlockTransactionCountByHash.json",
"TransactionCount": "string"
}
Body
A URL to the JSON Schema for this object.
Example:https://rpc-testnet.qanplatform.com/schemas/Output_getBlockTransactionCountByHash.json
The number of transactions associated with a specific block, in decimal value
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
A URL to the JSON Schema for this object.
Example:https://rpc-testnet.qanplatform.com/schemas/ErrorModel.json
A human-readable explanation specific to this occurrence of the problem.
Example:Property foo is required but is missing.
Optional list of individual error details
Where the error occurred, e.g. 'body.items3.tags' or 'path.thing-id'
Error message text
The value at the given location
A URI reference that identifies the specific occurrence of the problem.
Example:https://example.com/error-log/abc123
HTTP status code
Example:400
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
Example:Bad Request
A URI reference to human-readable documentation for the error.
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
A URL to the JSON Schema for this object.
Example:https://rpc-testnet.qanplatform.com/schemas/ErrorModel.json
A human-readable explanation specific to this occurrence of the problem.
Example:Property foo is required but is missing.
Optional list of individual error details
Where the error occurred, e.g. 'body.items3.tags' or 'path.thing-id'
Error message text
The value at the given location
A URI reference that identifies the specific occurrence of the problem.
Example:https://example.com/error-log/abc123
HTTP status code
Example:400
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
Example:Bad Request
A URI reference to human-readable documentation for the error.
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
A URL to the JSON Schema for this object.
Example:https://rpc-testnet.qanplatform.com/schemas/ErrorModel.json
A human-readable explanation specific to this occurrence of the problem.
Example:Property foo is required but is missing.
Optional list of individual error details
Where the error occurred, e.g. 'body.items3.tags' or 'path.thing-id'
Error message text
The value at the given location
A URI reference that identifies the specific occurrence of the problem.
Example:https://example.com/error-log/abc123
HTTP status code
Example:400
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
Example:Bad Request
A URI reference to human-readable documentation for the error.
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
A URL to the JSON Schema for this object.
Example:https://rpc-testnet.qanplatform.com/schemas/ErrorModel.json
A human-readable explanation specific to this occurrence of the problem.
Example:Property foo is required but is missing.
Optional list of individual error details
Where the error occurred, e.g. 'body.items3.tags' or 'path.thing-id'
Error message text
The value at the given location
A URI reference that identifies the specific occurrence of the problem.
Example:https://example.com/error-log/abc123
HTTP status code
Example:400
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
Example:Bad Request
A URI reference to human-readable documentation for the error.
Example:https://example.com/errors/example