import requestsimport timefrom pprint import pprintfrom datetime import datetimesolana_token_addresses = set()first_run = True # Флагдляпропускапервоговыводаwhile True:try: # Выполняемзапроск API response = requests.get("https://api.dexscreener.com/token-profiles/latest/v1") data = response.json() # Проверяемтокеныидобавляемновыесоответствующиеусловиям for token in data: if token.get("chainId") == "solana": links = token.get("links", []) # Проверяемналичиехотябыоднойссылкина telegram, Website или twitter has_relevant_link = any( (link.get("type") in ["telegram", "twitter"]) or (link.get("label") == "Website") for link in links ) # Еслиестьссылкиитокенновый, добавляемеговсписоксотметкойвремени if has_relevant_link: token_address = token["tokenAddress"] if token_address not in solana_token_addresses: solana_token_addresses.add(token_address) # Пропускаемвывод, еслиэтопервыйзапуск if not first_run: timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S") print(f"[{timestamp}] New Solana Token Address Found: {token_address}") # Послепервогоциклавыключаемфлаг first_run = False # Задержкадлясоблюдениялимитав 60 запросоввминуту time.sleep(1)except Exception as e: print(f"An error occurred: {e}") time.sleep(1) # Паузапередповторнойпопыткойприошибке
I am writing a program that allows you to output address tokens to the Solana network, which has a paid fee in Dexcsreener.
The thing is that I used the Dexscreener API, but it provides this information with a delay, or rather, when the plaque appears on the site.
The thing is that there are programs and services that provide information about payments, even if there was an advance payment before arriving at the radium, for example, the token is in the pumpfan.
Perhaps my code is not up-to-date enough, it outputs information, or I am using the wrong API, maybe someone can tell me where I can get information for pre-paying plaques.