市值: $3.2013T -0.570%
體積(24小時): $109.6829B -3.020%
  • 市值: $3.2013T -0.570%
  • 體積(24小時): $109.6829B -3.020%
  • 恐懼與貪婪指數:
  • 市值: $3.2013T -0.570%
Cryptos
主題
Cryptospedia
資訊
CryptosTopics
影片
Top News
Cryptos
主題
Cryptospedia
資訊
CryptosTopics
影片
bitcoin
bitcoin

$96418.721981 USD

-2.05%

ethereum
ethereum

$2687.739314 USD

-2.74%

xrp
xrp

$2.588011 USD

-3.00%

tether
tether

$0.999825 USD

-0.04%

bnb
bnb

$656.326573 USD

0.40%

solana
solana

$171.386564 USD

-2.54%

usd-coin
usd-coin

$1.000043 USD

0.01%

dogecoin
dogecoin

$0.244077 USD

-3.80%

cardano
cardano

$0.767310 USD

-3.77%

tron
tron

$0.237868 USD

-4.90%

chainlink
chainlink

$17.505561 USD

-4.59%

sui
sui

$3.344930 USD

-4.57%

avalanche
avalanche

$24.939290 USD

-1.00%

stellar
stellar

$0.327623 USD

-3.46%

litecoin
litecoin

$129.677981 USD

-3.20%

加密貨幣新聞文章

如何使用Coingecko和Python構建加密價格警報系統

2025/02/22 15:20

加密貨幣市場迅速發展,新硬幣和新興趨勢不斷變化。在本文中,我們將學習如何構建加密價格警報系統

如何使用Coingecko和Python構建加密價格警報系統

This tutorial will guide you through building a crypto price alert system that provides regular email updates on the latest trending coins and categories on CoinGecko, on-chain categories on GeckoTerminal, and sudden surges in trading volume. These insights can be valuable for informing your investment strategy or keeping you up to date with the latest market trends.

本教程將指導您構建一個加密價格警報系統,該系統可定期提供有關Coingecko,壁虎的鍊鍊類別以及交易量突然激增的最新趨勢硬幣和類別的電子郵件更新。這些見解對於告知您的投資策略或使您了解最新市場趨勢可能很有價值。

As usual, you’ll find a link to the GitHub repository at the end of the article. Let's dive in!

像往常一樣,您會在文章末尾找到指向GitHub存儲庫的鏈接。讓我們潛入!

Pre-requisites

先決條件

To obtain a CoinGecko API key, head over to the Developer’s Dashboard and click on +Add New Key in the top right corner. For detailed instructions on generating and setting up your key, refer to this guide.

要獲取CoingeCko API鍵,請轉到開發人員的儀表板,然後單擊右上角的新鍵 +添加新鍵。有關生成和設置密鑰的詳細說明,請參閱本指南。

For this project, we’ll be using the Categories List and Search Queries endpoints in the CoinGecko API. The Categories List endpoint is exclusively available only on the CoinGecko API Analyst tier and higher. As a free alternative, you can comment out the call to this endpoint and rely solely on the Search Queries data.

對於此項目,我們將使用Coingecko API中的類別列表和搜索查詢端點。類別列表端點僅在Coingecko API分析師等級和更高的Coingecko API分析師中可用。作為免費替代方案,您可以評論到此端點的調用,並僅依靠搜索查詢數據。

Step 1. Initializing the project

步驟1。初始化項目

To start, we’ll initialize our project, install package requirements, and safely load our API credentials. First, we'll create an empty directory, which will serve as the root of our project.

首先,我們將初始化我們的項目,安裝包裝要求並安全加載我們的API憑據。首先,我們將創建一個空目錄,該目錄將作為我們項目的根源。

Installing Dependencies

安裝依賴項

Let’s initialize a local Python environment. This will keep the global Python scope clean of any potential library versioning issues:

讓我們初始化當地的Python環境。這將使全球Python範圍清除任何潛在的庫版本問題:

With the virtual environment now activated, copy the requirements below and paste them inside a new file called requirements.txt at the root of your project.

現在激活了虛擬環境,請在下面複製要求,然後將它們粘貼到一個名為unignts.txt的新文件中。

