Upbit API 정리(변경된 API 사항 정리)
This commit is contained in:
@@ -141,7 +141,7 @@ namespace Million_Buyer
|
||||
ThreadFlag = true;
|
||||
bt_Start.Enabled = false;
|
||||
rd_buyer.Enabled = false;
|
||||
rd_Realtime.Enabled = false;
|
||||
rd_Realtime.Enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -210,9 +210,9 @@ namespace Million_Buyer
|
||||
|
||||
RealtimeDataSettingManager realTimeMsg = null;
|
||||
|
||||
var standardTime = DateTime.Now;
|
||||
var standardTime = DateTime.Now;
|
||||
|
||||
|
||||
|
||||
this.BeginInvoke(new Action(delegate ()
|
||||
{
|
||||
lb_StartDate.Text = standardTime.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
@@ -225,7 +225,7 @@ namespace Million_Buyer
|
||||
|
||||
var cnt = 0;
|
||||
sw.Start();
|
||||
|
||||
|
||||
while (ThreadFlag)
|
||||
{
|
||||
try
|
||||
@@ -268,8 +268,8 @@ namespace Million_Buyer
|
||||
sw.Restart();
|
||||
dataList = realTimeMsg.ProcessRecentlyCandleDatas(dataList, candleTypeList);
|
||||
sw.Stop();
|
||||
if(sw.Elapsed.TotalSeconds > 1)
|
||||
InsertLog("Ticker 계산 시간 : " + sw.Elapsed.ToString());
|
||||
if (sw.Elapsed.TotalSeconds > 1)
|
||||
InsertLog("Ticker 계산 시간 : " + sw.Elapsed.ToString());
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -437,20 +437,20 @@ namespace Million_Buyer
|
||||
|
||||
var moneyVal = (sellVal * (1 - 0.0005) - buyCandleData.BuyValue * (1 - 0.0005)) * result.BuyCount;
|
||||
|
||||
tl_Result.AppendNode(new object[] {
|
||||
buyNode.GetValue("BuyMarket"),
|
||||
buyNode.GetValue("BuyValue"),
|
||||
buyNode.GetValue("BuyCount"),
|
||||
buyNode.GetValue("BuyDateTime"),
|
||||
sellVal,
|
||||
result.SellCount,
|
||||
time.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
result.FirstEarningRate,
|
||||
moneyVal}, null);
|
||||
tl_Result.AppendNode(new object[] {
|
||||
buyNode.GetValue("BuyMarket"),
|
||||
buyNode.GetValue("BuyValue"),
|
||||
buyNode.GetValue("BuyCount"),
|
||||
buyNode.GetValue("BuyDateTime"),
|
||||
sellVal,
|
||||
result.SellCount,
|
||||
time.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
result.FirstEarningRate,
|
||||
moneyVal
|
||||
}, null);
|
||||
|
||||
tl_BuyList.Nodes.Remove(buyNode);
|
||||
|
||||
|
||||
lb_BuyMarketCount.Text = buyList.Count.ToString();
|
||||
double totalRate = 0;
|
||||
double totalMoneyValue = 0;
|
||||
@@ -474,9 +474,9 @@ namespace Million_Buyer
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
cnt++;
|
||||
if(cnt%60 == 0)
|
||||
if (cnt % 60 == 0)
|
||||
{
|
||||
InsertLog("Scanning......" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
|
||||
cnt = 0;
|
||||
@@ -488,16 +488,17 @@ namespace Million_Buyer
|
||||
}
|
||||
}
|
||||
|
||||
//Stop 시 저장 -> Real Time의 경우 Search Result List만 저장
|
||||
if (RealTimeFlag)
|
||||
{
|
||||
SaveData();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//이거는 결정해야함
|
||||
|
||||
}
|
||||
|
||||
|
||||
SaveData();
|
||||
InsertLog("Thread Out");
|
||||
}
|
||||
/// <summary>
|
||||
@@ -598,7 +599,7 @@ namespace Million_Buyer
|
||||
/// <param name="log"></param>
|
||||
private void InsertLog(string log)
|
||||
{
|
||||
|
||||
|
||||
this.BeginInvoke(new Action(delegate ()
|
||||
{
|
||||
if (lb_log.Items.Count > 500)
|
||||
|
||||
@@ -215,7 +215,7 @@ namespace Million
|
||||
public static string BithumbURL_CoinGoods = "https://api.bithumb.com/public/orderbook/ALL_KRW";
|
||||
#endregion
|
||||
|
||||
#region 업비트 URL
|
||||
#region 업비트 URL
|
||||
public static string UpbitURL = "https://api.upbit.com/";
|
||||
public static string UpbitURL_MarketInfo = "https://api.upbit.com/v1/market/all";
|
||||
public static string UpbitURL_MCandleStick = "https://api.upbit.com/v1/candles/minutes/";
|
||||
@@ -225,12 +225,13 @@ namespace Million
|
||||
|
||||
public static string UpbitURL_Accounts = "https://api.upbit.com/v1/accounts";
|
||||
public static string UpbitURL_Ticker = "https://api.upbit.com/v1/ticker";
|
||||
public static string UpbitURL_Ticks = "https://api.upbit.com/v1/ticks";
|
||||
public static string UpbitURL_Ticks = "https://api.upbit.com/v1/trades/ticks";
|
||||
|
||||
public static string UpbitURL_Orders = "https://api.upbit.com/v1/orders";
|
||||
public static string UpbitURL_Order = "https://api.upbit.com/v1/order";
|
||||
public static string UpbitURL_TryOrder = "https://api.upbit.com/v1/orders";
|
||||
public static string UpbitURL_Orderbook = "https://api.upbit.com/v1/orderbook";
|
||||
public static string UpbitURL_OrderChace = "https://api.upbit.com/v1/chance";
|
||||
public static string UpbitURL_OrderChace = "https://api.upbit.com/v1/orders/chance";
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -116,7 +116,7 @@ namespace Million.WebMangement.Upbit
|
||||
/// <returns></returns>
|
||||
public Order TryOrder(string codeFullName, UpbitOrderSide side, double volume, double price, UpbitOrderType ord_type = UpbitOrderType.limit)
|
||||
{
|
||||
string url = UpbitURL_Order;
|
||||
string url = UpbitURL_TryOrder;
|
||||
var namevalCollection = new NameValueCollection {
|
||||
{ "market", codeFullName },
|
||||
{ "side", side.ToString() },
|
||||
|
||||
Reference in New Issue
Block a user