2015-01-07 01:26:14 +08:00
|
|
|
|
/*
|
|
|
|
|
* _MarketInfo.cpp
|
|
|
|
|
*
|
|
|
|
|
* Created on: 2012-9-27
|
|
|
|
|
* Author: fasiondog
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <hikyuu/serialization/MarketInfo_serialization.h>
|
2023-12-27 02:16:10 +08:00
|
|
|
|
#include "pybind_utils.h"
|
2015-01-07 01:26:14 +08:00
|
|
|
|
|
|
|
|
|
using namespace hku;
|
2023-12-27 02:16:10 +08:00
|
|
|
|
namespace py = pybind11;
|
2015-01-07 01:26:14 +08:00
|
|
|
|
|
2023-12-27 02:16:10 +08:00
|
|
|
|
void export_MarketInfo(py::module& m) {
|
|
|
|
|
py::class_<MarketInfo>(m, "MarketInfo", "市场信息记录")
|
|
|
|
|
.def(py::init<>())
|
|
|
|
|
.def(py::init<const string&, const string&, const string&, const string&, const Datetime&,
|
|
|
|
|
TimeDelta, TimeDelta, TimeDelta, TimeDelta>())
|
2020-07-08 00:18:51 +08:00
|
|
|
|
|
2023-12-27 02:16:10 +08:00
|
|
|
|
.def("__str__", &MarketInfo::toString)
|
2020-07-08 00:18:51 +08:00
|
|
|
|
|
2023-12-27 02:16:10 +08:00
|
|
|
|
.def_property_readonly("market", py::overload_cast<void>(&MarketInfo::market, py::const_),
|
|
|
|
|
"市场标识(如:沪市“SH”, 深市“SZ”)")
|
|
|
|
|
.def_property_readonly("name", py::overload_cast<void>(&MarketInfo::name, py::const_),
|
|
|
|
|
"市场全称")
|
|
|
|
|
.def_property_readonly(
|
|
|
|
|
"description", py::overload_cast<void>(&MarketInfo::description, py::const_), "描述说明")
|
|
|
|
|
.def_property_readonly("code", py::overload_cast<void>(&MarketInfo::code, py::const_),
|
|
|
|
|
"该市场对应的主要指数代码,用于获取交易日历")
|
|
|
|
|
|
|
|
|
|
.def_property_readonly("last_datetime", &MarketInfo::lastDate, "该市场K线数据最后交易日期")
|
|
|
|
|
.def_property_readonly("open_time1", &MarketInfo::openTime1, "开市时间1")
|
|
|
|
|
.def_property_readonly("close_time1", &MarketInfo::closeTime1, "闭市时间1")
|
|
|
|
|
.def_property_readonly("open_time2", &MarketInfo::openTime2, "开市时间2")
|
|
|
|
|
.def_property_readonly("close_time2", &MarketInfo::closeTime2, "闭市时间2")
|
|
|
|
|
|
|
|
|
|
DEF_PICKLE(MarketInfo);
|
2015-01-07 01:26:14 +08:00
|
|
|
|
}
|