gateio / gateapi-csharp

38 stars 15 forks source link

找不到方法:“Void RestSharp.RestRequest..ctor(RestSharp.Method)” #23

Closed ntluojianlin closed 2 years ago

ntluojianlin commented 2 years ago

`try { Configuration _config = new Configuration(); _config.BasePath = "https://api.gateio.ws/api/v4"; _config.SetGateApiV4KeyPair(_apiKey, _secretKey);

            var apiInstance = new SpotApi(_config);
            var result = apiInstance.ListOrderBook(currencyPair);
            return result;
        }
        catch (Exception e)
        {
            return null;
        }`

System.MissingMethodException HResult=0x80131513 Message=找不到方法:“Void RestSharp.RestRequest..ctor(RestSharp.Method)”。 Source=Io.Gate.GateApi StackTrace: at Io.Gate.GateApi.Client.ApiClient.NewRequest(HttpMethod method, String path, RequestOptions options, IReadableConfiguration configuration) at Io.Gate.GateApi.Client.ApiClient.Get[T](String path, RequestOptions options, IReadableConfiguration configuration) at Io.Gate.GateApi.Api.SpotApi.ListOrderBookWithHttpInfo(String currencyPair, String interval, Nullable1 limit, Nullable1 withId) at Io.Gate.GateApi.Api.SpotApi.ListOrderBook(String currencyPair, String interval, Nullable1 limit, Nullable1 withId) at OrderRobot.Common.CommonHelper.GetBook(String currencyPair) in D:\Work\Core\BrushProject\OrderRobot\Common\CommonHelper.cs:line 33

ntluojianlin commented 2 years ago

知道原因了,居然是restsharp版本问题,107版本的某些方法没了