Api Endpoint

api.onesource.io

Fetch an Ethereum block header and transaction hashes by number, tag, or hex via eth_getBlockByNumber

Open interactive test console

Offering

Provider
api.onesource.io
Method
GET
Offering type
Api Endpoint
Transport type
http
Category
Location And Travel
Delivery
Not provided
Pricing model
Not provided
x402 version
2

Endpoint context

URL
https://api.onesource.io/api/chain/block/:number
MIME type
application/json
First seen
2026-10-16T01:50:06.715Z
Last seen
Tags
None supplied

Payment pricing

x402 payment terms are the authoritative price for calling this endpoint.

Payment option 1
0.003 USDC
Atomic price: 3000 · Network: eip155:8453 · Asset: USDC · Scheme: exact
Payment option 2
0.003 USDC
Atomic price: 3000 · Network: eip155:8453 · Asset: USDC · Scheme: batch-settlement
Raw x402 terms
[
  {
    "scheme": "exact",
    "network": "eip155:8453",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "3000",
    "payTo": "0x52E29e0d2Aa49bfBfC548C0A9F2196F4aa51f3ea"
  },
  {
    "scheme": "batch-settlement",
    "network": "eip155:8453",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "3000",
    "payTo": "0x52E29e0d2Aa49bfBfC548C0A9F2196F4aa51f3ea"
  }
]

Observed health

Status
Healthy
Latest latency
58 ms
Average latency
300 ms
HTTP status
402
Last checked
Reachability
100% over 12 checks

Latency is measured to the first response headers. A reachable result does not verify response accuracy or merchant identity.

Input schema

{
  "additionalProperties": false,
  "properties": {
    "method": {
      "enum": [
        "GET",
        "HEAD",
        "DELETE"
      ],
      "type": "string"
    },
    "pathParams": {
      "properties": {
        "number": {
          "oneOf": [
            {
              "enum": [
                "latest",
                "pending",
                "earliest",
                "safe",
                "finalized"
              ],
              "type": "string"
            },
            {
              "pattern": "^(0[xX][a-fA-F0-9]+|[0-9]+)$",
              "type": "string"
            }
          ]
        }
      },
      "required": [
        "number"
      ],
      "type": "object"
    },
    "queryParams": {
      "properties": {
        "network": {
          "default": "ethereum",
          "enum": [
            "ethereum",
            "sepolia",
            "robinhood"
          ],
          "type": "string"
        }
      },
      "type": "object"
    },
    "type": {
      "const": "http",
      "type": "string"
    }
  },
  "required": [
    "type",
    "method"
  ],
  "type": "object"
}

Output schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "input": {
      "additionalProperties": false,
      "properties": {
        "method": {
          "enum": [
            "GET",
            "HEAD",
            "DELETE"
          ],
          "type": "string"
        },
        "pathParams": {
          "properties": {
            "number": {
              "oneOf": [
                {
                  "enum": [
                    "latest",
                    "pending",
                    "earliest",
                    "safe",
                    "finalized"
                  ],
                  "type": "string"
                },
                {
                  "pattern": "^(0[xX][a-fA-F0-9]+|[0-9]+)$",
                  "type": "string"
                }
              ]
            }
          },
          "required": [
            "number"
          ],
          "type": "object"
        },
        "queryParams": {
          "properties": {
            "network": {
              "default": "ethereum",
              "enum": [
                "ethereum",
                "sepolia",
                "robinhood"
              ],
              "type": "string"
            }
          },
          "type": "object"
        },
        "type": {
          "const": "http",
          "type": "string"
        }
      },
      "required": [
        "type",
        "method"
      ],
      "type": "object"
    },
    "output": {
      "properties": {
        "example": {
          "properties": {
            "data": {
              "description": "Endpoint-specific response payload",
              "properties": {
                "result": {
                  "properties": {
                    "gasLimit": {
                      "type": "string"
                    },
                    "gasUsed": {
                      "type": "string"
                    },
                    "hash": {
                      "type": "string"
                    },
                    "number": {
                      "type": "string"
                    },
                    "parentHash": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    },
                    "transactions": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "type": [
                    "object",
                    "null"
                  ]
                }
              },
              "type": "object"
            },
            "error": {
              "properties": {
                "code": {
                  "type": "integer"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "meta": {
              "properties": {
                "cost_usdc": {
                  "type": "string"
                },
                "endpoint": {
                  "type": "string"
                },
                "payment_chain": {
                  "type": "string"
                },
                "payment_token": {
                  "type": "string"
                },
                "request_id": {
                  "type": "string"
                }
              },
              "required": [
                "endpoint",
                "request_id"
              ],
              "type": "object"
            }
          },
          "required": [
            "data",
            "meta"
          ],
          "type": "object"
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "input"
  ],
  "type": "object"
}