diff --git a/MYAPI b/MYAPI new file mode 100644 index 0000000..e7a4885 --- /dev/null +++ b/MYAPI @@ -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));