```

````````

click==8.1.3

單擊== 8.1.3

dataclasses-json==0.6.1

dataclasses-json == 0.6.1

google-auth==2.16.0

Google-auth == 2.16.0

google-auth-oauthlib==0.13.0

Google-Auth-Oauthlib == 0.13.0

google-api-core==2.16.0

Google-api-core == 2.16.0

google-api-client==2.46.0

Google-api-client == 2.46.0

google-api-python-client==2.56.0

Google-api-python-client == 2.56.0

google-auth-httplib2==0.1.1

Google-auth-httplib2 == 0.1.1

google-oauth2==5.3.0

Google-Oauth2 == 5.3.0

google-oauth2-client==4.19.3

Google-oauth2-client == 4.19.3

google-cloud-storage==2.5.0

Google-Cloud-Storage == 2.5.0

google-cloud-bigquery==3.36.0

Google-cloud-bigquery == 3.36.0

google-cloud-bigquery-storage==3.36.0

Google-cloud-bigquery-Storage == 3.36.0

google-cloud-bigquery-datatransfer==3.36.0

Google-cloud-bigquery-datatransfer == 3.36.0

google-cloud-bigquery-connection==3.36.0

Google-cloud-bigquery-connection == 3.36.0

google-cloud-bigquery-logging==3.36.0

Google-cloud-bigquery-loging == 3.36.0

google-cloud-bigquery-admin==3.36.0

Google-cloud-bigquery-admin == 3.36.0

google-cloud-bigquery-analyticshub==3.36.0

Google-cloud-bigquery-analyticsHub == 3.36.0

google-cloud-bigquery-migration==3.36.0

Google-cloud-bigquery遷移== 3.36.0

google-cloud-bigquery-pandas==3.36.0

Google-cloud-bigquery-pandas == 3.36.0

google-cloud-bigquery-storage-transfer==3.36.0

Google-cloud-bigquery-storage-Transfer == 3.36.0

google-cloud-bigquery-datapolicies==3.36.0

Google-cloud-bigquery-datapolicies == 3.36.0

google-cloud-bigquery-datatransfer-service==3.36.0

Google-cloud-bigquery-datatransfer-Service == 3.36.0

google-cloud-bigquery-reservation==3.36.0

Google-cloud-bigquery-保留== 3.36.0

google-cloud-bigquery-rpb==3.36.0

Google-cloud-bigquery-rpb == 3.36.0

google-cloud-bigquery-updater==3.36.0

Google-cloud-bigquery-updater == 3.36.0

google-cloud-bigquery-audit==3.36.0

Google-cloud-bigquery-audit == 3.36.0

google-cloud-bigquery-dwh-audit==3.36.0

Google-cloud-bigquery-dwh-audit == 3.36.0

google-cloud-bigquery-connection-audit==3.36.0

Google-cloud-bigquery-connection-audit == 3.36.0

google-cloud-bigquery-analyticshub-audit==3.36.0

Google-cloud-bigquery-analyticsHub-audit == 3.36.0

google-cloud-bigquery-migration-audit==3.36.0

Google-cloud-bigquery-migration-audit == 3.36.0

google-cloud-bigquery-pandas-audit==3.36.0

Google-cloud-bigquery-pandas-audit == 3.36.0

google-cloud-bigquery-storage-transfer-audit==3.36.0

Google-cloud-bigquery-storage-transfer-audit == 3.36.0

google-cloud-bigquery-datapolicies-audit==3.36.0

Google-cloud-bigquery-datapolicies-audit == 3.36.0

google-cloud-bigquery-datatransfer-service-audit==3.36.0

Google-cloud-bigquery-datatransfer-service-audit == 3.36.0

google-cloud-bigquery-reservation-audit==3.36.0

Google-cloud-bigquery-bigquery-ofert-audit == 3.36.0

google-cloud-bigquery-rpb-audit==3.36.0

google-cloud-bigquery-rpb-audit == 3.36.0

google-cloud-bigquery-updater-audit==3.36.0

Google-cloud-bigquery-updater-audit == 3.36.0

google-cloud-bigquery-audit-admin==3.36.0

Google-cloud-bigquery-audit-admin == 3.36.0

google-cloud-bigquery-dwh-audit-admin==3.36.0

Google-cloud-bigquery-dwh-audit-admin == 3.36.0

google-cloud-bigquery-connection-audit-admin==3.36.0

Google-cloud-bigquery-connection-audit-admin == 3.36.0

google-cloud-bigquery-analyticshub-audit-admin==3.36.0

Google-cloud-bigquery-analyticsHub-audit-admin == 3.36.0

google-cloud-bigquery-migration-audit-admin

Google-cloud-bigquery-migration-audit-admin

免責聲明:info@kdj.com

所提供的資訊並非交易建議。 kDJ.com對任何基於本文提供的資訊進行的投資不承擔任何責任。加密貨幣波動性較大,建議您充分研究後謹慎投資!

如果您認為本網站使用的內容侵犯了您的版權,請立即聯絡我們(info@kdj.com),我們將及時刪除。

2025年02月23日 其他文章發表於