80trust / 100

Transactions

by api.k8s-dev.blockscout.com in Onchain & crypto

x402 APIPassing, checked 30 min ago

Access to api/v2/transactions. List blockchain transactions with filtering options for status, type, and method

GET
https://api.k8s-dev.blockscout.com/:chain_id/api/v2/transactions
Price
$0.002
per call in USDC
Uptime
100%
last 30 days
Response time
176 ms
302 ms slowest 5%
Last check
Passed
30 min ago, next any minute now

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Status and outage history · Atom feed

How to call it

GET https://api.k8s-dev.blockscout.com/:chain_id/api/v2/transactions

Each call costs $0.002 in USDC on Base Sepolia, paid with the request over x402.

Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.

Example request

From the listing.

GET https://api.k8s-dev.blockscout.com/:chain_id/api/v2/transactions?block_number=0&filter=string&hash=string&index=0&inserted_at=string&items_count=0&type=string

Parameters

ParameterTypeRequiredDescription
block_numberintegerNo
filterstringNo
hashstringNo
indexintegerNo
inserted_atstringNo
items_countintegerNo
typestringNo

Example response

The provider's example. We can't check it without paying.

Example response, 230 lines
{
  "items": [
    {
      "arbitrum": {
        "batch_data_container": "string",
        "batch_number": 0,
        "commitment_transaction": {
          "hash": "string",
          "status": "string",
          "timestamp": "string"
        },
        "confirmation_transaction": {
          "hash": "string",
          "status": "string",
          "timestamp": "string"
        },
        "contains_message": "string",
        "gas_used_for_l1": "string",
        "gas_used_for_l2": "string",
        "message_related_info": {
          "associated_l1_transaction_hash": "string",
          "message_id": 0,
          "message_status": "string"
        },
        "network_fee": "string",
        "poster_fee": "string",
        "status": "string"
      },
      "authorization_list": [
        {
          "address_hash": "string",
          "authority": "string",
          "chain_id": 0,
          "nonce": "string",
          "r": "string",
          "s": "string",
          "status": "string",
          "v": 0
        }
      ],
      "base_fee_per_gas": "string",
      "block_number": 0,
      "confirmation_duration": [
        0
      ],
      "confirmations": 0,
      "created_contract": {},
      "decoded_input": {},
      "exchange_rate": "string",
      "fee": {
        "type": "string",
        "value": "string"
      },
      "fhe_operations_count": 0,
      "from": {
        "ens_domain_name": "string",
        "hash": "string",
        "implementations": [
          {
            "address_hash": "string",
            "name": "string"
          }
        ],
        "is_contract": true,
        "is_scam": true,
        "is_verified": true,
        "metadata": {},
        "name": "string",
        "private_tags": [
          {
            "address_hash": "string",
            "display_name": "string",
            "label": "string"
          }
        ],
        "proxy_type": "string",
        "public_tags": [
          {
            "address_hash": "string",
            "display_name": "string",
            "label": "string"
          }
        ],
        "reputation": "string",
        "watchlist_names": [
          {
            "display_name": "string",
            "label": "string"
          }
        ]
      },
      "gas_limit": "string",
      "gas_price": "string",
      "gas_used": "string",
      "has_error_in_internal_transactions": true,
      "hash": "string",
      "historic_exchange_rate": "string",
      "is_pending_update": true,
      "max_fee_per_gas": "string",
      "max_priority_fee_per_gas": "string",
      "method": "string",
      "nonce": 0,
      "position": 0,
      "priority_fee": "string",
      "raw_input": "string",
      "result": {},
      "revert_reason": {},
      "status": "string",
      "timestamp": "string",
      "to": {},
      "token_transfers": [
        {
          "block_hash": "string",
          "block_number": 0,
          "from": {
            "ens_domain_name": "string",
            "hash": "string",
            "implementations": [
              {
                "address_hash": "string",
                "name": "string"
              }
            ],
            "is_contract": true,
            "is_scam": true,
            "is_verified": true,
            "metadata": {},
            "name": "string",
            "private_tags": [
              {
                "address_hash": "string",
                "display_name": "string",
                "label": "string"
              }
            ],
            "proxy_type": "string",
            "public_tags": [
              {
                "address_hash": "string",
                "display_name": "string",
                "label": "string"
              }
            ],
            "reputation": "string",
            "watchlist_names": [
              {
                "display_name": "string",
                "label": "string"
              }
            ]
          },
          "log_index": 0,
          "method": "string",
          "timestamp": "string",
          "to": {
            "ens_domain_name": "string",
            "hash": "string",
            "implementations": [
              {
                "address_hash": "string",
                "name": "string"
              }
            ],
            "is_contract": true,
            "is_scam": true,
            "is_verified": true,
            "metadata": {},
            "name": "string",
            "private_tags": [
              {
                "address_hash": "string",
                "display_name": "string",
                "label": "string"
              }
            ],
            "proxy_type": "string",
            "public_tags": [
              {
                "address_hash": "string",
                "display_name": "string",
                "label": "string"
              }
            ],
            "reputation": "string",
            "watchlist_names": [
              {
                "display_name": "string",
                "label": "string"
              }
            ]
          },
          "token": {
            "address_hash": "string",
            "bridge_type": "string",
            "circulating_market_cap": "string",
            "circulating_supply": "string",
            "decimals": "string",
            "exchange_rate": "string",
            "foreign_address": "string",
            "holders_count": "string",
            "icon_url": "string",
            "name": "string",
            "new_ui_multiplier": "string",
            "origin_chain_id": "string",
            "reputation": "string",
            "symbol": "string",
            "total_supply": "string",
            "type": {},
            "ui_multiplier": "string",
            "ui_multiplier_effective_at": "string",
            "volume_24h": "string"
          },
          "token_type": "string",
          "total": {},
          "transaction_hash": "string",
          "type": "string"
        }
      ],
      "token_transfers_overflow": true,
      "transaction_burnt_fee": "string",
      "transaction_tag": "string",
      "transaction_types": [
        "string"
      ],
      "type": 0,
      "value": "string"
    }
  ],
  "next_page_params": {}
}

