Closed ntluojianlin closed 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
1 limit, Nullable
知道原因了,居然是restsharp版本问题,107版本的某些方法没了
`try { Configuration _config = new Configuration(); _config.BasePath = "https://api.gateio.ws/api/v4"; _config.SetGateApiV4KeyPair(_apiKey, _secretKey);
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, Nullable
1 limit, Nullable
1 withId) at Io.Gate.GateApi.Api.SpotApi.ListOrderBook(String currencyPair, String interval, Nullable1 limit, Nullable
1 withId) at OrderRobot.Common.CommonHelper.GetBook(String currencyPair) in D:\Work\Core\BrushProject\OrderRobot\Common\CommonHelper.cs:line 33