Zum Inhalt springen

Kostenloser Metal L2 RPC-Endpunkt — ohne API key

EVM-compatible

Endpunkte

Kein API key erforderlich. Nur Wallet-Methoden, mit Ratenlimits pro IP. Aktuelle Methoden und Limits findest du unter GET /v1/chains.

Kostenloser öffentlicher RPC-Endpunkt
https://api.blockvectra.com/v1/metall2_mainnet/public
curl -X POST 'https://api.blockvectra.com/v1/metall2_mainnet/public' -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'
Ratenlimit: 3 Anfragen/s pro IP, Burst 20, Batch-Maximum 10
Sendelimit für Transaktionen: 1 Anfragen/s pro IP, Burst 3
Öffentliche Methoden
  • eth_chainId
  • net_version
  • eth_blockNumber
  • eth_getBalance
  • eth_getTransactionCount
  • eth_getCode
  • eth_getStorageAt
  • eth_call
  • eth_estimateGas
  • eth_gasPrice
  • eth_maxPriorityFeePerGas
  • eth_feeHistory
  • eth_getBlockByNumber
  • eth_getBlockByHash
  • eth_getTransactionByHash
  • eth_getTransactionReceipt
  • eth_syncing
  • web3_clientVersion
  • eth_sendRawTransaction
Alle kostenlosen öffentlichen RPC-Endpunkte
Öffentliche Historie: die letzten 1,000 Blöcke. Kostenlos registrieren, um kostenlose API-Guthaben für die unterstützten Methoden dieser Chain zu nutzen.
JSON-RPC (Schlüssel im Pfad)
https://api.blockvectra.com/v1/metall2_mainnet/{api_key}
JSON-RPC (Header: x-api-key)
https://api.blockvectra.com/v1/metall2_mainnet
x-api-key: {api_key}

WebSocket

WebSocket (Schlüssel im Pfad)
wss://api.blockvectra.com/v1/metall2_mainnet/{api_key}
WebSocket (Header: x-api-key oder Authorization)
wss://api.blockvectra.com/v1/metall2_mainnet
x-api-key: {api_key}
Authorization: Bearer {api_key}
Unterstützte Abonnementtypen
  • newHeads
  • logs (Filter muss address oder topic0 enthalten)

Netzwerkparameter

Chain ID1750
Kostenloser öffentlicher RPC-Endpunkthttps://api.blockvectra.com/v1/metall2_mainnet/public
Methoden mit API-Schlüssel39
Data APINicht unterstützt
WebSocket-UnterstützungUnterstützt
Webhook-PushNicht unterstützt
Transaktionen sendenUnterstützt
Transaktionen senden (öffentlicher Endpunkt ohne Key)Unterstützt
Fenster der ZustandshistorieHistorischer Zustand für die letzten 10,000 Blöcke
eth_getLogs maximaler Blockbereich1,000 Blöcke
Data API DatensätzeNicht unterstützt
Unterstützte AbonnementtypennewHeads, logs
Zugehörige TestnetzeUnbekannt
Zugehörige AnleitungenUnbekannt

Kurzbeispiel

curl -X POST https://api.blockvectra.com/v1/metall2_mainnet \
  -H "Content-Type: application/json" \
  -H "x-api-key: {api_key}" \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'

Nutzungslimits

Fenster der ZustandshistorieHistorischer Zustand für die letzten 10,000 Blöcke
eth_getLogs maximaler Blockbereich1,000 Blöcke
Methodenrichtlinie
Erlaubt: eth_blobBaseFee, eth_blockNumber, eth_call, eth_chainId, eth_createAccessList, eth_estimateGas, eth_feeHistory, eth_gasPrice, eth_getBalance, eth_getBlockByHash, eth_getBlockByNumber, eth_getBlockReceipts, eth_getBlockTransactionCountByHash, eth_getBlockTransactionCountByNumber, eth_getCode, eth_getHeaderByHash, eth_getHeaderByNumber, eth_getLogs, eth_getProof, eth_getRawTransactionByBlockHashAndIndex, eth_getRawTransactionByBlockNumberAndIndex, eth_getRawTransactionByHash, eth_getStorageAt, eth_getTransactionByBlockHashAndIndex, eth_getTransactionByBlockNumberAndIndex, eth_getTransactionByHash, eth_getTransactionCount, eth_getTransactionReceipt, eth_getUncleByBlockHashAndIndex, eth_getUncleByBlockNumberAndIndex, eth_getUncleCountByBlockHash, eth_getUncleCountByBlockNumber, eth_maxPriorityFeePerGas, eth_sendRawTransaction, eth_simulateV1, eth_syncing, net_version, web3_clientVersion, web3_sha3

Aufgabe auswählen

Lösungen für Ihre Onchain-Aufgaben

Nächste Schritte mit einem API-Schlüssel

eth_getLogs

set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
    sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
    if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
        sys.exit("Invalid block quantity")
    print(result)
else:
    if not (type(result) is list and all(type(log) is dict for log in result)):
        sys.exit("Invalid logs result")
    print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/metall2_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/metall2_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
  -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logs
eth_getLogs

WebSocket

echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/metall2_mainnet'
WebSocket

Häufig gestellte Fragen

Unterstützt Metal L2 RPC WebSocket?

Metal L2 RPC unterstützt WebSocket-Verbindungen. Unterstützte Abonnementtypen: newHeads, logs.

Unterstützt Metal L2 RPC Trace- oder Debug-Methoden?

Trace- und Debug-Methoden werden für Metal L2 RPC nicht unterstützt.

Preise

Erhalten Sie 30,000,000 CU bei der Registrierung, alle 30 Tage aufgefüllt (Guthaben und Ratenlimits gelten chainübergreifend; keine Kreditkarte erforderlich); Abrechnung pro Million Aufrufe: eth_blockNumber $0.10, eth_call $1.50, eth_getLogs $3.00.

Tarife ansehen →