Call it from code

The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.002.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i 'https://api.k8s-dev.blockscout.com/:chain_id/api/v2/transactions?block_number=0&filter=string&hash=string&index=0&inserted_at=string&items_count=0&type=string'

# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - 'https://api.k8s-dev.blockscout.com/:chain_id/api/v2/transactions?block_number=0&filter=string&hash=string&index=0&inserted_at=string&items_count=0&type=string' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

// Pays at most $0.002 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.002" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.002 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.k8s-dev.blockscout.com%2F%3Achain_id%2Fapi%2Fv2%2Ftransactions
const res = await pay("https://api.k8s-dev.blockscout.com/:chain_id/api/v2/transactions?block_number=0&filter=string&hash=string&index=0&inserted_at=string&items_count=0&type=string");
console.log(res.status, await res.text());
Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

# Pays at most $0.002 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.002"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.get("https://api.k8s-dev.blockscout.com/:chain_id/api/v2/transactions?block_number=0&filter=string&hash=string&index=0&inserted_at=string&items_count=0&type=string")
    print(res.status_code, res.text)

Security scan

No findings

We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
30 min agoPassed402192 ms$0.002
4 h agoPassed402180 ms$0.002
9 h agoPassed402177 ms$0.002
13 h agoPassed402185 ms$0.002
17 h agoPassed402176 ms$0.002
Show 10 older checks
22 h agoPassed402183 ms$0.002
26 h agoPassed402176 ms$0.002
30 h agoPassed402260 ms$0.002
34 h agoPassed402192 ms$0.002
38 h agoPassed402302 ms$0.002
42 h agoPassed402172 ms$0.002
46 h agoPassed402163 ms$0.002
2 days agoPassed402165 ms$0.002
2 days agoPassed402170 ms$0.002
2 days agoPassed402351 ms$0.002