|
|
||
|---|---|---|
| src | ||
| .gitignore | ||
| README.md | ||
| package-lock.json | ||
| package.json | ||
README.md
CheckPrice Server
Node.js Express server that checks eBay prices and notifies via Telegram.
Features
- Runs a scheduled check every minute
- Gets eBay access token automatically using refresh token
- Searches eBay items by keyword
- Notifies Telegram group when items are found below price threshold ($650 USD)
Setup
-
Install dependencies:
npm install -
Configure
.envfile:EBAY_CLIENT_ID=your_client_id EBAY_CLIENT_SECRET=your_client_secret EBAY_REFRESH_TOKEN=your_refresh_token TELEGRAM_BOT_TOKEN=your_bot_token TELEGRAM_CHAT_ID=your_chat_id PORT=3000 -
Run the server:
npm start
Configuration
- PRICE_THRESHOLD: Edit in
src/index.jsto change the price threshold (default: $650 USD) - Keywords: Edit the
keywordsarray in the cron job section to search for different items
API Endpoints
GET /health- Health checkPOST /check- Manual trigger with keyword{ "keyword": "your-search-term" }
How It Works
- Every minute, the server runs
checkAndNotify()function - Calls
getEbayAccessToken()to get a valid access token - Calls
searchEbayItems()to search eBay for items - Filters items with price below $650 USD
- Sends notification to Telegram if cheap items found