From bca9c9660a26683be66a0b96e8161659c0dc1f99 Mon Sep 17 00:00:00 2001 From: kyh <1329522@naver.com> Date: Mon, 21 Nov 2022 16:19:48 +0900 Subject: [PATCH] =?UTF-8?q?account=20=EA=B4=80=EB=A0=A8=20balance=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC=20=EC=99=84=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Million Buyer/MainForm.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Million Buyer/MainForm.cs b/Million Buyer/MainForm.cs index 50d0282..b392bcd 100644 --- a/Million Buyer/MainForm.cs +++ b/Million Buyer/MainForm.cs @@ -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