C# 抓即時行情會出現以下錯誤
我在call back 的函式試什麼都沒做也是會有錯誤.
觀察每天一開始是正常的, 當 "total_amount": 的數字太大很開始出錯
_api.SetQuoteCallback_v1(myCallBack);
void myCallBack(Exchange exchange, dynamic quote)
{
//MyEnv.log($"QuoteCB_v1 | Exchange.{exchange} {quote.GetType().Name} {quote}");
MyEnv.log("call back start ");
//stockDBA.SaveFuturesTicket(ConvertoVO(quote));
MyEnv.log("call back end ");
}
Warning - SessionImpl: 上午 11:09:15 | Client application threw an exception in message rx callback | Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Cannot implicitly convert type 'uint' to 'int'. An explicit conversion exists (are you missing a cast?)
at CallSite.Target(Closure, CallSite, Object)
at Sinopac.Shioaji.TickFOPv1..ctor(Object data)
at CallSite.Target(Closure, CallSite, Type, Object)
at Sinopac.Shioaji.SolaceApi.ProcQuoteMsg(IMessage msg)
at Sinopac.Shioaji.Solace.HandleMessage(Object sender, MessageEventArgs args)
at SolaceSystems.Solclient.Messaging.Native.SessionImpl.Session_RxCallbackFuncV2(IntPtr opaqueSession, IntPtr opaqueMessage, IntPtr user)