API 키 설정 추가

This commit is contained in:
DESKTOP-BQ5FCLL\lee
2024-10-21 15:24:05 +09:00
parent 509e8bf2a5
commit 2eb2bf1ef1
8 changed files with 167 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
using BitgetApi.Data;
using BitgetApi.Data.API;
using BitgetAPI.Data;
using BitgetAPI.IndicatorConditionSetup;
using BitgetAPI.WebService;
@@ -100,7 +101,11 @@ namespace BitgetAPI
treeList_LongUp.DataSource = signals_LU;
treeList_ShortDown.DataSource = signals_SD;
// API Key 가져오기 및 등록
foreach(var item in APIKeyInfo_Bitget.GetAPIKeys())
{
cb_ApiKeys.Properties.Items.Add(item.Name);
}
cb_ApiKeys.SelectedIndex = GlobalOptions.Instance.SelectAPI.Id;
}
@@ -568,5 +573,20 @@ namespace BitgetAPI
th_treeListMarketInfoListUpdateTimer = new Thread(new ThreadStart(TreeListMarketInfoListUpdate));
th_treeListMarketInfoListUpdateTimer.Start();
}
private void cb_ApiKeys_SelectedIndexChanged(object sender, EventArgs e)
{
var index = cb_ApiKeys.SelectedIndex;
var api =APIKeyInfo_Bitget.GetAPIKeys().Find(x=>x.Id == index);
if(api != null)
{
GlobalOptions.Instance.SelectAPI = api;
return;
}
MessageBox.Show("키 못찾음", "확인 필요");
}
}
}