구름떼 검색기 수정 중!!

This commit is contained in:
USER002
2024-06-10 18:22:06 +09:00
parent 0fdc3d37a4
commit dba228b6dd
5 changed files with 297 additions and 190 deletions

View File

@@ -123,6 +123,7 @@ namespace BitgetAPI.WebService
marketInfo.quoteVolume = Convert.ToDouble(item["quoteVolume"]);
marketInfo.high24h = Convert.ToDouble(item["high24h"]);
marketInfo.low24h = Convert.ToDouble(item["low24h"]);
marketInfo.open24h = Convert.ToDouble(item["open24h"]);
commonProperty.marketInfoList.Add(marketInfo);
}
@@ -146,6 +147,7 @@ namespace BitgetAPI.WebService
foreach(var item in datas)
{
CandleData candleData = new CandleData();
candleData.Argument = Convertor.GetUnixtimeStampToDateTime(long.Parse(item[0].ToString()));
candleData.Open = Convert.ToDouble(item[1]);
candleData.High = Convert.ToDouble(item[2]);
@@ -281,8 +283,6 @@ namespace BitgetAPI.WebService
DateTime dt = new DateTime(1970, 01, 01);
tickerList.reciveTime = dt.AddMilliseconds(Convert.ToDouble(tickerList.ts)).ToLocalTime();
var test = 0;
/*
// 웹소켓 티커 리스트에 추가
var searchIndex = commonProperty.webSocketCandles.IndexOf(i => i.instId == tickerList.instId);
if (searchIndex < 0)
@@ -305,6 +305,8 @@ namespace BitgetAPI.WebService
candleData.Argument = tickerList.reciveTime;
candleData.Close = tickerList.lastPr;
if (interval == MCandleTimeType.H1) { }
// 캔들 리스트가 없으면 추가
if (candleDataList.Count == 0)
candleDataList.Add(candleData);
@@ -377,14 +379,15 @@ namespace BitgetAPI.WebService
// 없는 경우 추가
else
{
// 새 데이터 등록
candleDataList.Add(candleData);
if (candleData.Open == 0) { }
// 1분 이상 Ticker가 없는 겨우는 Open 가만 가격이 등록됨
candleData.Open = candleData.Close;
candleData.WebSocketUpdate = true;
// 새 데이터 등록
candleDataList.Add(candleData);
// 기존 데이터 삭제
if (candleDataList.Count > 250)
{
@@ -395,7 +398,7 @@ namespace BitgetAPI.WebService
}
}
*/
}
break;
case CommonProperty.BitgetWebSocketType.캔들정보: