Get any pockets’s full historical past with a single API name. Overlook about calling numerous completely different endpoints, complicated information aggregation, and tiresome transaction decoding. Moralis’ Pockets Historical past endpoint will get you a pockets’s full historical past, full with computerized transaction classes, deal with labels, summaries, and extra!
The Problems with Fetching a Pockets’s Historical past
At Moralis, we perceive the effort concerned with fetching a pockets’s full historical past. For one thing so essential to many Web3 initiatives, this has lengthy required complicated workarounds.
Initiatives historically needed to make numerous API calls and sew collectively transactions, inside transfers, ERC-20, and NFT actions to current a pockets’s historical past, inflicting appreciable complications for builders and growing the possibility for errors. We all know what a ache level this has been for these seeking to construct nice initiatives and who merely wish to current dependable pockets historical past information in a easy method.
Introducing the Pockets Historical past Endpoint
In response, we’ve developed our new Pockets Historical past endpoint. With it, we’re overhauling the steps wanted to current the pockets historical past of a given deal with. Our new endpoint is designed to simplify the method, providing full chronological pockets historical past with a single API name.
The Pockets Historical past endpoint additionally presents computerized categorization throughout a dozen completely different transaction sorts. This implies pockets exercise is immediately decoded and mapped to transaction classes like Ship, Obtain, NFT Ship, NFT Obtain, Token Ship, Token Obtain, Deposit, Withdraw, Token Swap, Airdrop, Mint, Burn, NFT Buy, NFT Sale, Borrow, or Contract Interplay. This lets you present full computerized oversight of customers’ pockets exercise.
Advantages of the Pockets Historical past Endpoint
Full Pockets Insights: With the Pockets Historical past endpoint, builders can now entry a pockets’s total historical past with unprecedented ease. This complete view permits you to simply present all of the transactions, token transfers, and NFT actions of a given pockets. Lowered Complexity and API Calls: Overlook the effort of sewing collectively information from a number of endpoints. Our Pockets Historical past is purpose-built for getting the pockets historical past of a given deal with, and dramatically reduces the variety of API calls. Automated Transaction Categorization: We offer absolutely decoded and human-readable information, mapping every transaction to considered one of 15+ classes. This makes it simpler than ever for builders to know the information and to visually present an summary of customers’ pockets actions.
This endpoint is a game-changer for builders engaged on Web3 wallets, crypto tax functions, DeFi initiatives, and every other platform that requires an in depth understanding of pockets transactions and histories. By streamlining the information retrieval course of and offering enriched, easy-to-understand data, we allow builders to focus extra on creating revolutionary and user-friendly functions.
Pockets Historical past Demo
Accessing all the historical past of a pockets has by no means been simpler. Beneath is a simple script to display the way it works:
//dependencies to put in:
//npm set up node-fetch
//add “kind”: “module” to package deal.json
import fetch from ‘node-fetch’;
const choices = {
technique: ‘GET’,
headers: {
settle for: ‘software/json’,
‘X-API-Key’: ‘YOUR_API_KEY’
},
};
fetch(
‘https://deep-index.moralis.io/api/v2.2/wallets/0xd06Ffc9107649344e7AB9182B685071163276BE8/historical past?chain=eth&order=DESC’,
choices
)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err)); Exchange YOUR_API_KEY together with your Moralis API key.Alter the question parameters as wanted.Execute the script.
In return, you’ll get a response that appears one thing like this:
{
//…
“consequence”: [
{
“hash”: “0xcee9d47cb827d792f7a25b216e32adad475eac490da40a805cef7554ab7eb308”,
“nonce”: “6037420”,
“transaction_index”: “64”,
“from_address”: “0xddfabcdc4d8ffc6d5beaf154f18b778f892a0740”,
“from_address_label”: “Coinbase 3”,
“to_address”: “0xd06ffc9107649344e7ab9182b685071163276be8”,
“to_address_label”: null,
“value”: “449953580000000000”,
“gas”: “21000”,
“gas_price”: “311257923036”,
“receipt_cumulative_gas_used”: “7730854”,
“receipt_gas_used”: “21000”,
“receipt_status”: “1”,
“block_timestamp”: “2022-05-11T13:35:40.000Z”,
“block_number”: “14755151”,
“block_hash”: “0x181942955a0fda682b60cad5d2e9ee76f31fcf6349d7653e0b17ccf948bca758”,
“nft_transfers”: [],
“erc20_transfers”: [],
“method_label”: null,
“native_transfers”: [
{
“from_address”: “0xddfabcdc4d8ffc6d5beaf154f18b778f892a0740”,
“from_address_label”: “Coinbase 3”,
“to_address”: “0xd06ffc9107649344e7ab9182b685071163276be8”,
“to_address_label”: null,
“value”: “449953580000000000”,
“value_formatted”: “0.44995358”,
“direction”: “receive”,
“internal_transaction”: false,
“token_symbol”: “ETH”,
“token_logo”: “https://cdn.moralis.io/eth/0x.png”
}
],
“abstract”: “Acquired 0.45 ETH from 0xdd…0740”,
“possible_spam”: false,
“class”: “obtain”
},
//…
],
}
For a extra detailed tutorial, please discover our Pockets Historical past documentation or take a look at the Moralis YouTube video down under. This clip gives an in-depth information on find out how to successfully make the most of the Pockets Historical past endpoint in real-world functions.
Extra Knowledge. Fewer API Calls.
Moralis streamlines the combination of on-chain information by providing a unified endpoint for accessing a pockets’s full historical past, together with routinely categorized transactions, labeled addresses, and concise summaries.
Expertise the facility and ease of the Pockets Historical past endpoint for your self. We’re assured it should make a major distinction in the way you strategy pockets information in your initiatives.
About Moralis
Moralis is a number one crypto information supplier that helps builders construct nice person experiences, drive engagement, progress and income of their functions. Moralis does this via its scalable, cross-chain APIs that bridge the event hole between Web2 and Web3. Moralis’ suite of APIs consists of the NFT API, Pockets API, Token API, Worth API, Streams API, and lots of different merchandise.