ETH

डेवलपर API

OpenAPI

REST API · Ink Mainnet

https://inkexplorer.xyz/api

सार्वजनिक पठन। API कुंजी आवश्यक नहीं।

त्वरित शुरुआत

cURL
curl --fail --silent 'https://inkexplorer.xyz/api/explorer/blocks'
JavaScript
const base = "https://inkexplorer.xyz/api";
const response = await fetch(base + '/explorer/blocks');
if (!response.ok) throw new Error('HTTP ' + response.status);
const page = await response.json();
console.log(page.items);

if (page.next_page_params) {
  const cursor = new URLSearchParams(page.next_page_params);
  const next = await fetch(base + '/explorer/blocks?' + cursor);
  console.log(await next.json());
}

JSON-RPC · Ink Mainnet

Ink Explorer से चेन डेटा पढ़ें और कॉल का सिमुलेशन करें। लेनदेन पर हस्ताक्षर और उनका प्रसारण समर्थित नहीं है।

RPC अनुरोध HTTP POST का उपयोग करते हैं। उपलब्ध विधियाँ और सीमाएँ देखने के लिए पता खोलें। चेन आईडी: 57073 (0xdef1).

cURL
curl --fail --silent 'https://inkexplorer.xyz/api/rpc' \
  -H 'Content-Type: application/json' \
  --data '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'
JavaScript
const response = await fetch("https://inkexplorer.xyz/api/rpc", {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]})
});
const result = await response.json();
if (!response.ok || result.error) throw new Error(result.error?.message || 'HTTP ' + response.status);
console.log(BigInt(result.result));
समर्थित RPC विधियाँ (23)
  • eth_chainId
  • net_version
  • web3_clientVersion
  • eth_blockNumber
  • eth_syncing
  • eth_gasPrice
  • eth_maxPriorityFeePerGas
  • eth_getBalance
  • eth_getCode
  • eth_getTransactionCount
  • eth_getStorageAt
  • eth_getBlockByNumber
  • eth_getBlockByHash
  • eth_getBlockTransactionCountByNumber
  • eth_getBlockTransactionCountByHash
  • eth_getTransactionByHash
  • eth_getTransactionReceipt
  • eth_getTransactionByBlockHashAndIndex
  • eth_getTransactionByBlockNumberAndIndex
  • eth_call
  • eth_estimateGas
  • eth_feeHistory
  • eth_getLogs

RPC सीमाएँ: प्रति बैच 20 कॉल, प्रति IP प्रति मिनट 120 कॉल और प्रति लॉग क्वेरी 2000 ब्लॉक।

इंडेक्स किए गए लाइव इवेंट के लिए नीचे दिए एक्सप्लोरर WebSocket का उपयोग करें। यह RPC केवल HTTP का उपयोग करता है।

एंडपॉइंट

GET/overviewनेटवर्क अवलोकन

URL: https://inkexplorer.xyz/api/overview

JSON: { ... }

GET/explorer/blocksब्लॉक

URL: https://inkexplorer.xyz/api/explorer/blocks

पैरामीटर: type=block | reorg

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/blocks/{height-or-hash}ब्लॉक

URL: https://inkexplorer.xyz/api/explorer/blocks/{height-or-hash}

JSON: { ... }

GET/explorer/blocks/{height-or-hash}/transactionsलेन-देन

URL: https://inkexplorer.xyz/api/explorer/blocks/{height-or-hash}/transactions

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/transactionsलेन-देन

URL: https://inkexplorer.xyz/api/explorer/transactions

JSON: { items: [...], next_page_params: { ... } | null }

GET/v1/transactionsफ़िल्टर किए लेनदेन

URL: https://inkexplorer.xyz/api/v1/transactions

पैरामीटर: transaction_types, methods, age_from, age_to, from_address_hashes_to_include, to_address_hashes_to_include, address_relation, status, cursor

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/transactions/{hash}लेन-देन हैश

URL: https://inkexplorer.xyz/api/explorer/transactions/{hash}

JSON: { ... }

GET/explorer/transactions/{hash}/token-transfersटोकन ट्रांसफ़र

URL: https://inkexplorer.xyz/api/explorer/transactions/{hash}/token-transfers

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/transactions/{hash}/internal-transactionsआंतरिक लेनदेन

