API ReferenceToken APIGet ApprovalsGet ERC20 token approvalsVersion: 2.0Get ERC20 token approvalsGEThttps://deep-index.moralis.io/api/v2/erc20/approvalsGet ERC20 approvals for one or many wallet addresses and/or contract addresses, ordered by block number in descending order. Supports advanced filtering to specifically include or exclude particular wallet addresses or contract addresses. Supports up to 100 inputs.DEPRECATED ENDPOINTThis API will be deprecated on 4th September 2023. Please subscribe to the Changelog page for further announcements.QUERY PARAMSchainstringThe chain to queryeth0x1goerli0x5sepolia0xaa36a7polygon0x89mumbai0x13881bsc0x38bsc testnet0x61avalanche0xa86afantom0xfapalm0x2a15c308dcronos0x19arbitrum0xa4b1from_blocknumberThe block number from which the approvals will be returnedto_blocknumberThe block number to which the approvals will be returnedlimitnumberThe desired page size of the result.contract_addressesarrayContract addresses to only include (max 100 addresses)No items in the arrayAdd Itemexclude_contractsarrayContract addresses to ignore (max 100 addresses)No items in the arrayAdd Itemwallet_addressesarrayWallet addresses to only include (max 100 addresses)No items in the arrayAdd Itemexclude_walletsarrayWallet addresses to ignore (max 100 addresses)No items in the arrayAdd ItemcursorstringThe cursor returned in the previous response (used to getting the next page).Responses200 objectAPI KEYTest Live APINode.jsPythoncURLGoPHPimport Moralis from 'moralis';try { await Moralis.start({ apiKey: "YOUR_API_KEY" }); const response = await Moralis.EvmApi.token.getErc20Approvals({ "chain": "0x1" }); console.log(response.raw);} catch (e) { console.error(e);}from moralis import evm_apiapi_key = "YOUR_API_KEY"params = { "chain": "eth"}result = evm_api.token.get_erc20_approvals( api_key=api_key, params=params,)print(result)curl --request GET \ --url 'https://deep-index.moralis.io/api/v2/erc20/approvals?chain=eth' \ --header 'accept: application/json' \ --header 'X-API-Key: YOUR_API_KEY' package mainimport ( "fmt" "net/http" "io/ioutil")func main() { url := "https://deep-index.moralis.io/api/v2/erc20/approvals?chain=eth" req, _ := http.NewRequest("GET", url, payload) req.Header.Add("Accept", "application/json") req.Header.Add("X-API-Key", "YOUR_API_KEY") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body))}<?php// Dependencies to install:// $ composer require guzzlehttp/guzzlerequire_once('vendor/autoload.php');$client = new \GuzzleHttp\Client();$response = $client->request('GET', 'https://deep-index.moralis.io/api/v2/erc20/approvals?chain=eth', [ 'headers' => [ 'Accept' => 'application/json', 'X-API-Key' => 'YOUR_API_KEY', ],]);echo $response->getBody();Response Example200 { "cursor": "", "result": { "token_name": "Tether USD", "token_symbol": "USDT", "token_logo": "https://assets.coingecko.com/coins/images/325/large/Tether-logo.png?1598003707", "token_decimals": "6", "contract_address": "0x3105d328c66d8d55092358cf595d54608178e9b5", "transaction_hash": "0xdd9006489e46670e0e85d1fb88823099e7f596b08aeaac023e9da0851f26fdd5", "transaction_index": 204, "log_index": 204, "block_timestamp": "2021-05-07T11:08:35.000Z", "block_number": 12386788, "block_hash": "0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171", "from_wallet": "0x3105d328c66d8d55092358cf595d54608178e9b5", "from_wallet_label": "Binance 1", "to_wallet": "0x3105d328c66d8d55092358cf595d54608178e9b5", "to_wallet_label": "Binance 2", "value": "57732989482831651", "value_decimal": "577329894.8283165", "possible_spam": "false", "verified_collection": "false" }}