TradeManagerBase补充冻结资金接口

This commit is contained in:
fasiondog 2024-08-15 13:48:22 +08:00
parent 2008640875
commit 8189538924
2 changed files with 15 additions and 0 deletions

View File

@ -322,6 +322,13 @@ public:
return 0.0;
}
/**
*
*/
virtual price_t currentFrozen() const {
return 0.0;
}
/**
*
* @note

View File

@ -51,6 +51,10 @@ public:
PYBIND11_OVERRIDE_NAME(price_t, TradeManagerBase, "current_cash", currentCash);
}
price_t currentFrozen() const override {
PYBIND11_OVERRIDE_NAME(price_t, TradeManagerBase, "current_frozen", currentFrozen);
}
price_t cash(const Datetime& datetime, KQuery::KType ktype) override {
PYBIND11_OVERLOAD(price_t, TradeManagerBase, cash, datetime, ktype);
}
@ -281,6 +285,10 @@ void export_TradeManager(py::module& m) {
TradeManager会在执行买入//TradeManager会在历史时刻就执行买入/// brokeLastDatetime )")
.def("current_frozen", &TradeManagerBase::currentFrozen, R"(frozen(self)
)")
.def("getParam", &TradeManagerBase::getParam<boost::any>, R"(get_param(self, name)