URL: https://inkexplorer.xyz/api/explorer/transactions/{hash}/internal-transactions

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/transactions/{hash}/logsइवेंट लॉग

URL: https://inkexplorer.xyz/api/explorer/transactions/{hash}/logs

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/internal-transactionsआंतरिक लेनदेन

URL: https://inkexplorer.xyz/api/explorer/internal-transactions

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/addressesशीर्ष खाते

URL: https://inkexplorer.xyz/api/explorer/addresses

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/addresses/{address}पता

URL: https://inkexplorer.xyz/api/explorer/addresses/{address}

JSON: { ... }

GET/address-balance/{address}ETH बैलेंस

URL: https://inkexplorer.xyz/api/address-balance/{address}

JSON: { schema: 1, chainId, address, balance: "wei", block: { number, hash, timestamp }, observedAt, source: "local" }

GET/explorer/addresses/{address}/countersपते के आँकड़े

URL: https://inkexplorer.xyz/api/explorer/addresses/{address}/counters

JSON: { ... }

GET/explorer/addresses/{address}/transactionsपते के लेनदेन

URL: https://inkexplorer.xyz/api/explorer/addresses/{address}/transactions

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/addresses/{address}/token-transfersटोकन ट्रांसफ़र

URL: https://inkexplorer.xyz/api/explorer/addresses/{address}/token-transfers

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/addresses/{address}/internal-transactionsआंतरिक लेनदेन

URL: https://inkexplorer.xyz/api/explorer/addresses/{address}/internal-transactions

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/tokensटोकन

URL: https://inkexplorer.xyz/api/explorer/tokens

पैरामीटर: type=ERC-20 | ERC-721 | ERC-1155

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/tokens/{address}टोकन

URL: https://inkexplorer.xyz/api/explorer/tokens/{address}

JSON: { ... }

GET/explorer/tokens/{address}/transfersटोकन ट्रांसफ़र

URL: https://inkexplorer.xyz/api/explorer/tokens/{address}/transfers

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/tokens/{address}/holdersटोकन धारक

URL: https://inkexplorer.xyz/api/explorer/tokens/{address}/holders

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/tokens/{address}/instancesNFT उदाहरण

URL: https://inkexplorer.xyz/api/explorer/tokens/{address}/instances

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/tokens/{address}/instances/{token-id}NFT उदाहरण

URL: https://inkexplorer.xyz/api/explorer/tokens/{address}/instances/{token-id}

JSON: { ... }

GET/explorer/tokens/{address}/instances/{token-id}/transfersNFT ट्रांसफ़र

URL: https://inkexplorer.xyz/api/explorer/tokens/{address}/instances/{token-id}/transfers

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/token-transfersटोकन ट्रांसफ़र

URL: https://inkexplorer.xyz/api/explorer/token-transfers

पैरामीटर: type=ERC-20 | ERC-721 | ERC-1155

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/optimism/depositsL1 → L2 जमा

URL: https://inkexplorer.xyz/api/explorer/optimism/deposits

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/optimism/withdrawalsL2 → L1 निकासी

URL: https://inkexplorer.xyz/api/explorer/optimism/withdrawals

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/optimism/batchesलेनदेन के बैच

URL: https://inkexplorer.xyz/api/explorer/optimism/batches

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/optimism/batches/countलेनदेन बैच की संख्या

URL: https://inkexplorer.xyz/api/explorer/optimism/batches/count

JSON: 12345

GET/explorer/optimism/batches/{number}लेनदेन बैच

URL: https://inkexplorer.xyz/api/explorer/optimism/batches/{number}

JSON: { ... }

GET/explorer/optimism/gamesविवाद

URL: https://inkexplorer.xyz/api/explorer/optimism/games

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/optimism/games/countविवादों की संख्या

URL: https://inkexplorer.xyz/api/explorer/optimism/games/count

JSON: 12345

GET/explorer/blocks/optimism-batch/{number}बैच के ब्लॉक

URL: https://inkexplorer.xyz/api/explorer/blocks/optimism-batch/{number}

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/transactions/optimism-batch/{number}बैच के लेनदेन

URL: https://inkexplorer.xyz/api/explorer/transactions/optimism-batch/{number}

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/proxy/account-abstraction/operationsउपयोगकर्ता संचालन

