url 필요 없어서 뻄

This commit is contained in:
kyh
2025-07-03 10:23:05 +09:00
parent db2ca84912
commit 61ba50e118

View File

@@ -59,41 +59,37 @@ namespace BitgetAPI.WebService
// 웹 전송 타입 지정
var webConType = CommonProperty.WebConnectionType.GET;
if(postData.Length > 0) webConType = CommonProperty.WebConnectionType.POST;
if (postData.Length > 0) webConType = CommonProperty.WebConnectionType.POST;
// 1. WebRequest 객체 형성 및 HttpWebRequest 로 형변환
// 2. 거래소에 따른 헤더 파일 처리(POST 일 경우만 지정함)
if (string.IsNullOrEmpty(url))
switch (exchangeWebReqType)
{
switch (exchangeWebReqType)
{
#region Upbit
case CommonProperty.ExchangeWebReqType.UpbitMarket:
wReq = (HttpWebRequest)WebRequest.Create(new Uri(CommonProperty.UpbitURL_MarketInfo));
break;
#endregion
#region Upbit
case CommonProperty.ExchangeWebReqType.UpbitMarket:
wReq = (HttpWebRequest)WebRequest.Create(new Uri(CommonProperty.UpbitURL_MarketInfo));
break;
#endregion
#region Bitget
case CommonProperty.ExchangeWebReqType.BitgetMarket_Spot:
wReq = (HttpWebRequest)WebRequest.Create(new Uri(CommonProperty.BitgetURL_MarketInfo_COIN));
break;
case CommonProperty.ExchangeWebReqType.BitgetMarket_Future:
wReq = (HttpWebRequest)WebRequest.Create(new Uri(CommonProperty.BitgetURL_MarketInfo_FUTURE));
break;
#region Bitget
case CommonProperty.ExchangeWebReqType.BitgetMarket_Spot:
wReq = (HttpWebRequest)WebRequest.Create(new Uri(CommonProperty.BitgetURL_MarketInfo_COIN));
break;
case CommonProperty.ExchangeWebReqType.BitgetMarket_Future:
wReq = (HttpWebRequest)WebRequest.Create(new Uri(CommonProperty.BitgetURL_MarketInfo_FUTURE));
break;
case CommonProperty.ExchangeWebReqType.BitgetCandleStick_Coin:
wReq = (HttpWebRequest)WebRequest.Create(new Uri(CommonProperty.BitgetURL_MarketCandle_Coin));
break;
case CommonProperty.ExchangeWebReqType.BitgetCandleStick_Future:
wReq = (HttpWebRequest)WebRequest.Create(new Uri(CommonProperty.BitgetURL_MarketCandle_Future));
break;
case CommonProperty.ExchangeWebReqType.BitgetCandleStick_Coin:
wReq = (HttpWebRequest)WebRequest.Create(new Uri(CommonProperty.BitgetURL_MarketCandle_Coin));
break;
case CommonProperty.ExchangeWebReqType.BitgetCandleStick_Future:
wReq = (HttpWebRequest)WebRequest.Create(new Uri(CommonProperty.BitgetURL_MarketCandle_Future));
break;
#endregion
}
}
else wReq = (HttpWebRequest)WebRequest.Create(new Uri(url));
// GET, POST 구분
switch (webConType)
{
@@ -270,11 +266,11 @@ namespace BitgetAPI.WebService
case ExchangeWebReqType.BitgetAccountList_Future:
{
var datalist = JsonConvert.DeserializeObject<Dictionary<string, object>>(resResult);
return JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(datalist["data"]?.ToString());
return JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(datalist["data"]?.ToString());
}
case ExchangeWebReqType.BitgetOrder_Future:
{
return JsonConvert.DeserializeObject<Dictionary<string, object>>(resResult);
return JsonConvert.DeserializeObject<Dictionary<string, object>>(resResult);
}
case ExchangeWebReqType.BitgetCancelOrder_Future:
{
@@ -805,7 +801,7 @@ namespace BitgetAPI.WebService
lock (obj)
{
try
{
{
foreach (var item in webSocketDataList)
{
var dic = new Dictionary<string, object>();
@@ -1083,7 +1079,7 @@ namespace BitgetAPI.WebService
var dataList = JsonConvert.DeserializeObject<List<List<string>>>(JsonConvert.SerializeObject(item["data"]));
resCandleStick.data = dataList[0];
list.Add(resCandleStick);
}
}
var minList = new Dictionary<string, List<CandleData>>();
@@ -1131,7 +1127,7 @@ namespace BitgetAPI.WebService
var temp = minList[item];
foreach (var candleData in temp)
{
{
foreach (CommonProperty.MCandleTimeType mCandleTimeType in Enum.GetValues(typeof(CommonProperty.MCandleTimeType)))
{
var strInterval = Utils.Convertor.GetEnumDescription((Enum)mCandleTimeType);
@@ -1239,7 +1235,7 @@ namespace BitgetAPI.WebService
{
candleData.WebSocketUpdate = true;
lastCandleData.Close = candleData.Open;
if(lastCandleData.High < lastCandleData.Close)
if (lastCandleData.High < lastCandleData.Close)
{
lastCandleData.High = lastCandleData.Close;
}
@@ -1250,8 +1246,8 @@ namespace BitgetAPI.WebService
var dt = candleData.Argument;
dt = dt.AddSeconds(dt.Second * -1);
dt = dt.AddMilliseconds(dt.Millisecond * -1);
if((int)mCandleTimeType > 60)
if ((int)mCandleTimeType > 60)
{
dt = dt.AddMinutes(dt.Minute * -1);
}