Python Coinbase API警告endpoin不安全

2024-04-27 00:19:25 发布

您现在位置:Python中文网/ 问答频道 /正文

问题

在浏览coinbase developer page上的文档时,当运行最基本的示例时,我得到了关于不安全端点的警告。我想在继续之前解决这个警告。你知道吗

警告

python3.5/site-packages/coinbase/wallet/util.py:45: UserWarning: WARNING: this client is sending a request to an insecure API endpoint. Any API request you make may expose your API key and secret to third parties. Consider using the default endpoint:

代码

from coinbase.wallet.client import Client
from vars import *

client = Client (   
    API_KEY,
    API_SECRET,
    API_VERSION)

print(client.get_accounts)

vars是一个包含常量的文件;key、secret和version。你知道吗

尝试

老实说,在设置端点方面,很多google搜索似乎没有发现任何有用的东西。建议?你知道吗


Tags: tokeyfromimportclientapi警告secret