/coinmarketcap-to-notion

CoinMarketCap Data to Notion Database

Primary LanguagePythonBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Coinmarketcap To Notion

This project retrieves cryptocurrency data from the CoinMarketCap API and stores it in a Notion database. It allows users to keep track of cryptocurrency prices and other relevant information directly in their Notion workspace.

  • Fetch real-time cryptocurrency data from CoinMarketCap.
  • Store and update data in a Notion database.
  • Easy to set up and run with Python.

How To Installing And Run Project?

  1. Obtain CoinMarketCap API Key

    1. Go to the CoinMarketCap API website.
    2. Sign up for an account if you don't have one.
    3. After logging in, navigate to the API section and create a new API key.
    4. Copy your API key for later use.
  2. Create a Notion Integration

    1. Go to Notion Developers.
    2. Click on "New Integration".
    3. Fill in the required details (name, associated workspace, etc.).
    4. Once created, you will receive an Integration Token. Copy this token for later use.
  3. Share Your Database with the Integration

    1. Open the Notion page that contains the database you want to integrate.
    2. Click on the "Share" button in the top right corner.
    3. In the "Invite" section, search for your integration by name and select it.
    4. Make sure to give it the necessary permissions (e.g., read, write).
  4. Clone the Repository

Clone the repository to your local machine:

git clone https://github.com/yuzaiakira/coinmarketcap-to-notion.git
cd ./coinmarketcap-to-notion/
  1. Set Up Your Environment

    1. Rename a sample.env file to .env file in the root of your project.
    2. Fill the following lines to the .env file:
I_TOKEN= Notion Integration Token
DATABASE_ID= Notion Database ID
COINMARKETCAP_KEY= CoinMarketCap API Key
  1. Install the Required Libraries

You can install the required libraries using pip:

pip install -r ./requirements.txt
  1. Running the Project

Run the script to fetch cryptocurrency data and store it in your Notion database:

python main.py

I hope you enjoy using this project :)