account 관련 balance 처리 완료

This commit is contained in:
kyh
2022-11-21 16:19:48 +09:00
parent 6ab4d72e7d
commit bca9c9660a

View File

@@ -227,12 +227,22 @@ namespace Million_Buyer
private void OrderThreadFunction()
{
InsertLog("Order Thread Start");
var orderList = CommonProperty.UpbitApi.GetOrderListInformation(UpbitOrderListTypes.waitwatch);
//setting
foreach (var item in orderList)
{
var account = this.accounts.FirstOrDefault(t => t.UnitCurrency + "-" + t.Currency == item.CoinFullName);
if (account != null)
account.Balance = item.ExecutedVolume;
}
while (ThreadFlag)
{
//Oder List는 Wait, Watch로 구분되어 있는 List 최신 100개, Done, Cancel로 구분되어 있는 List 최신 100개를 표기함
var orderList = CommonProperty.UpbitApi.GetOrderListInformation(UpbitOrderListTypes.waitwatch);
orderList = CommonProperty.UpbitApi.GetOrderListInformation(UpbitOrderListTypes.waitwatch);
orderList.AddRange(CommonProperty.UpbitApi.GetOrderListInformation(UpbitOrderListTypes.donecancel));
orderList = orderList.Distinct().ToList();
this.BeginInvoke(new Action(delegate ()
{
try