Gold.cs 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. using System.Text.Json.Serialization;
  2. namespace economy.Models.Gold
  3. {
  4. // 검색결과 변수
  5. public class Response
  6. {
  7. [JsonPropertyName("header")]
  8. public Header Header { get; set; }
  9. [JsonPropertyName("body")]
  10. public Body Body { get; set; }
  11. }
  12. public class Header
  13. {
  14. [JsonPropertyName("resultCode")]
  15. public string ResultCode { get; set; }
  16. [JsonPropertyName("resultMsg")]
  17. public string ResultMsg { get; set; }
  18. }
  19. public class Body
  20. {
  21. [JsonPropertyName("numOfRows")]
  22. public int NumberOfRows { get; set; }
  23. [JsonPropertyName("pageNo")]
  24. public int PageNo { get; set; }
  25. [JsonPropertyName("totalCount")]
  26. public int TotalCount { get; set; }
  27. [JsonPropertyName("items")]
  28. public Items Items { get; set; }
  29. }
  30. public class Items
  31. {
  32. [JsonPropertyName("item")]
  33. public List<Item> ItemList { get; set; }
  34. }
  35. public class Item
  36. {
  37. public int Num { get; set; }
  38. [JsonPropertyName("basDt")]
  39. public string BasDt { get; set; } // 기준일자
  40. [JsonPropertyName("srtnCd")]
  41. public string SrtnCd { get; set; } // 단축코드
  42. [JsonPropertyName("isinCd")]
  43. public string IsinCd { get; set; } // ISIN코드
  44. [JsonPropertyName("itmsNm")]
  45. public string ItmsNm { get; set; } // 종목명
  46. [JsonPropertyName("clpr")]
  47. public string Clpr { get; set; } // 종가
  48. [JsonPropertyName("vs")]
  49. public string Vs { get; set; } // 대비
  50. [JsonPropertyName("fltRt")]
  51. public string FltRt { get; set; } // 등락률
  52. [JsonPropertyName("mkp")]
  53. public string Mkp { get; set; } // 시가
  54. [JsonPropertyName("hipr")]
  55. public string Hipr { get; set; } // 고가
  56. [JsonPropertyName("lopr")]
  57. public string Lopr { get; set; } // 저가
  58. [JsonPropertyName("trqu")]
  59. public string Trqu { get; set; } // 거래량
  60. [JsonPropertyName("trPrc")]
  61. public string TrPrc { get; set; } // 거래대금
  62. }
  63. }