Skip to content

Commit

Permalink
Create MYAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
danedane13 authored Nov 12, 2024
1 parent 4e24b07 commit e5b5f4a
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions MYAPI
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
const url = 'https://worldchain-mainnet.g.alchemy.com/v2/ENlAMApDaMPDrLe2zxcdjQpBsWoqEgqt';
const headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
};

const body = JSON.stringify({
id: 1,
jsonrpc: "2.0",
method: "alchemy_getAssetTransfers",
params: [
{
fromBlock: "0x0",
toBlock: "latest",
toAddress: "0x5c43B1eD97e52d009611D89b74fA829FE4ac56b1",
withMetadata: false,
excludeZeroValue: true,
maxCount: "0x3e8",
category: [
"external"
]
}
]
});

fetch(url, {
method: 'POST',
headers: headers,
body: body
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

0 comments on commit e5b5f4a

Please sign in to comment.