XFI Scan API
These following API's are recommended for development on mainnet and testnet. When receive example pay attention to the domain:
Last updated
These following API's are recommended for development on mainnet and testnet. When receive example pay attention to the domain:
Last updated
xfiscan — for mainnet network
test.xfiscan — for testnet network
GET /api/1.0/txs
Retrieving a list of transactions.
Example of an answer: https://test.xfiscan.com/api/1.0/txs
Queries Parameters:
Parameter | Type | Description |
---|---|---|
GET /api/1.0/txs/{hash} Getting the transaction hash.
Example of an answer: https://test.xfiscan.com/api/1.0/txs/D64C8804B101996F92F57603166CF2852C48DDDA959316034280088F1FF99731
GET /api/1.0/blocks
Getting a list of blocks.
Example of an answer: https://test.xfiscan.com/api/1.0/blocks
GET /api/1.0/blocks/latest Receiving the current confirmed block
Example of an answer: https://test.xfiscan.com/api/1.0/blocks/latest
Getting a specific block. Example of an answer: https://test.xfiscan.com/api/1.0/blocks/1
Retrieve a list of account addresses Example of an answer: https://test.xfiscan.com/api/1.0/addresses
GET /api/1.0/addresses/{address}
Get address by hash of account address. Example of an answer: https://test.xfiscan.com/api/1.0/addresses/mx1j3ys0zehrles4y8vxmlxry03vnx4yltyg2alsv
GET /api/1.0/addresses/rich-list/{type}
Getting a list of addresses by the number of tokens purchased.
Example of an answer: https://test.xfiscan.com/api/1.0/addresses/rich-list/mpx
Getting a list of validators.
Example of an answer: https://test.xfiscan.com/api/1.0/validators
GET /api/1.0/validators/{address}
Getting the validator by the address.
Example of an answer: https://test.xfiscan.com/api/1.0/validators/mxvaloper1902re99ggp60q58z4nhcc9jqutp3xmaq6jlx0u
GET /api/1.0/stat
Example of an answer: https://test.xfiscan.com/api/1.0/stat
Getting smart contracts logs.
Example of an answer: https://test.xfiscan.com/api/1.0/event-logs
Getting smart contracts. Example of an answer: https://test.xfiscan.com/api/1.0/contracts
GET /api/1.0/contracts/compiler-versions
Getting a list of compiler versions.
Example of an answer:
https://test.xfiscan.com/api/1.0/contracts/compiler-versions
GET /api/1.0/contracts/{address}
Getting the address of a smart contract.
Example of an answer: https://test.xfiscan.com/api/1.0/contracts/0x516354c4024246173b06F1D7BF834DE3865B7A47
POST /api/1.0/contracts/verify
The request responsible for verifying the contract.
After successful verification of the contract, the Application Binary Interface (ABI) is stored in the database, which allows you to define the methods of the contract.
GET /api/1.0/tokens
Getting a list of tokens.
Example of an answer:
https://test.xfiscan.com/api/1.0/tokens
Receiving a token.
Example of an answer:
https://test.xfiscan.com/api/1.0/tokens/0x739fD25CaeFe272DFf9dbab25f161cE36301BF14
Query for tokenized transfers.
Example of an answer: https://test.xfiscan.com/api/1.0/token-transfers
Getting a list of token holders. Example of an answer: https://test.xfiscan.com/api/1.0/token-holders
Asset management and display information about available tokens in the blockchain system.
Example of an answer:
https://test.xfiscan.com/api/1.0/token-inventory
GET /api/1.0/token-inventory/{contractAddress}/{tokenId}
Inventory availability checks at a specific address.
Example of an answer:
GET /api/1.0/search
Searching an address, block, transaction, or token based on a passed value.
Example of an answer: https://test.xfiscan.com/api/1.0/search?value=0xf58941E4258320D76BdAb72C5eD8d47c25604e94
OPTIONS /api/1.0/stream/new-block Getting a data stream of new block data. OPTIONS /api/1.0/stream/new-tx
Getting a data stream of new transactions.
Per socketio protocol.
Example for js:
where:
url connection: https://test.xfiscan.com/stream, handshake path /api/1.0/stream, new-block - subscribe to receive new blocks, new-tx - subscribe to receive new transactions.
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|