Link to the plugin page: https://zeroqode.com/plugin/alchemy-blockchain--node-service-1645540393255x989669195730747500
Demo to preview the settings
Introduction
Alchemy allows high-performance access to blockchains like Ethereum (as well as some other ERC-20 compatible blockchains like Polygon, Optimism etc). This plugin makes it simple to power your blockchain applications built on Bubble and scale up as you grow. From elastic APIs & dedicated nodes to powerful tools & analytics, all at your command through a simple control panel. You can get instant access to both Mainnet and TestNet networks.
How to setup
To start please create a project at: https://www.alchemy.com/
- Create an account.
2. Π‘lick on Tab: "Apps" and select "Create App".
3. Fill in the required fields and click the "Create app" button.
4. On dashboard select your app.
5. Select "VIEW KEY"
6. Copy your HTTP link
7. Go to the editor Plugin Tab and paste the HTTP link for Alchemy project into the plugin settings.
ο»Ώο»ΏAlchemy API Call
1. eth_blockNumber
Parameters:
- None
Returns:
- QUANTITY - integer of the current block number the client is on.
2. eth_getBlockByHash
Parameters:
- Data - 32 Bytes - Hash of a block.
- Boolean - If true it returns the full transaction objects, if false it returns only the hashes of the transactions.
Returns:
Object - A block object with the following fields, or null when no block was found:
- number: QUANTITY - the block number. null when itβs a pending block.
- hash: DATA, 32 Bytes - hash of the block. null when itβs a pending block.
- parentHash: DATA, 32 Bytes - hash of the parent block.
- nonce: DATA, 8 Bytes - hash of the generated proof-of-work. null when it's a pending block.
- sha3Uncles: DATA, 32 Bytes - SHA3 of the uncles data in the block.
- logsBloom: DATA, 256 Bytes - the bloom filter for the logs of the block. null when it's a pending block.
- transactionsRoot: DATA, 32 Bytes - the root of the transaction trie of the block.
- stateRoot: DATA, 32 Bytes - the root of the final state trie of the block.
- receiptsRoot: DATA, 32 Bytes - the root of the receipts trie of the block.
- miner: DATA, 20 Bytes - the address of the beneficiary to whom the mining rewards were given.
- difficulty: QUANTITY - integer of the difficulty for this block.
- totalDifficulty: QUANTITY - integer of the total difficulty of the chain until this block.
- extraData: DATA - the "extra data" field of this block.
- size: QUANTITY - integer the size of this block in bytes.
- gasLimit: QUANTITY - the maximum gas allowed in this block.
- gasUsed: QUANTITY - the total used gas by all transactions in this block.
- timestamp: QUANTITY - the UNIX timestamp for when the block was collated.
- transactions: Array - Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.
- uncles: Array - Array of uncle hashes.
3. eth_getBlockByNumber
Parameters:
- Block - integer of a block number, or the string "earliest", "latest" or "pending".
- Boolean - If true it returns the full transaction objects, if false only the hashes of the transactions.
Returns:
Object - A block object with the following fields, or null when no block was found:
- number: QUANTITY - the block number. null when it's a pending block.
- hash: DATA, 32 Bytes - hash of the block. null when it's a pending block.
- parentHash: DATA, 32 Bytes - hash of the parent block.
- nonce: DATA, 8 Bytes - hash of the generated proof-of-work. null when it's a pending block.
- sha3Uncles: DATA, 32 Bytes - SHA3 of the uncles data in the block.
- logsBloom: DATA, 256 Bytes - the bloom filter for the logs of the block. null when it's a pending block.
- transactionsRoot: DATA, 32 Bytes - the root of the transaction trie of the block.
- stateRoot: DATA, 32 Bytes - the root of the final state trie of the block.
- receiptsRoot: DATA, 32 Bytes - the root of the receipts trie of the block.
- miner: DATA, 20 Bytes - the address of the beneficiary to whom the mining rewards were given.
- difficulty: QUANTITY - integer of the difficulty for this block.
- totalDifficulty: QUANTITY - integer of the total difficulty of the chain until this block.
- extraData: DATA - the "extra data" field of this block.
- size: QUANTITY - integer the size of this block in bytes.
- gasLimit: QUANTITY - the maximum gas allowed in this block.
- gasUsed: QUANTITY - the total used gas by all transactions in this block.
- timestamp: QUANTITY - the unix timestamp for when the block was collated.
- transactions: Array - Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.
- uncles: Array - Array of uncle hashes.
4. eth_getTransactionByHash
Parameters:
- Data - 32 Bytes - hash of a transaction.
Returns:
Object - A transaction object, or null when no transaction was found:
- blockHash: DATA, 32 Bytes - hash of the block where this transaction was in. null when its pending.
- blockNumber: QUANTITY - block number where this transaction was in. null when it's pending.
- from: DATA, 20 Bytes - address of the sender.
- gas: QUANTITY - gas provided by the sender.
- gasPrice: QUANTITY - gas price provided by the sender in Wei.
- hash: DATA, 32 Bytes - hash of the transaction.
- input: DATA - the data sent along with the transaction.
- nonce: QUANTITY - the number of transactions made by the sender prior to this one.
- to: DATA, 20 Bytes - address of the receiver. null when it's a contract creation transaction.
- transactionIndex: QUANTITY - integer of the transactions index position in the block. null when its pending.
- value: QUANTITY - value transferred in Wei.
- v: QUANTITY - ECDSA recovery id
- r: DATA, 32 Bytes - ECDSA signature r
- s: DATA, 32 Bytes - ECDSA signature s
5. eth_getTransactionCount
Parameters:
- Data - 20 Bytes - address.
- Block - integer block number, or the string "latest", "earliest" or "pending"
Returns:
- QUANTITY - integer of the number of transactions sent from this address.
6. eth_getBalance
Parameters:
- Data - 20 Bytes - address to check for the balance.
- Block - integer block number, or the string "latest", "earliest" or "pending"
Returns:
- QUANTITY - integer of the current balance for the given address in Wei.
7.eth_getCode
Parameters:
- Data - 20 Bytes - address.
- Blcok - integer block number, or the string "latest", "earliest" or "pending"
Returns:
- DATA - the code from the given address.
8. eth_getStorageAt
Parameters:
- Data - 20 Bytes - address.
- Quantity - integer of the position in the storage.
- Block - integer block number, or the string "latest", "earliest" or "pending"
Returns:
- DATA - the value at this storage position.
9. eth_accounts
Note! Since Alchemy does not store keys, this will always return empty.
Parameters:
- none
Returns:
- Array of DATA - 20 Bytes - addresses owned by the client.
10. eth_getProof
Parameters:
- Data - 20 Bytes - address.
- Array - 32 Bytes - an array of storage-keys which should be proofed and included. See eth_getStorageAt.
- Blcok - integer block number, or the string "latest", "earliest" or "pending"
Returns:
Object - A account object:
- balance: QUANTITY - the balance of the account. See "eth_getBalance".
- codeHash: DATA, 32 Bytes - hash of the code of the account. For a simple Account without code it will return "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"
- nonce: QUANTITY, - nonce of the account. See "eth_getTransactionCount"`
- storageHash: DATA, 32 Bytes - SHA3 of the StorageRoot. All storage will deliver a MerkleProof starting with this rootHash.
- accountProof: ARRAY - Array of rlp-serialized MerkleTree-Nodes, starting with the stateRoot-Node, following the path of the SHA3 (address) as key.
- storageProof: ARRAY - Array of storage entries as requested. Each entry is an object with these properties:
- key: QUANTITY - the requested storage key
- value: QUANTITY - the storage value
- proof: ARRAY - Array of rlp-serialized MerkleTree-Nodes, starting with the storageHash-Node, following the path of the SHA3 (key) as a path.
11. eth_call
Parameters:
- From - 20 Bytes - (optional) The address the transaction is sent from.
- To - 0 Bytes - The address to the transaction is directed to.
- Gas - (optional) Integer of the gas provided for the transaction execution.
- GasPrice - (optional) Integer of the gasPrice used for each paid gas. Note: most of our users (95%+) never set the gasPrice on eth_call.
- Value - (optional) Integer of the value sent with this transaction.
- Data - (optional) Hash of the method signature and encoding parameters. For details see the Contract ABI
- Block - integer block number, or the string "latest", "earliest" or "pending"
Note! ** **eth_call has a timeout restriction at the node level. Batching multiple eth_calls together on-chain using pre-deployed smart contracts might result in unexpected timeouts that cause none of your calls to complete. Instead, consider serializing these calls, or using smaller batches if they fail with a node error code.
Returns:
- DATA - the return value of the executed contract.
12.eth_getLogs
Parameters:
- Address - 20 Bytes - (optional) Contract address or a list of addresses from which logs should originate.
- Topics - Array of DATA, - (optional) Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with "or" options. Check out more details on how to format topics in eth_newFilter.
- BlockHash - DATA, 32 Bytes - (optional) With the addition of EIP-234 (Geth >= v1.8.13 or Parity >= v2.1.0), blockHash is a new filter option which restricts the logs returned to the single block with the 32-byte hash blockHash. Using blockHash is equivalent to fromBlock = toBlock = the block number with hash blockHash. If blockHash is present in the filter criteria, then neither fromBlock nor toBlock is allowed.
Returns:
Array - Array of log objects, or an empty array if nothing has changed since the last poll.
- For filters created with eth_newBlockFilter the return are block hashes (DATA, 32 Bytes), e.g. ["0x3454645634534..."].
- For filters created with eth_newPendingTransactionFilter the return are transaction hashes (DATA, 32 Bytes), e.g. ["0x6345343454645..."].
- For filters created with eth_newFilter logs are objects with the following params:
- removed: TAG - true when the log was removed, due to a chain reorganization. false if it's a valid log.
- logIndex: QUANTITY - integer of the log index position in the block. null when it's pending log.
- transactionIndex: QUANTITY - integer of the transactions index position log was created from. null when it's pending log.
- transactionHash: DATA, 32 Bytes - hash of the transactions this log was created from. null when it's pending log.
- blockHash: DATA, 32 Bytes - hash of the block where this log was in. null when it's pending. null when it's pending log.
- blockNumber: QUANTITY - the block number where this log was in. null when it's pending. null when it's pending log.
- address: DATA, 20 Bytes - address from which this log originated.
- data: DATA - contains one or more 32 Bytes non-indexed arguments of the log.
- topics: Array of DATA - Array of 0 to 4 32 Bytes DATA of indexed log arguments.
- In solidity: The first topic is the hash of the signature of the event (e.g. Deposit(address,bytes32,uint256)), except you declare the event with the anonymous specifier.
13. eth_protocolVersion
Parameters:
- none
Returns:
- String - The current Ethereum protocol version.
14. eth_gasPrice
Parameters:
- none
Returns:
- QUANTITY - integer of the current gas price in Wei.
15. eth_estimateGas
Note! The estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance. Estimates are served directly from nodes, we're not doing anything special to the value so the rest of the network is likely seeing the same.
Parameters:
- to - 20 Bytes - The address to the transaction is directed to.
Returns:
- QUANTITY - the amount of gas used.
16. eth_feeHistory
Parameters:
- BLOCKCOUNT- Number of blocks in the requested range. Between 1 and 1024 blocks can be requested in a single query. Less than requested may be returned if not all blocks are available.
- NEWSTBLOCK- Highest number block of the requested range.
- REWARDPERCENTILES- (optional) A monotonically increasing list of percentile values to sample from each block's effective priority fees per gas in ascending order, weighted by gas used.
Returns:
Object
- OLDESTBLOCK - Lowest number block of the returned range.
- BASEFEEPERGAS - An array of block base fees per gas. This includes the next block after the newest of the returned range because this value can be derived from the newest block. Zeroes are returned for pre-EIP-1559 blocks.
- GASUSEDRATIO - An array of block gas-used ratios. These are calculated as the ratio of gasUsed and gasLimit.
- REWARD - (Optional) An array of effective priority fees per gas data points from a single block. All zeroes are returned if the block is empty.
17. eth_maxPriorityFeePerGas
Note! This method is not currently supported on Kovan
Parameters:
- none
Returns:
- QUANTITY - the estimated priority fee per gas
18. eth_chainId
Parameters:
- none
Returns:
- QUANTITY - integer of the current chain ID.
19. net_version
Parameters:
- none
Returns:
String - The current network id.
- "1": Ethereum Mainnet
- "2": Morden Testnet (deprecated)
- "3": Ropsten Testnet
- "4": Rinkeby Testnet
- "42": Kovan Testnet
20. net_listening
Parameters:
- none
Returns:
- Boolean - true when listening, otherwise false.
21. eth_getUncleByBlockNumberAndIndex
Parameters:
- Block- a block number, or the string "earliest", "latest" or "pending",
- Quantity- the uncle's index position.
Returns:
Object - A block object with the following fields, or null when no block was found:
- number: QUANTITY - the block number. null when it's pending block.
- hash: DATA, 32 Bytes - hash of the block. null when itβs a pending block.
- parentHash: DATA, 32 Bytes - hash of the parent block.
- nonce: DATA, 8 Bytes - hash of the generated proof-of-work. null when it's a pending block.
- sha3Uncles: DATA, 32 Bytes - SHA3 of the uncle's data in the block.
- logsBloom: DATA, 256 Bytes - the bloom filter for the logs of the block. null when it's a pending block.
- transactionsRoot: DATA, 32 Bytes - the root of the transaction trie of the block.
- stateRoot: DATA, 32 Bytes - the root of the final state trie of the block.
- receiptsRoot: DATA, 32 Bytes - the root of the receipts trie of the block.
- miner: DATA, 20 Bytes - the address of the beneficiary to whom the mining rewards were given.
- difficulty: QUANTITY - integer of the difficulty for this block.
- totalDifficulty: QUANTITY - integer of the total difficulty of the chain until this block.
- extraData: DATA - the "extra data" field of this block.
- size: QUANTITY - integer the size of this block in bytes.
- gasLimit: QUANTITY - the maximum gas allowed in this block.
- gasUsed: QUANTITY - the total used gas by all transactions in this block.
- timestamp: QUANTITY - the unix timestamp for when the block was collated.
- transactions: Array - Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.
- uncles: Array - Array of uncle hashes.
22.eth_getUncleByBlockHashAndIndex
Parameters:
- Block- 32 Bytes - hash of a block.
- Quantity- the uncle's index position.
Returns:
Object - A block object with the following fields, or null when no block was found:
- number: QUANTITY - the block number. null when it's a pending block.
- hash: DATA, 32 Bytes - hash of the block. null when it's a pending block.
- parentHash: DATA, 32 Bytes - hash of the parent block.
- nonce: DATA, 8 Bytes - hash of the generated proof-of-work. null when its a pending block.
- sha3Uncles: DATA, 32 Bytes - SHA3 of the uncle's data in the block.
- logsBloom: DATA, 256 Bytes - the bloom filter for the logs of the block. null when it's a pending block.
- transactionsRoot: DATA, 32 Bytes - the root of the transaction trie of the block.
- stateRoot: DATA, 32 Bytes - the root of the final state trie of the block.
- receiptsRoot: DATA, 32 Bytes - the root of the receipts trie of the block.
- miner: DATA, 20 Bytes - the address of the beneficiary to whom the mining rewards were given.
- difficulty: QUANTITY - integer of the difficulty for this block.
- totalDifficulty: QUANTITY - integer of the total difficulty of the chain until this block.
- extraData: DATA - the "extra data" field of this block.
- size: QUANTITY - integer the size of this block in bytes.
- gasLimit: QUANTITY - the maximum gas allowed in this block.
- gasUsed: QUANTITY - the total used gas by all transactions in this block.
- timestamp: QUANTITY - the UNIX timestamp for when the block was collated.
- transactions: Array - Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.
- uncles: Array - Array of uncle hashes.
23. eth_getUncleCountByBlockHash
Parameters:
- Data - 32 Bytes - hash of a block.
Returns:
- QUANTITY - integer of the number of uncles in this block.
24. eth_getUncleCountByBlockNumber
Parameters:
- Block - integer of a block number, or the string "latest", "earliest" or "pending"
Returns:
- QUANTITY - integer of the number of uncles in this block.
25. eth_newPendingTransactionFilter
Parameters:
- None
Returns:
- QUANTITY - A filter id.
26. eth_uninstallFilter
Parameters:
- Quantity - The filter id.
Returns:
- Boolean - true if the filter was successfully uninstalled, otherwise false.
27. eth_getTransactionReceipt
Note! the receipt is not available for pending transactions.
Parameters:
- Data - 32 Bytes - hash of a transaction
Returns:
Object - A transaction receipt object, or null when no receipt was found:
- transactionHash: DATA, 32 Bytes - hash of the transaction.
- transactionIndex: QUANTITY - integer of the transactions index position in the block.
- blockHash: DATA, 32 Bytes - hash of the block where this transaction was in.
- blockNumber: QUANTITY - block number where this transaction was in.
- from: DATA, 20 Bytes - address of the sender.
- to: DATA, 20 Bytes - address of the receiver. null when it's a contract creation transaction.
- cumulativeGasUsed: QUANTITY - The total amount of gas used when this transaction was executed in the block.
- gasUsed: QUANTITY - The amount of gas used by this specific transaction alone.
- contractAddress: DATA, 20 Bytes - The contract address created, if the transaction was a contract creation, otherwise null.
- logs: Array - Array of log objects, which this transaction generated.
- logsBloom: DATA, 256 Bytes - Bloom filter for light clients to quickly retrieve related logs.
It also returns either:
- root: DATA 32 bytes of post-transaction stateroot (pre Byzantium)
- status: QUANTITY either 1 (success) or 0 (failure)
28. eth_getBlockTransactionCountByHash
Parameters:
- Data - 32 Bytes - hash of a block.
Returns:
- QUANTITY - integer of the number of transactions in this block.
29. eth_getBlockTransactionCountByNumber
Parameters:
- Block - integer of a block number, or the string "earliest", "latest" or "pending"
Returns:
- QUANTITY - integer of the number of transactions in this block.
30. eth_getTransactionByBlockHashAndIndex
Parameters:
- Data - 32 Bytes - hash of a block.
- Quantity- integer of the transaction index position.
Returns:
Object - A transaction object, or null when no transaction was found:
- blockHash: DATA, 32 Bytes - hash of the block where this transaction was in. null when it's pending.
- blockNumber: QUANTITY - block number where this transaction was in. null when it's pending.
- from: DATA, 20 Bytes - address of the sender.
- gas: QUANTITY - gas provided by the sender.
- gasPrice: QUANTITY - gas price provided by the sender in Wei.
- hash: DATA, 32 Bytes - hash of the transaction.
- input: DATA - the data sent along with the transaction.
- nonce: QUANTITY - the number of transactions made by the sender prior to this one.
- to: DATA, 20 Bytes - address of the receiver. null when it's a contract creation transaction.
- transactionIndex: QUANTITY - integer of the transactions index position in the block. null when it's pending.
- value: QUANTITY - value transferred in Wei.
- v: QUANTITY - ECDSA recovery id
- r: DATA, 32 Bytes - ECDSA signature r
- s: DATA, 32 Bytes - ECDSA signature s
31. eth_getTransactionByBlockNumberAndIndex
Parameters:
- Block - 32 Bytes - hash of a block.
- Quantity- integer of the transaction index position.
Returns:
Object - A transaction object, or null when no transaction was found:
- blockHash: DATA, 32 Bytes - hash of the block where this transaction was in. null when its pending.
- blockNumber: QUANTITY - block number where this transaction was in. null when it's pending.
- from: DATA, 20 Bytes - address of the sender.
- gas: QUANTITY - gas provided by the sender.
- gasPrice: QUANTITY - gas price provided by the sender in Wei.
- hash: DATA, 32 Bytes - hash of the transaction.
- input: DATA - the data sent along with the transaction.
- nonce: QUANTITY - the number of transactions made by the sender prior to this one.
- to: DATA, 20 Bytes - address of the receiver. null when it's a contract creation transaction.
- transactionIndex: QUANTITY - integer of the transactions index position in the block. null when it is pending.
- value: QUANTITY - value transferred in Wei.
- v: QUANTITY - ECDSA recovery id
- r: DATA, 32 Bytes - ECDSA signature r
- s: DATA, 32 Bytes - ECDSA signature s
32. eth_sendRawTransaction
Parameters:
- Data - The signed transaction data.
Returns:
- DATA - 32 Bytes - the transaction hash, or the zero hash if the transaction is not yet available.
Use "eth_sendRawTransaction" to get the contract address after the transaction was mined when you created a contract.
33. eth_newBlockFilter
Parameters:
- None
Returns:
- QUANTITY - A filter id.
34. eth_getFilterChanges
Parameters:
- Quantity - the filter id.
Returns:
Array - Array of log objects, or an empty array if nothing has changed since the last poll.
Note! "eth_getFilterChanges" only returns logs since the filter was created, regardless of the block passed in to create the filter. To get logs ranging from a specific block you should use "eth_getLogs".
- For filters created with eth_newBlockFilter the return are block hashes (DATA, 32 Bytes), e.g. ["0x3454645634534..."].
- For filters created with eth_newPendingTransactionFilter the return are transaction hashes (DATA, 32 Bytes), e.g. ["0x6345343454645..."].
- For filters created with eth_newFilter logs are objects with the following params:
- removed: TAG - true when the log was removed, due to a chain reorganization. false if it's a valid log.
- logIndex: QUANTITY - integer of the log index position in the block. null when it's pending log.
- transactionIndex: QUANTITY - integer of the transactions index position log was created from. null when it's pending log.
- transactionHash: DATA, 32 Bytes - hash of the transactions this log was created from. null when it's pending log.
- blockHash: DATA, 32 Bytes - hash of the block where this log was in. null when it's pending. null when it's pending log.
- blockNumber: QUANTITY - the block number where this log was in. null when it's pending. null when it's pending log.
- address: DATA, 20 Bytes - address from which this log originated.
- data: DATA - contains one or more 32 Bytes non-indexed arguments of the log.
- topics: Array of DATA - Array of 0 to 4 32 Bytes DATA of indexed log arguments.
- In solidity: The first topic is the hash of the signature of the event (e.g. Deposit(address,bytes32,uint256)), except you declare the event with the anonymous specifier.
35. eth_getFilterLogs
This method only works for filters created with eth_newFilter, not for filters created using eth_newBlockFilter or eth_newPendingTransactionFilter, which will return "filter not found".
Parameters:
- Quantity - the filter id.
Returns:
- For filters created with eth_newBlockFilter the return are block hashes (DATA, 32 Bytes), e.g. ["0x3454645634534..."].
- For filters created with eth_newPendingTransactionFilter the return are transaction hashes (DATA, 32 Bytes), e.g. ["0x6345343454645..."].
- For filters created with eth_newFilter logs are objects with the following params:
- removed: TAG - true when the log was removed, due to a chain reorganization. false if it's a valid log.
- logIndex: QUANTITY - integer of the log index position in the block. null when it's pending log.
- transactionIndex: QUANTITY - integer of the transactions index position log was created from. null when it's pending log.
- transactionHash: DATA, 32 Bytes - hash of the transactions this log was created from. null when it's pending log.
- blockHash: DATA, 32 Bytes - hash of the block where this log was in. null when it's pending. null when it's pending log.
- blockNumber: QUANTITY - the block number where this log was in. null when it's pending. null when it's pending log.
- address: DATA, 20 Bytes - address from which this log originated.
- data: DATA - contains one or more 32 Bytes non-indexed arguments of the log.
- topics: Array of DATA - Array of 0 to 4 32 Bytes DATA of indexed log arguments.
- In solidity: The first topic is the hash of the signature of the event (e.g. Deposit(address,bytes32,uint256)), except you declare the event with the anonymous specifier.
36. eth_newFilter
Parameters:
- FromBlock- (optional, default: "latest") Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions.
- ToBlock - (optional, default: "latest") Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions.
Returns:
- QUANTITY - A filter id.
37. web3_clientVersion
Parameters:
- none
Returns:
- String - The current client version
38. eth_subscribe
Parameters:
- name - subscription name.
Returns :
- If successful this returns the subscription id.
39. eth_unsubscribe
Parameters:
- id - subscription id.
Returns:
- If successful this returns true.
40. web3_sha3
Parameters:
- Data - the data in hex form to convert into a SHA3 hash
Returns:
- DATA - The SHA3 result of the given string.
41. eth_syncing
Parameters:
- none
Returns:
Object|Boolean, An object with sync status data or FALSE, when not syncing:
- startingBlock: QUANTITY - The block at which the import started (will only be reset, after the sync reached his head)
- currentBlock: QUANTITY - The current block, same as eth_blockNumber
- highestBlock: QUANTITY - The estimated highest block
42. getNFTs
Gets all NFTs currently owned by a given address
Parameters:
- URL - Base URL https://eth-mainnet.alchemyapi.io/nft/v2 https://eth-rinkeby.g.alchemy.com/nft/v2 https://eth-goerli.g.alchemy.com/nft/v2 https://polygon-mainnet.g.alchemyapi.io/nft/v2 https://polygon-mumbai.g.alchemy.com/nft/v2
- owner - address for NFT owner (can be in ENS format!)
- pageKey - (optional) UUID for pagination. If more results are available, a UUID pageKey will be returned in the response. Pass that UUID into pageKey to fetch the next 100 NFTs.
NOTE: pageKeys expire after 10 minutes.
- contractAddresses[] - (optional) [array of strings] (optional) array of contract addresses to filter the responses with. Max limit 20 contracts.
- withMetadata - (optional) [boolean] true by default (optional); if boolean is set to true the query will include metadata for each returned token.
- filters - (optional) [array of ENUMS] (optional) array of filters (as string ENUMS) that will be applied to the query. NFTs that match one or more of these filters will be excluded from the response. NOTE: This is a beta feature. Valid filter strings include:
NOTE: Setting thewithMetadataparameter to false will reduce payload size and may result in a faster API call.
:::
NOTE on Pagination:
We paginate our responses with a default limit of 100 responses. We've chosen this number via thorough testing to determine the best balance of reliability and speed.
In the future, you will be able to specify your own default size. If the owner has more than 100 nfts, we'll provide a pageKey you can include in the next request to return the remaining responses. This uses cursor-based pagination with an idempotent result.
This means if you provide one it serves as a static reference to the NFTs owned at the time of the first call. This means if an owner acquires or transfers an NFT in between a paginated call, this will NOT be reflected.
Returns: (by default)
- ownedNfts(lsit) :
- contract address: address of NFT contract.
- id tokenId: Id for NFT (hex).
- id tokenMetadata tokenType: "ERC721" or "ERC1155".
- balance: token balance.
- title: name of the NFT asset.
- description: brief human-readable description.
- tokenUri raw: URI representing the location of the NFT's original metadata blob. This is a backup for you to parse when the metadata field is not automatically populated.
- tokenUri gateway: public gateway URI for the raw URI above.
- media (list) :
- raw: URI representing the location of the NFT media asset. This is a backup for you to parse when the metadata field is not automatically populated.
- gateway: public gateway URI for the raw asset above.
- thumbnail - Alchemy-hosted thumbnail-sized NFT media (256 pixels by 256 pixels)
- mimeType - label identifying the type of NFT media file (ie. png, jpg, gif, etc.) NOTE: Where possible, Alchemy-hosted NFT media are used in the gateway /thumbnail fields and feature a Cloudinary URL for faster loading times. These links can be configured for image resizing. For more info on using Alchemy-hosted media, see this doc.
- metadata name: Name of the NFT asset.
- metadata description: human-readable description of the NFT asset. (Markdown is supported/rendered on OpenSea and other NFT platforms)
- metadata image: URL to the NFT asset image. They can be standard URLs pointing to images on conventional servers, IPFS, or Arweave. Most types of images (SVGs, PNGs, JPEGs, etc.) are supported by NFT marketplaces.
- metadata external_url: The image URL that appears alongside the asset image on NFT platforms.
- metadata attributes: (list): traits/attributes/characteristics for each NFT asset
- timeLastUpdate - ISO timestamp of the last cache refresh for the information returned in the metadata field.
- metadata background_color - Background colour of the NFT item. Usually must be defined as a six-character hexadecimal
- TotalCount - total number of NFTs owned by the given address.
- blockHash - the canonical head block hash of when your request was received.
NOTE: To parse and view an NFT's media asset, use either the gatewayURI within the media object or the external_url within the metadata object. Visit the FAQ for more info on IPFS gateways.
Select NFT contracts may not have metadata specified by their creator. You may need to parse the response on a case-by-case basis.
Returns: (
withMetadata
= false)- ownedNfts(lsit) :
- contract address: address of NFT contract.
- id tokenId: Id for NFT (hex) .
- balance - token balance.
- totalCount: total number of NFTs owned by the given address.
- blockHash: the canonical head block hash of when your request was received.
43. getNFTMetadata
Gets the metadata associated with a given NFT.
Parameters:
- URL - Base URL https://eth-mainnet.alchemyapi.io/nft/v2 https://eth-rinkeby.g.alchemy.com/nft/v2 https://eth-goerli.g.alchemy.com/nft/v2 https://polygon-mainnet.g.alchemyapi.io/nft/v2 https://polygon-mumbai.g.alchemy.com/nft/v2
- contractAddress - address of NFT contract
- tokenId - Id for NFT
- tokenType - (optional) "ERC721" or "ERC1155"; specifies type of token to query for.
- tokenUriTimeoutInMs - No set timeout by default - When metadata is requested, this parameter is the timeout (in milliseconds) for the website hosting the metadata to respond. If you want to only access the cache and not live fetch any metadata for cache misses then set this value to 0.
- refreshCache - Defaults to false for faster response times. If true will refresh metadata for the given token. If false will check the cache and use it or refresh if the cache doesn't exist.
API requests will perform faster if tokenType is specified!
Returns:
- contract address - contract for returned NFT.
- id tokenId - Id for NFT (integer or hexadecimal, depending on parameter tokenId type).
- id tokenMetadata tokenType - "
ERC721
" or "ERC1155
"
- title - Token title.
- description - human-readable description of the NFT asset. (Markdown is supported/rendered on OpenSea and other NFT platforms)
- tokenUri raw - URI representing the location of the NFT's original metadata blob. This is a backup for you to parse when the metadata field is not automatically populated.
- tokenUri gateway - public gateway URI for the raw URI above.
- media (list) :
- raw - URI representing the location of the NFT media asset. This is a backup for you to parse when the metadata field is not automatically populated.
- gateway - public gateway URI for the raw asset above.
- thumbnail - Alchemy-hosted thumbnail-sized NFT media (256 pixels by 256 pixels)
- metadata image - URL to the NFT asset image. They can be standard URLs pointing to images on conventional servers, IPFS, or Arweave. Most types of images (SVGs, PNGs, JPEGs, etc.) are supported by NFT marketplaces.
- metadata attributes (list) : traits/attributes/characteristics for each NFT asset.For more info on NFT responses: check out the NFT API FAQ.
- timeLastUpdated - ISO timestamp of the last cache refresh for the information returned in the metadata field.
44. getContractMetadata
Queries NFT high-level collection/contract level information
Parameters:
- URL - Base URL https://eth-mainnet.alchemyapi.io/nft/v2 https://eth-rinkeby.g.alchemy.com/nft/v2 https://eth-goerli.g.alchemy.com/nft/v2 https://polygon-mainnet.g.alchemyapi.io/nft/v2 https://polygon-mumbai.g.alchemy.com/nft/v2
- contractAddress - contract address for the NFT collection.
Returns:
- address - contract address for the queried NFT collection.
- contractMetadata name - NFT contract name.
- contractMetadata symbol - NFT contract symbol abbreviation.
- contractMetadata totalSupply - total number of NFTs in a given NFT collection.
- contractMetadata tokenType - "
erc721
" or "erc1155
" NFT token type.
NOTE:
The name, symbol, and totalSupplyfields will only be set in the response if the contract implements functions to return each field.
45. getNFTsForCollection
Gets all NFTs for a given NFT contract
Parameters:
- URL - Base URL https://eth-mainnet.alchemyapi.io/nft/v2 https://eth-rinkeby.g.alchemy.com/nft/v2 https://eth-goerli.g.alchemy.com/nft/v2 https://polygon-mainnet.g.alchemyapi.io/nft/v2 https://polygon-mumbai.g.alchemy.com/nft/v2
- contractAddress - contract address for the NFT collection.
- withMetadata - (optional) [boolean] true by default (optional); if boolean is set to true the query will include metadata for each returned token.
- startToken - (optional) an offset used for pagination. Can be a hex string, or a decimal.
- limit - (optional) sets the total number of NFTs returned in the response. Defaults to 100.
- tokenUriTimeoutInMs - (optional) No set timeout by default - When metadata is requested, this parameter is the timeout (in milliseconds) for the website hosting the metadata to respond. If you want to only access the cache and not live fetch any metadata for cache misses then set this value to 0.
NOTE onstartToken:
The API response will contain a maximum of 100 tokens. Because many NFT collections include more than 100 tokens, the startToken param is used to paginate results.
If nostartTokenis specified, the query will start from the lowest tokenId. Each response will return a nextTokenthat can be passed back to the API as a startToken to return the next page of results for the given NFT collection (if applicable). You can also use any tokenId from the collection as the startToken, and the results in the response will start from that offset.
See the 'examples' section for an example of how to use this parameter to fetch all of the NFTS in a collection.
:::
Returns:
- Nftlist(list):
- id tokenId - Hexadecimal token ID for NFT.
- nextToken - An offset used for pagination.
46. getOwnersForCollection
Gets all owners for a given NFT contract
Parameters:
- URL - Base URL https://eth-mainnet.alchemyapi.io/nft/v2 https://eth-rinkeby.g.alchemy.com/nft/v2 https://eth-goerli.g.alchemy.com/nft/v2 https://polygon-mainnet.g.alchemyapi.io/nft/v2 https://polygon-mumbai.g.alchemy.com/nft/v2
- contractAddress - contract address for the NFT collection.
- withTokenBalances - Boolean - [boolean] false by default. If set to true the query will include the token balances per token id for each owner.
- pageKey - Page key for paginated results (see note on pagination).
Returns:
- ownerAddresses - list of all addresses that own one of the NFTs from the queried contract address.
47. getOwnersForToken
Get the owner(s) for a token.
Parameters:
- URL - Base URL https://eth-mainnet.alchemyapi.io/nft/v2 https://eth-rinkeby.g.alchemy.com/nft/v2 https://eth-goerli.g.alchemy.com/nft/v2 https://polygon-mainnet.g.alchemyapi.io/nft/v2 https://polygon-mumbai.g.alchemy.com/nft/v2
- contractAddress - The address of the contract that the token belongs to. We currently support both ERC721 and ERC1155 contracts.
- tokenId - The ID of the token. Can be in hex or decimal format.
Returns:
- owners - A list of strings representing the addresses of the owners.
- For ERC721 tokens the list will contain just a single owner.
- For ERC1155 tokens the list may contain multiple owners if the ERC1155 token in question is semi-fungible or fungible.
48. getSpamContracts
Returns a list of all spam contracts marked by Alchemy.
Parameters:
- URL - Base URL https://eth-mainnet.alchemyapi.io/nft/v2 https://eth-rinkeby.g.alchemy.com/nft/v2 https://eth-goerli.g.alchemy.com/nft/v2 https://polygon-mainnet.g.alchemyapi.io/nft/v2 https://polygon-mumbai.g.alchemy.com/nft/v2
Returns:
- value - A list of contract addresses earmarked as spam by Alchemy.
49. isSpamContract
Returns whether a contract is marked as spam or not by Alchemy.
Parameters:
- URL - Base URL https://eth-mainnet.alchemyapi.io/nft/v2 https://eth-rinkeby.g.alchemy.com/nft/v2 https://eth-goerli.g.alchemy.com/nft/v2 https://polygon-mainnet.g.alchemyapi.io/nft/v2 https://polygon-mumbai.g.alchemy.com/nft/v2
- contractAddress - The NFT contract address in question
Returns:
- boolean :
- true - If the queried contract is marked as spam.
- false - If the queried contract is considered valid
50. reingestContract
Triggers metadata refresh for an entire NFT collection and refreshes stale metadata after a collection reveal/collection changes.
This endpoint is currently in BETA.
Parameters:
- URL - Base URL https://eth-mainnet.alchemyapi.io/nft/v2 https://eth-rinkeby.g.alchemy.com/nft/v2 https://eth-goerli.g.alchemy.com/nft/v2 https://polygon-mainnet.g.alchemyapi.io/nft/v2 https://polygon-mumbai.g.alchemy.com/nft/v2
- contractAddress - The address of the NFT contract/collection that needs to be refreshed
Returns:
- contractAddress - The address of the NFT contract/collection that is refreshing
- reingestionState: The current state of the reingestion request.
- does_not_exist - The contract requested is not an NFT and does not contain proper metadata
- already_queried - Contract already queried
- in_progress - Ingestion in progress
- finished - Ingestion complete
- queued - Ingestion request placed into a queue and awaiting execution
- queue_failed - Queue job incomplete
- progress - Percentage of tokens successfully refreshed
51. getFloorPrice
Returns the floor prices of an NFT collection by the marketplace.
This endpoint is currently in BETA.
Parameters:
- URL - Base URL https://eth-mainnet.alchemyapi.io/nft/v2 https://eth-rinkeby.g.alchemy.com/nft/v2 https://eth-goerli.g.alchemy.com/nft/v2 https://polygon-mainnet.g.alchemyapi.io/nft/v2 https://polygon-mumbai.g.alchemy.com/nft/v2
- contractAddress - The address of the NFT contract/collection that needs to be refreshed
Returns:
- openSea floorPrice - the floor price of the collection on the given marketplace
- openSea priceCurrency - the currency in which the floor price is denominated Typically, denominated in ETH
- openSea retrievedAt - UTC timestamp of when the floor price was retrieved from the marketplace
- openSea collectionUrl - link to the collection on the given marketplace
- looksRare loorPrice - the floor price of the collection on the given marketplace
- looksRare priceCurrency - the currency in which the floor price is denominated Typically, denominated in ETH
- looksRare retrievedAt - UTC timestamp of when the floor price was retrieved from the marketplace
- looksRarecollectionUrl - link to the collection on the given marketplace
52. computeRarity
Computes the rarity of each attribute of an NFT.
Parameters:
- URL - Base URL https://eth-mainnet.alchemyapi.io/nft/v2 https://eth-rinkeby.g.alchemy.com/nft/v2 https://eth-goerli.g.alchemy.com/nft/v2 https://polygon-mainnet.g.alchemyapi.io/nft/v2 https://polygon-mumbai.g.alchemy.com/nft/v2
- contractAddress - Contract address for the NFT collection.
- tokenId - Token ID for the NFT. Can be hex or decimal.
Returns:
- trait_type - (string) Name of the trait category, i.e. Hat, Color, Face, etc.
- value - (string) Value for the trait, i.e. White Cap, Blue, Angry, etc.
- prevalence - (number) Floating point value from 0 to 1 representing the prevalence of this value for this trait type.
53. isHolderOfCollection
Checks whether a wallet holds a NFT in a given collection.
Parameters:
- URL - Base URL https://eth-mainnet.alchemyapi.io/nft/v2 https://eth-rinkeby.g.alchemy.com/nft/v2 https://eth-goerli.g.alchemy.com/nft/v2 https://polygon-mainnet.g.alchemyapi.io/nft/v2 https://polygon-mumbai.g.alchemy.com/nft/v2
- wallet - Wallet address to check for collection ownership.
- contractAddress - Contract address for the NFT collection.
Returns:
- isHolderOfCollection - (boolean) Whether the given wallet owns any token in the given NFT collection.