internal void RaisePositionsReceived(CollectionReceivedEventArgs <BitFlyerPosition> e)
 {
     if (e.Action == NotifyCollectionChangedAction.Reset || e?.Data?.Count > 0)
     {
         PositionsReceived?.Invoke(this, e);
     }
 }
Esempio n. 2
0
        public QueryPositionResponse QueryPositions(RequestHeader header, QueryPositionRequest payload)
        {
            NetMQMessage response = Channels.SendRequest(BuildMessage(header, payload));

            ResponseHeader responseHeader = ResponseHeader.Parser.ParseFrom(response.Pop().ToByteArray());

            WriteLog(responseHeader.ToString());

            QueryPositionResponse responsePayload = QueryPositionResponse.Parser.ParseFrom(response.Pop().ToByteArray());

            WriteLog(responsePayload.ToString());
            PositionsReceived?.Invoke(responsePayload);
            return(responsePayload);
        }
Esempio n. 3
0
 protected virtual void OnPositionsReceived(string data)
 {
     PositionsReceived?.Invoke(this, data);
 }