URL: https://inkexplorer.xyz/api/explorer/proxy/account-abstraction/operations

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/proxy/account-abstraction/operations/{hash}उपयोगकर्ता ऑपरेशन

URL: https://inkexplorer.xyz/api/explorer/proxy/account-abstraction/operations/{hash}

JSON: { ... }

GET/explorer/smart-contractsसत्यापित कॉन्ट्रैक्ट

URL: https://inkexplorer.xyz/api/explorer/smart-contracts

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/smart-contracts/{address}स्मार्ट कॉन्ट्रैक्ट

URL: https://inkexplorer.xyz/api/explorer/smart-contracts/{address}

JSON: { ... }

GET/explorer/statsनेटवर्क आँकड़े

URL: https://inkexplorer.xyz/api/explorer/stats

JSON: { ... }

GET/contract-info/poolsDEX पूल

URL: https://inkexplorer.xyz/api/contract-info/pools

JSON: { items: [...], next_page_params: { ... } | null }

GET/contract-info/pools/{address-or-id}DEX पूल

URL: https://inkexplorer.xyz/api/contract-info/pools/{address-or-id}

JSON: { ... }

GET/dappsविकेंद्रीकृत ऐप

URL: https://inkexplorer.xyz/api/dapps

JSON: [{ ... }, ...]

GET/stats/countersनेटवर्क का कुल

URL: https://inkexplorer.xyz/api/stats/counters

JSON: { counters: [...] }

GET/stats/linesसभी आँकड़े

URL: https://inkexplorer.xyz/api/stats/lines

JSON: { sections: [...] }

GET/stats/lines/{metric}चार्ट

URL: https://inkexplorer.xyz/api/stats/lines/{metric}

पैरामीटर: from=YYYY-MM-DD, to=YYYY-MM-DD, resolution=DAY | WEEK | MONTH | YEAR

JSON: { chart: [...] }

GET/searchखोजें

URL: https://inkexplorer.xyz/api/search

पैरामीटर: q

JSON: { items: [...], next_page_params: { ... } | null }

GET/live/configWebSocket विन्यास

URL: https://inkexplorer.xyz/api/live/config

JSON: { ... }

GET/live/statusWebSocket स्थिति

URL: https://inkexplorer.xyz/api/live/status

JSON: { ... }

GET/live/snapshotनवीनतम ब्लॉक और लेनदेन

URL: https://inkexplorer.xyz/api/live/snapshot

JSON: { ... }

GET/networkनेटवर्क की स्थिति

URL: https://inkexplorer.xyz/api/network

JSON: { ... }

लेनदेन फ़िल्टर

फ़िल्टर मूल लेनदेन पर लागू हैं। टोकन ट्रांसफ़र और आंतरिक कॉल अलग पंक्तियाँ नहीं बनाते।

cURL
curl --get --fail 'https://inkexplorer.xyz/api/v1/transactions' \
  --data-urlencode 'transaction_types=CONTRACT_INTERACTION' \
  --data-urlencode 'methods=0xa9059cbb' \
  --data-urlencode 'age_from=2026-10-01T00:00:00Z'
transaction_types
COIN_TRANSFER, CONTRACT_INTERACTION, CONTRACT_CREATION, ERC-20, ERC-721, ERC-1155
methods
चार बाइट का चयनकर्ता, जैसे 0xa9059cbb।
from_address_hashes_to_include / to_address_hashes_to_include
पूरा 0x पता। दोनों फ़िल्टर AND उपयोग करते हैं, सिवाय address_relation=or के।
age_from / age_to
ISO 8601 · UTC
status
success | failed
cursor
next_page_params का अपारदर्शी कर्सर। हर पृष्ठ पर समान फ़िल्टर रखें।

विफल लेनदेन टोकन ट्रांसफ़र इवेंट नहीं बनाते। विफल टोकन कॉल देखने के लिए कॉन्ट्रैक्ट इंटरैक्शन चुनें।

पृष्ठांकन

next_page_params की सभी कुंजियाँ अगले अनुरोध में भेजें। null सूची का अंत है। ब्लॉक ऑफ़सेट न गणना करें, न बदले फ़िल्टर के साथ कर्सर इस्तेमाल करें।

