{"id":22895955,"url":"https://github.com/gabireze/bitcoin-twitter-bot","last_synced_at":"2025-08-23T00:21:46.812Z","repository":{"id":170806834,"uuid":"628444341","full_name":"gabireze/bitcoin-twitter-bot","owner":"gabireze","description":"A Node.js application that posts the latest Bitcoin price, market cap, volume updates, and other financial data on both Twitter and BlueSky.","archived":false,"fork":false,"pushed_at":"2024-09-10T19:32:44.000Z","size":150,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-11T23:08:52.465Z","etag":null,"topics":["bitcoin","bluesky","bot","twitter"],"latest_commit_sha":null,"homepage":"https://x.com/BitcoinFocusNow","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gabireze.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-16T00:48:46.000Z","updated_at":"2024-09-10T19:33:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"96427fdc-a67f-49a8-879c-70054d2629d6","html_url":"https://github.com/gabireze/bitcoin-twitter-bot","commit_stats":null,"previous_names":["gabireze/bitcoin-twitter-bot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabireze%2Fbitcoin-twitter-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabireze%2Fbitcoin-twitter-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabireze%2Fbitcoin-twitter-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabireze%2Fbitcoin-twitter-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gabireze","download_url":"https://codeload.github.com/gabireze/bitcoin-twitter-bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229629257,"owners_count":18101263,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitcoin","bluesky","bot","twitter"],"created_at":"2024-12-13T23:32:57.132Z","updated_at":"2025-07-17T20:37:24.519Z","avatar_url":"https://github.com/gabireze.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bitcoin Twitter \u0026 BlueSky Bot\n\nA Node.js application that posts the latest Bitcoin price, market cap, volume updates, and other financial data on both Twitter and BlueSky. It integrates with the [Twitter API v2](https://developer.twitter.com/en/docs/twitter-api) and the [Bluesky API](https://bsky.app). The application is deployed on AWS, using various AWS services to automate and manage tasks.\n\n## GitAds Sponsored\n[![Sponsored by GitAds](https://gitads.dev/v1/ad-serve?source=gabireze/bitcoin-twitter-bot@github)](https://gitads.dev/v1/ad-track?source=gabireze/bitcoin-twitter-bot@github)\n\n## AWS Services Used\n\n- **AWS Lambda**: The core logic of the application runs as a serverless function in AWS Lambda, handling the process of fetching data, generating content, and posting to Twitter and BlueSky.\n- **AWS S3**: Used to store and manage images, such as screenshots or charts that are posted along with updates.\n- **AWS EventBridge**: Schedules cron jobs to trigger the Lambda function at specific intervals, automating the posts without manual intervention.\n\n## Additional Tools\n\n- **@sparticuz/chromium**: A headless version of Chromium optimized for Lambda, used to take screenshots and scrape information from websites. This is useful for gathering external data and generating visuals for the posts.\n- **Puppeteer**: Used in conjunction with Chromium to automate the process of interacting with websites and collecting data via scraping.\n\n## Prerequisites\n\nBefore running the application, you need to set up accounts and credentials for both Twitter and BlueSky:\n\n### Twitter Setup\n\n1. Set up a Twitter developer account.\n2. Create a new Twitter app.\n3. Obtain the following credentials:\n   - **APP_KEY**: Your Twitter app's API key\n   - **APP_SECRET**: Your Twitter app's API secret key\n   - **ACCESS_TOKEN**: Your Twitter account's access token\n   - **ACCESS_SECRET**: Your Twitter account's access token secret\n\n### BlueSky Setup\n\n1. Create a BlueSky account.\n2. Obtain your BlueSky handle and password.\n   - **BLUESKY_APP_USERNAME**: Your BlueSky handle\n   - **BLUESKY_APP_PASSWORD**: Your BlueSky password\n\nYou will also need Node.js installed, along with the following packages:\n\n## Dependencies\n\nThe following packages are required to run the application:\n\n- **@atproto/api**: Used to interact with the BlueSky API for posting updates.\n- **@aws-sdk/client-s3**: AWS SDK for uploading and managing files in Amazon S3.\n- **@aws-sdk/lib-storage**: Provides utility methods for managing storage in AWS, used for handling uploads to S3.\n- **@aws-sdk/s3-request-presigner**: Helps generate presigned URLs for securely uploading to Amazon S3.\n- **@sparticuz/chromium**: A version of Chromium optimized for use in AWS Lambda environments, used for generating screenshots or headless browsing tasks.\n- **axios**: Promise-based HTTP client used for making API requests (e.g., to CoinGecko for price data).\n- **dotenv**: Loads environment variables from a `.env` file to manage sensitive information.\n- **puppeteer-core**: A headless browser tool for generating screenshots or automating web interactions.\n- **twitter-api-v2**: A wrapper for the Twitter API, used to post updates on Twitter.\n\n## Environment Variables\n\nCreate a `.env` file in the root directory of the project and add your Twitter and BlueSky API credentials, along with other necessary environment variables.\n\n## Installation\n\n1. Clone this repository to your local machine:\n\n   ```bash\n   git clone https://github.com/gabireze/bitcoin-twitter-bot.git\n   ```\n\n2. Install the required packages:\n\n   ```bash\n   cd bitcoin-twitter-bot\n   npm install\n   ```\n\n3. Create a **.env** file in the root directory of the project and add your Twitter and BlueSky API credentials:\n\n```\nAPP_KEY=your-app-key\nAPP_SECRET=your-app-secret\nACCESS_TOKEN=your-access-token\nACCESS_SECRET=your-access-token-secret\n\nBLUESKY_APP_USERNAME=your_bluesky_handle\nBLUESKY_APP_PASSWORD=your_bluesky_password\n\nMY_CUSTOM_ACCESS_KEY_ID=\nMY_CUSTOM_SECRET_ACCESS_KEY=\nAWS_REGION=\nAWS_S3_BUCKET=\nAWS_EXECUTION_ENV=AWS_Lambda_nodejs\nHEADLESS=true\n\nCOINGECKO_API_URL=https://api.coingecko.com/api/v3\nCURRENCY=usd\nCOIN_ID=bitcoin\nFEAR_GREED_INDEX_IMAGE_URL=https://alternative.me/crypto/fear-and-greed-index.png\nFEAR_GREED_INDEX_IMAGE_PATH=./fearAndGreedIndex.png\nFEAR_GREED_INDEX_IMAGE_KEY=fearAndGreedIndex.png\nBITCOIN_MONTHLY_RETURNS_IMAGE_PATH=bitcoinMonthlyReturns.png\nBITCOIN_MONTHLY_RETURNS_IMAGE_KEY=bitcoinMonthlyReturns.png\n```\n\n4. Run the application:\n\n   ```bash\n   npm start\n   ```\n\nThe application will fetch the latest Bitcoin price data from the [CoinGecko API](https://docs.coingecko.com/v3.0.1/reference/introduction), format the data into a tweet, and post it on both Twitter and BlueSky using your account's credentials.\n\n## Customization\n\nYou can customize the application by changing the following variables in the **index.mjs** file:\n\n- **CURRENCY**: the currency in which to display the price and market cap information (default: **\"usd\"**)\n- **COIN_ID**: the CoinGecko ID of the cryptocurrency to track (default: **\"bitcoin\"**)\n- **DAYS**: the number of days of historical data to retrieve from the CoinGecko API (default: **1**)\n  You can also modify the tweet message by editing the **getPriceData** function in the index.mjs file.\n\n## Follow us\n\nStay up to date with the latest #Bitcoin news and price updates by following [@BitcoinFocusNow](https://twitter.com/BitcoinFocusNow) on Twitter and [@bitcoinprice.bsky.social](https://bsky.app/profile/bitcoinprice.bsky.social) on BlueSky!\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](https://opensource.org/license/mit/) file for more information.\n\n\u003c!-- GitAds-Verify: FOIDMP7E98H76ZX3FE1E9JSUE7J8YRAZ --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabireze%2Fbitcoin-twitter-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabireze%2Fbitcoin-twitter-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabireze%2Fbitcoin-twitter-bot/lists"}