Upbit Candle, Market 데이터 가져오는 함수 수정
This commit is contained in:
@@ -9,10 +9,16 @@ namespace DataSaver
|
||||
{
|
||||
public partial class MainForm : Form
|
||||
{
|
||||
// Key(임시)
|
||||
public static string accessKey = "4jfMUL3lpwJ5GQSszm3rPp5M47tD8ssfIGew2dDb";
|
||||
public static string secretKey = "iAasVxQt8CyADjzXaAZiF5VZXTZPdElJOP4m97Bz";
|
||||
|
||||
public MainForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
CommonProperty.UpbitApi = new Million.WebMangement.Upbit.UpbitAPI(accessKey, secretKey);
|
||||
|
||||
InitForm();
|
||||
}
|
||||
|
||||
@@ -45,11 +51,8 @@ namespace DataSaver
|
||||
|
||||
/////TODO 임시로 Upbit 우선순위 설정
|
||||
comboBoxEdit_ExchangePlace.SelectedIndex = 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 거래소 콤보박스 아이템 변경 시 이벤트
|
||||
/// </summary>
|
||||
@@ -159,9 +162,8 @@ namespace DataSaver
|
||||
switch (placeIndex)
|
||||
{
|
||||
case (int)CommonProperty.ExchangePlace.Upbit:
|
||||
CommonProperty.recentlyMarketOfPlaceList = (List<MarketData>)
|
||||
Million.WebServices.WebConnection.SendWebServer(CommonProperty.ExchangeWebReqType.UpbitMarket,
|
||||
DateTime.Now);
|
||||
CommonProperty.recentlyMarketOfPlaceList = CommonProperty.UpbitApi.GetMarketDatas();
|
||||
|
||||
break;
|
||||
//case (int)CommonProperty.ExchangePlace.Bithumb:
|
||||
// marketList = Million.DbManagement.DbServiceFunctions.GetMarketTable_FromDB(
|
||||
|
||||
@@ -33,7 +33,9 @@ namespace Million.WebMangement.Upbit
|
||||
/// <returns></returns>
|
||||
public string CallAPI(string url, HttpMethod httpMethod, NameValueCollection nvc = null)
|
||||
{
|
||||
var requestMessage = new HttpRequestMessage(httpMethod, new Uri(url + "?" + ToQueryString(nvc, true)));
|
||||
if (nvc != null) url += "?" + ToQueryString(nvc, true);
|
||||
|
||||
var requestMessage = new HttpRequestMessage(httpMethod, new Uri(url));
|
||||
requestMessage.Headers.Authorization = new AuthenticationHeaderValue("Bearer", CreateJwt(nvc));
|
||||
var response = httpClient.SendAsync(requestMessage).Result;
|
||||
var contents = response.Content.ReadAsStringAsync().Result;
|
||||
|
||||
Reference in New Issue
Block a user