Need help setting up a parser, tasks:
parser for pump coins that are on the Mexc exchange, mainly interested in meme coins with a growth of more than 8% in the pump
Interval 1-5 minutes. Most of the coins are new ones that appeared on the exchange in the last 24 hours. Results to be sent to a Telegram channel via a bot - (the bot is created and configured, the group exists). I will provide the Mexc API key. There is also a Telegram group where messages need to be sent. Instead of a server, my PC will act as the server
The current parser code:
import os
import requests
# Your API token from Mexc
API_KEY = os.getenv('MEXC_API_KEY')
# Telegram bot token
TELEGRAM_BOT_TOKEN = os.getenv('TELEGRAM_BOT_TOKEN')
# chat_id of your group (needs to be replaced with the chat ID)
TELEGRAM_CHAT_ID = os.getenv('TELEGRAM_CHAT_ID')
# API URL to get data from Mexc
url = 'https://www.mexc.com/open/api/v3/market/tickers'
# Make a request to the API
response = requests.get(url)
if response.status_code == 200:
data = response.json() # Convert the response to JSON format
for ticker in data['data']:
symbol = ticker['symbol'] # Coin symbol (e.g., BTC/USDT)
change = ticker['percent'] # Percentage change
market_cap = ticker['market_cap'] # Market capitalization
# If the percentage increase is more than 8%
if float(change) > 8:
# Formulate the message
message = f"{symbol}: {change}% | Market Cap: {market_cap}$\n"
# Send the message to Telegram
telegram_url = f'https://api.telegram.org/bot{TELEGRAM_BOT_TOKEN}/sendMessage?chat_id={TELEGRAM_CHAT_ID}&text={message}'
requests.get(telegram_url)
else:
print(f"Error: {response.status_code}")
for contact tg @ Maksim_Digash
or here on the platform
price is negotiable
just now