फ़िल्टर पृष्ठ छोटा या खाली होने पर भी अगला कर्सर हो सकता है। उससे जारी रखें; मूल हैश द्वारा दोहराव हटता है।

ERC टोकन खोज प्रति पृष्ठ अधिकतम 25 मूल लेनदेन जाँचती है। आगे के इवेंट के लिए कर्सर का उपयोग करें।

WebSocket

JavaScript
const socket = new WebSocket("wss://inkexplorer.xyz/api/live");
socket.onmessage = ({data}) => {
  const event = JSON.parse(data);
  if (event.protocol !== 'ink-observer.live.v1') return;
  if (event.network?.chainId !== 57073) return;
  console.log(event.block, event.transactions, event.utilization, event.rolling24h);
};
// Reconnect with backoff after a close.
// The welcome frame is a fresh snapshot.

ब्लॉक नोड इवेंट से आते हैं। लेनदेन रसीद से पहले आ सकता है; केवल status ok सफलता बताता है। पुनर्गठन पर ऊँचाई और हैश से ब्लॉक बदलें।

ink-explorer.delta.v1

WebSocket उपप्रोटोकॉल चुनें। reset स्थिति बदलता है; आगे ब्लॉक ऊँचाई और लेनदेन हैश से मिलाएँ। बदले ब्लॉक और विंडो के बाहर के लेनदेन हटाएँ। उपयोग 30 मान्य ब्लॉक का है।

JavaScript
new WebSocket("wss://inkexplorer.xyz/api/live", 'ink-explorer.delta.v1')

सीमाएँ और त्रुटियाँ

इंस्टेंस पर साझा सीमा 4 समवर्ती और प्रति मिनट 60 खोजों की है। अनुरोध अधिकतम 3 स्रोत पृष्ठ पढ़ता है। अन्य रूट स्रोत की सीमा मानते हैं। 429 पर Retry-After और घातांकीय विलंब अपनाएँ।

200
सफल
202
BLOCK_INDEXING · Retry-After: 3 · Accept: application/vnd.ink.indexing+json, application/json
TRANSACTION_INDEXING · Retry-After: 1 · Accept: application/vnd.ink.transaction-indexing+json, application/json
400
अमान्य पैरामीटर या कर्सर।
404
अज्ञात एंडपॉइंट।
405
केवल पढ़ने के लिए। GET उपयोग करें।
429
दर सीमा पूरी हुई। बाद में पुनः प्रयास करें।
502 / 503
स्रोत या कनेक्शन अनुपलब्ध। पुनः प्रयास का अंतराल बढ़ाएँ।

मान और डेटा की ताज़गी

Wei मान दशमलव स्ट्रिंग हैं। फ़्लोटिंग-पॉइंट की त्रुटि से बचने के लिए BigInt और टोकन दशमलव उपयोग करें। ETH के 18 दशमलव हैं। चार्ट इकाइयाँ सूची में हैं।

ब्लॉक और रसीदें स्थानीय नोड से, इतिहास और चार्ट अभी Ink इंडेक्स से आते हैं। X-Ink-Data-Status और X-Ink-Data-Fetched-At जाँचें; सुरक्षित पुराना डेटा नया अवलोकन नहीं है।

दिखाया गया कुल ब्लॉक स्थानीय नोड से आता है। इंडेक्सर काउंटर गणना का समय नहीं बताते।

/live/snapshot → block.height + 1 · स्थानीय नोड के कैनोनिकल ब्लॉक, जेनेसिस (ब्लॉक 0) सहित।

/live/snapshot → rolling24h.transactions · पिछले 24 घंटों के कैनोनिकल ब्लॉकों में शामिल लेनदेन, जिनमें विफल लेनदेन और L1/सिस्टम जमा भी शामिल हैं। अवधि दर्शाए गए ब्लॉक पर समाप्त होती है।

डेटा प्राप्त करने का समय हाल का होने पर भी इंडेक्सर के समेकित आँकड़े नवीनतम ब्लॉक से पीछे हो सकते हैं।

अंतिम अंतराल अधूरा हो सकता है। UTC दिन और पिछले 24 घंटे अलग अवधि हैं। कुल शुल्क में L2 निष्पादन और L1 डेटा शामिल हैं; ऑपरेटर शुल्क रसीद में देखें।