0

我把它缩小到:

ICoinGeckoClient CGClient = CoinGeckoClient.Instance;
var result2 = CGClient.CoinsClient.GetAllCoinsData ();

但是我必须为 GetAllCoinsData 提供一些参数,但它们对我来说没有多大意义,而且我找不到任何关于此函数的提及,或者原始 CoinGecko 函数似乎是基于 Web 的 API。所以不知道如何传递一个符号等并获取硬币数据以获取市值数据。

关于如何实现这一目标的任何想法?

4

1 回答 1

0

看来你应该使用

        Task<CoinFullDataById> GetAllCoinDataWithId(string id);

使用道具 id。

在以下位置有一个 id/符号列表:https ://docs.google.com/spreadsheets/d/1wTTuxXt8n9q7C4NDXqQpI3wpKu1_5bGVmP9Xz0XGSyU/edit#gid=0

您还可以在以下位置下载代码并查看评论/测试:https ://github.com/tosunthex/CoinGecko

        /// <summary>
    /// List all coins with data (name, price, market, developer, community, etc) - paginated by 50
    /// </summary>
    /// <returns></returns>
    Task<IReadOnlyList<CoinFullData>> GetAllCoinsData();

    /// <summary>
    /// List all coins with data (name, price, market, developer, community, etc) - paginated by 50
    /// </summary>
    /// <param name="order">order by</param>
    /// <param name="perPage">Total results per page</param>
    /// <param name="page">Page through results</param>
    /// <param name="localization">Set to false to exclude localized languages in response</param>
    /// <param name="sparkline">Include sparkline 7 days data (true/false) [default: false]</param>
    /// <returns></returns>
    Task<IReadOnlyList<CoinFullData>> GetAllCoinsData(string order, int? perPage, int? page, string localization,
        bool? sparkline);
于 2021-10-08T23:21:30.677 回答