API ReferenceToken APIGet Filtered TokensGet Filtered TokensVersion: 2.2Get Filtered TokensPOSThttps://deep-index.moralis.io/api/v2.2/discovery/tokensReturns filtered tokens based on specified metrics and criteria.BODY PARAMchainstringrequiredThe chain ID in hex formatfiltersarrayrequiredArray of filter criteriaRemove filters[0]metricstringThe metric to filter ontimeFramestringThe time frame for the filtergtstringGreater-than value for the filter.ltstringLess-than value for the filter.eqstringEqual to value for the filter.Add ItemsortByobjectSorting criteriametricstringrequiredMetric to sort bytimeFramestringrequiredTime frame for the metrictypestringrequiredSort direction (ASC or DESC)timeFramesToReturnarrayList of time frames to include in the response.No items in the arrayAdd ItemmetricsToReturnarrayMetrics to include in responseNo items in the arrayAdd ItemlimitnumberMaximum number of results to returnResponses200 Returns filtered token dataobjectAPI KEYTest Live APINode.jsPythoncURLGoPHP// Dependencies to install:// $ npm install node-fetch --save// add "type": "module" to package.jsonimport fetch from 'node-fetch';const options = { method: 'POST', headers: { accept: 'application/json', 'content-type': 'application/json', 'X-API-Key': 'YOUR_API_KEY' }, body: JSON.stringify({ "chain": "0x1", "filters": [ { "metric": "experiencedBuyers", "timeFrame": "oneMonth", "gt": "10" } ], "sortBy": { "metric": "experiencedBuyers", "timeFrame": "oneMonth", "type": "DESC" }, "limit": 5 })};fetch('https://deep-index.moralis.io/api/v2.2/discovery/tokens', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));# Dependencies to install:# $ python -m pip install requestsimport requestsurl = "https://deep-index.moralis.io/api/v2.2/discovery/tokens"payload = { "chain": "0x1", "filters": [ { "metric": "experiencedBuyers", "timeFrame": "oneMonth", "gt": "10" } ], "sortBy": { "metric": "experiencedBuyers", "timeFrame": "oneMonth", "type": "DESC" }, "limit": 5}headers = { "Accept": "application/json", "Content-Type": "application/json", "X-API-Key": "YOUR_API_KEY"}response = requests.request("POST", url, json=payload, headers=headers)print(response.text)curl --request POST \ --url 'https://deep-index.moralis.io/api/v2.2/discovery/tokens' \ --header 'accept: application/json' \ --header 'X-API-Key: YOUR_API_KEY' \ --header 'content-type: application/json' \ --data '{ "chain": "0x1", "filters": [ { "metric": "experiencedBuyers", "timeFrame": "oneMonth", "gt": "10" } ], "sortBy": { "metric": "experiencedBuyers", "timeFrame": "oneMonth", "type": "DESC" }, "limit": 5}'package mainimport ( "fmt" "strings" "net/http" "io/ioutil")func main() { url := "https://deep-index.moralis.io/api/v2.2/discovery/tokens" payload := strings.NewReader("{\"chain\":\"0x1\",\"filters\":[{\"metric\":\"experiencedBuyers\",\"timeFrame\":\"oneMonth\",\"gt\":\"10\"}],\"sortBy\":{\"metric\":\"experiencedBuyers\",\"timeFrame\":\"oneMonth\",\"type\":\"DESC\"},\"limit\":5}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Accept", "application/json") req.Header.Add("Content-Type", "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('POST', 'https://deep-index.moralis.io/api/v2.2/discovery/tokens', [ 'body' => '{"chain":"0x1","filters":[{"metric":"experiencedBuyers","timeFrame":"oneMonth","gt":"10"}],"sortBy":{"metric":"experiencedBuyers","timeFrame":"oneMonth","type":"DESC"},"limit":5}', 'headers' => [ 'Accept' => 'application/json', 'X-API-Key' => 'YOUR_API_KEY', 'Content-Type' => 'application/json', ],]);echo $response->getBody();Response Example200 Returns filtered token data{ "metadata": { "tokenAddress": "0x55d398326f99059ff775485246999027b3197955", "chainId": "0x1", "name": "Tether USD", "symbol": "USDT", "decimals": 18, "logo": "https://example.com/logo.png", "blockNumberMinted": 176416, "usdPrice": 0.9982436729635321, "security": { "isOpenSource": true, "isProxy": "", "isMintable": true, "hiddenOwner": "", "buyTax": "0", "sellTax": "0", "cannotBuy": "", "cannotSellAll": "", "isHoneyPot": "" } }}