Integrate auto cryptocurrencies price update to Notion and archive database.
python3 -m pip install -r requirements.txt
NOTION_VERSION: <insert-API-notion-version>
NOTION_API_TOKEN: <insert-your-notion-integration-secret-token>
NOTION_TOKEN_V2: <insert-your-notion-integration-internal-token>
NOTION_FILE_TOKEN: <insert-your-notion-file-token>
MY_COINMARKETCAP_APIKEY: <insert-your-coinmarketcap-integration-secret-token>
NOTION_API_TOKEN: It has to be created from your Notion account (https://www.notion.so/my-integrations)
NOTION_VERSION: It is found in the API documentation (https://developers.notion.com/reference/versioning)
NOTION_TOKEN_V2:
NOTION_FILE_TOKEN:
MY_COINMARKETCAP_APIKEY: It is found in your API account (https://pro.coinmarketcap.com/account)
This is the general structure of the database processed:
{
"object": "database",
"title": [
{
"type": "text",
"text": {
"content": "Dashboard",
},
"plain_text": "Dashboard",
}
],
"properties": {
"Token": {
"id": "title",
"name": "Token",
"type": "title",
"title": {}
},
"Market Price": {
"name": "Market Price",
"type": "number",
"number": {
"format": "number"
}
},
"Coins in wallet": {
"name": "Coins in wallet",
"type": "number",
"number": {
"format": "number"
}
},
"Wallet Value (€)": {
"name": "Wallet Value (€)",
"type": "formula",
"formula": {
"expression": "multiply(prop(\"Market Price\"), prop(\"Coins in wallet\"))"
}
}
}
}
python3 main.py
This command will update the notion Dashboard with coins current values and save it in the archives directory as a CSV file.
python processArchive.py
This command will process the archives directory to create a CSV file for wallets evolution throught time.
- https://github.com/tnvmadhav/notion-crypto-integration (update notion database)
- https://github.com/yannbolliger/notion-exporter (donwload database to a CSV file)