3rd Party Compatible APIs ========================== Rivet's third party compatibility APIs require a Bolt membership. You can add a Bolt membership to your plan at `rivet.cloud/update-plan `_. The following APIs are designed to be API compatible with different third party endpoints. Responses are intended to be "happy path compatible" with the third party endpoints - that is under some error conditions responses may not be exactly identical. Additionally, in some cases where aggregations or estimates are involved responses may not be identical, but should be comparable and fit for the same purposes. Additionally, our APIs will generally provide addresses in checksummed formats, while third party equivalents may not. .. note:: We generally encourage people to prefer the equivalent RPC endpoints, which tend to be better optimized. We provide these APIs for backwards compatibility with applications built for third party providers, but new applications can get the same information through Flume RPC calls. Etherscan Compatible -------------------- Rivet implements the following Etherscan compatible APIs. All Etherscan compatible API calls are of the form: :: https://YourApiKey.eth.compat.rivet.cloud/api?module=$MODULE&action=$ACTION With additional parameters to be documented below. Account Transaction List ++++++++++++++++++++++++ Returns transactions and receipt data where the specified address is either the sender, recipient, or the contract created by a transaction. :: curl 'https://YourApiKey.eth.compat.rivet.cloud/api?module=account&action=txlist&address=0xdde19c145c1ee51b48f7a28e8df125da0cc440be' The following parameters are available: - ``address`` (required): The Ethereum address to look up related transactions. - ``startblock`` (default ``0``): The beginning of the block range to inspect. - ``endblock`` (default ``99999999``): The end of the block range to inspect. - ``offset`` (default ``10000``): The maximum number of records to be returned. - ``page`` (default ``1``): The page number (assuming each page has a size of ``offset``) - ``sort`` (default ``asc``): Whether records should be sorted ascending (``asc`` - earliest records first) or descending (``desc`` - oldest records first). .. note:: The behavior of the ``isError`` field of transactions within this API is not documented by Etherscan, and our implementation differs in some cases. We define ``isError`` to be ``true`` if the transaction reverted, or failed for other reasons (such as invalid opcodes), and ``false`` otherwise. Account Token Transfer List +++++++++++++++++++++++++++ Returns information about ERC20 token transfers, including several pieces of information about the transaction in which the token transfer occurred. :: curl 'https://YourApiKey.eth.compat.rivet.cloud/api?module=account&action=tokentx&address=0xdde19c145c1ee51b48f7a28e8df125da0cc440be' The following parameters are available: - ``address`` (required): The Ethereum address to look up related token transfers. - ``startblock`` (default ``0``): The beginning of the block range to inspect. - ``endblock`` (default ``99999999``): The end of the block range to inspect. - ``offset`` (default ``10000``): The maximum number of records to be returned. - ``page`` (default ``1``): The page number (assuming each page has a size of ``offset``) - ``sort`` (default ``desc``): Whether records should be sorted ascending (``asc`` - earliest records first) or descending (``desc`` - oldest records first). Account NFT Token Transfer List ++++++++++++++++++++++++++++++++ Returns information about ERC721 token transfers, including several pieces of information about the transaction in which the token transfer occurred. :: curl 'https://YourApiKey.eth.compat.rivet.cloud/api?module=account&action=tokennfttx&address=0xdde19c145c1ee51b48f7a28e8df125da0cc440be' The following parameters are available: - ``address`` (required): The Ethereum address to look up related nft transfers. - ``startblock`` (default ``0``): The beginning of the block range to inspect. - ``endblock`` (default ``99999999``): The end of the block range to inspect. - ``offset`` (default ``10000``): The maximum number of records to be returned. - ``page`` (default ``1``): The page number (assuming each page has a size of ``offset``) - ``sort`` (default ``desc``): Whether records should be sorted ascending (``asc`` - earliest records first) or descending (``desc`` - oldest records first). Account Get Mined Blocks ++++++++++++++++++++++++ Get mined blocks by account, including block number, timestamp, and reward. Note that at this time Bolt does not support retrieving uncles with this method. :: curl 'https://YourApiKey.eth.compat.rivet.cloud/api?module=account&action=getminedblocks&address=0x9dd134d14d1e65f84b706d6f205cd5b1cd03a46b' - ``address`` (required): The Ethereum address to look up related nft transfers. - ``startblock`` (default ``0``): The beginning of the block range to inspect. - ``endblock`` (default ``99999999``): The end of the block range to inspect. - ``offset`` (default ``10000``): The maximum number of records to be returned. - ``page`` (default ``1``): The page number (assuming each page has a size of ``offset``) Block Countdown +++++++++++++++ Get the number of remaining blocks and the estimated remaining time in seconds until a particular block is mined. :: curl 'https://YourApiKey.eth.compat.rivet.cloud/api?module=block&action=getblockcountdown&blockno=12000000' - ``blockno`` (required): The block to countdown to Block Number By Time ++++++++++++++++++++ :: curl 'https://YourApiKey.eth.compat.rivet.cloud/api?module=block&action=getblocknobytime×tamp=1600000000&closest=before' - ``timestamp`` (required): The unix timestamp (in seconds) of the target block - ``closest`` (default ``before``): Whether to get the closest block before or the closest block after the specified time. Token Info ++++++++++ :: https://YourApiKey.eth.compat.rivet.cloud/api?module=token&action=tokeninfo&contractaddress=0xe41d2489571d322189246dafa5ebde1f4699f498 - ``contractraddress`` (required): The contract address to get token info about.