diff --git a/vnpy/api/xtp/generate_xtp.sh b/vnpy/api/xtp/generate_xtp.sh index eb626ad6..ac0ce0d2 100644 --- a/vnpy/api/xtp/generate_xtp.sh +++ b/vnpy/api/xtp/generate_xtp.sh @@ -1,3 +1,11 @@ #!/usr/bin/env bash -python -m autocxxpy vnxtp xtp_trader_api.h xtp_quote_api.h -I vnxtp/include -o vnxtp/generated_files -p . --no-callback-name .*Api +# autocxxpy version: 0.2.4 +python -m autocxxpy \ + vnxtp \ + xtp_trader_api.h xtp_quote_api.h \ + -I vnxtp/include \ + --output-dir vnxtp/generated_files \ + --pyi-output-dir .\ + --no-clear-pyi-output \ + --no-callback-pattern ".*Api" diff --git a/vnpy/api/xtp/vnxtp.pyd b/vnpy/api/xtp/vnxtp.pyd index d528b22f..d57d9351 100644 Binary files a/vnpy/api/xtp/vnxtp.pyd and b/vnpy/api/xtp/vnxtp.pyd differ diff --git a/vnpy/api/xtp/vnxtp.pyi b/vnpy/api/xtp/vnxtp.pyi index 40e0641d..d3e4a8da 100644 --- a/vnpy/api/xtp/vnxtp.pyi +++ b/vnpy/api/xtp/vnxtp.pyi @@ -7,7 +7,7 @@ if typing.TYPE_CHECKING: from .vnxtp import * -def set_async_callback_exception_handler(handler: Callable[[AsyncDispatchException], None]): +def set_async_callback_exception_handler(handler: Callable[[Exception, object, str], bool]): """ set a customize exception handler for async callback in this module(pyd) \a handler should return True if it handles that exception, @@ -105,10 +105,10 @@ class XTPMarketDataStruct(): qty: int turnover: float avg_price: float - bid: Sequence[float] - ask: Sequence[float] - bid_qty: Sequence[int] - ask_qty: Sequence[int] + bid: List[float] + ask: List[float] + bid_qty: List[int] + ask_qty: List[int] trades_count: int ticker_status: str stk: XTPMarketDataStockExData @@ -141,10 +141,10 @@ class OrderBookStruct(): qty: int turnover: float trades_count: int - bid: Sequence[float] - ask: Sequence[float] - bid_qty: Sequence[int] - ask_qty: Sequence[int] + bid: List[float] + ask: List[float] + bid_qty: List[int] + ask_qty: List[int] data_time: int @@ -320,7 +320,7 @@ class XTPQueryAssetRsp(): captial_asset: float force_freeze_amount: float preferred_amount: float - unknown: Sequence[int] + unknown: List[int] class XTPQueryStkPositionRsp(): @@ -342,7 +342,7 @@ class XTPQueryStkPositionRsp(): executable_underlying: int locked_position: int usable_locked_position: int - unknown: Sequence[int] + unknown: List[int] class XTPFundTransferNotice(): @@ -491,7 +491,7 @@ class XTPQueryOptionAuctionInfoRsp(): sell_margin: float margin_ratio_param1: float margin_ratio_param2: float - unknown: Sequence[int] + unknown: List[int] class XTPFundTransferReq(): diff --git a/vnpy/api/xtp/vnxtp/generated_files/generated_functions_0.cpp b/vnpy/api/xtp/vnxtp/generated_files/generated_functions_0.cpp index b0dc588f..1abe46a2 100644 --- a/vnpy/api/xtp/vnxtp/generated_files/generated_functions_0.cpp +++ b/vnpy/api/xtp/vnxtp/generated_files/generated_functions_0.cpp @@ -149,7 +149,7 @@ void generate_sub_namespace_XTP_API(pybind11::module & parent) void generate_class_XTP_API_TraderSpi(pybind11::object & parent) { pybind11::class_ c(parent, "TraderSpi"); - if constexpr (std::is_default_constructible_v) + if constexpr (std::is_default_constructible_v) c.def(pybind11::init<>()); c.def("OnDisconnected", autocxxpy::apply_function_transform< @@ -159,6 +159,7 @@ void generate_class_XTP_API_TraderSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnError", @@ -169,6 +170,7 @@ void generate_class_XTP_API_TraderSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnOrderEvent", @@ -179,6 +181,7 @@ void generate_class_XTP_API_TraderSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnTradeEvent", @@ -189,6 +192,7 @@ void generate_class_XTP_API_TraderSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnCancelOrderError", @@ -199,6 +203,7 @@ void generate_class_XTP_API_TraderSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnQueryOrder", @@ -209,6 +214,7 @@ void generate_class_XTP_API_TraderSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnQueryTrade", @@ -219,6 +225,7 @@ void generate_class_XTP_API_TraderSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnQueryPosition", @@ -229,6 +236,7 @@ void generate_class_XTP_API_TraderSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnQueryAsset", @@ -239,6 +247,7 @@ void generate_class_XTP_API_TraderSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnQueryStructuredFund", @@ -249,6 +258,7 @@ void generate_class_XTP_API_TraderSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnQueryFundTransfer", @@ -259,6 +269,7 @@ void generate_class_XTP_API_TraderSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnFundTransfer", @@ -269,6 +280,7 @@ void generate_class_XTP_API_TraderSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnQueryETF", @@ -279,6 +291,7 @@ void generate_class_XTP_API_TraderSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnQueryETFBasket", @@ -289,6 +302,7 @@ void generate_class_XTP_API_TraderSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnQueryIPOInfoList", @@ -299,6 +313,7 @@ void generate_class_XTP_API_TraderSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnQueryIPOQuotaInfo", @@ -309,6 +324,7 @@ void generate_class_XTP_API_TraderSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnQueryOptionAuctionInfo", @@ -319,6 +335,7 @@ void generate_class_XTP_API_TraderSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); AUTOCXXPY_POST_REGISTER_CLASS(tag_vnxtp, XTP::API::TraderSpi, c); @@ -331,6 +348,8 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) std::unique_ptr, PyTraderApi > c(parent, "TraderApi"); + if constexpr (std::is_default_constructible_v) + c.def(pybind11::init<>()); c.def_static("CreateTraderApi", autocxxpy::apply_function_transform< autocxxpy::function_constant< @@ -339,6 +358,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("Release", @@ -349,6 +369,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("GetTradingDay", @@ -359,6 +380,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("RegisterSpi", @@ -369,6 +391,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("GetApiLastError", @@ -379,8 +402,8 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, - pybind11::call_guard(), - pybind11::return_value_policy::reference + pybind11::return_value_policy::reference, + pybind11::call_guard() ); c.def("GetApiVersion", autocxxpy::apply_function_transform< @@ -390,6 +413,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("GetClientIDByXTPID", @@ -400,6 +424,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("GetAccountByXTPID", @@ -410,6 +435,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("SubscribePublicTopic", @@ -420,6 +446,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("SetSoftwareVersion", @@ -430,6 +457,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("SetSoftwareKey", @@ -440,6 +468,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("SetHeartBeatInterval", @@ -450,6 +479,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("Login", @@ -460,6 +490,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("Logout", @@ -470,6 +501,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("InsertOrder", @@ -480,6 +512,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("CancelOrder", @@ -490,6 +523,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("QueryOrderByXTPID", @@ -500,6 +534,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("QueryOrders", @@ -510,6 +545,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("QueryTradesByXTPID", @@ -520,6 +556,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("QueryTrades", @@ -530,6 +567,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("QueryPosition", @@ -540,6 +578,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("QueryAsset", @@ -550,6 +589,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("QueryStructuredFund", @@ -560,6 +600,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("FundTransfer", @@ -570,6 +611,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("QueryFundTransfer", @@ -580,6 +622,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("QueryETF", @@ -590,6 +633,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("QueryETFTickerBasket", @@ -600,6 +644,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("QueryIPOInfoList", @@ -610,6 +655,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("QueryIPOQuotaInfo", @@ -620,6 +666,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("QueryOptionAuctionInfo", @@ -630,6 +677,7 @@ void generate_class_XTP_API_TraderApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); AUTOCXXPY_POST_REGISTER_CLASS(tag_vnxtp, XTP::API::TraderApi, c); diff --git a/vnpy/api/xtp/vnxtp/generated_files/generated_functions_1.cpp b/vnpy/api/xtp/vnxtp/generated_files/generated_functions_1.cpp index ff2f5f04..2cdb24aa 100644 --- a/vnpy/api/xtp/vnxtp/generated_files/generated_functions_1.cpp +++ b/vnpy/api/xtp/vnxtp/generated_files/generated_functions_1.cpp @@ -14,7 +14,7 @@ void generate_class_XTP_API_QuoteSpi(pybind11::object & parent) { pybind11::class_ c(parent, "QuoteSpi"); - if constexpr (std::is_default_constructible_v) + if constexpr (std::is_default_constructible_v) c.def(pybind11::init<>()); c.def("OnDisconnected", autocxxpy::apply_function_transform< @@ -24,6 +24,7 @@ void generate_class_XTP_API_QuoteSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnError", @@ -34,6 +35,7 @@ void generate_class_XTP_API_QuoteSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnSubMarketData", @@ -44,6 +46,7 @@ void generate_class_XTP_API_QuoteSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnUnSubMarketData", @@ -54,6 +57,7 @@ void generate_class_XTP_API_QuoteSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnDepthMarketData", @@ -64,6 +68,7 @@ void generate_class_XTP_API_QuoteSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnSubOrderBook", @@ -74,6 +79,7 @@ void generate_class_XTP_API_QuoteSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnUnSubOrderBook", @@ -84,6 +90,7 @@ void generate_class_XTP_API_QuoteSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnOrderBook", @@ -94,6 +101,7 @@ void generate_class_XTP_API_QuoteSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnSubTickByTick", @@ -104,6 +112,7 @@ void generate_class_XTP_API_QuoteSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnUnSubTickByTick", @@ -114,6 +123,7 @@ void generate_class_XTP_API_QuoteSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnTickByTick", @@ -124,6 +134,7 @@ void generate_class_XTP_API_QuoteSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnSubscribeAllMarketData", @@ -134,6 +145,7 @@ void generate_class_XTP_API_QuoteSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnUnSubscribeAllMarketData", @@ -144,6 +156,7 @@ void generate_class_XTP_API_QuoteSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnSubscribeAllOrderBook", @@ -154,6 +167,7 @@ void generate_class_XTP_API_QuoteSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnUnSubscribeAllOrderBook", @@ -164,6 +178,7 @@ void generate_class_XTP_API_QuoteSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnSubscribeAllTickByTick", @@ -174,6 +189,7 @@ void generate_class_XTP_API_QuoteSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnUnSubscribeAllTickByTick", @@ -184,6 +200,7 @@ void generate_class_XTP_API_QuoteSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnQueryAllTickers", @@ -194,6 +211,7 @@ void generate_class_XTP_API_QuoteSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnQueryTickersPriceInfo", @@ -204,6 +222,7 @@ void generate_class_XTP_API_QuoteSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnSubscribeAllOptionMarketData", @@ -214,6 +233,7 @@ void generate_class_XTP_API_QuoteSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnUnSubscribeAllOptionMarketData", @@ -224,6 +244,7 @@ void generate_class_XTP_API_QuoteSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnSubscribeAllOptionOrderBook", @@ -234,6 +255,7 @@ void generate_class_XTP_API_QuoteSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnUnSubscribeAllOptionOrderBook", @@ -244,6 +266,7 @@ void generate_class_XTP_API_QuoteSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnSubscribeAllOptionTickByTick", @@ -254,6 +277,7 @@ void generate_class_XTP_API_QuoteSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("OnUnSubscribeAllOptionTickByTick", @@ -264,6 +288,7 @@ void generate_class_XTP_API_QuoteSpi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); AUTOCXXPY_POST_REGISTER_CLASS(tag_vnxtp, XTP::API::QuoteSpi, c); @@ -276,6 +301,8 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) std::unique_ptr, PyQuoteApi > c(parent, "QuoteApi"); + if constexpr (std::is_default_constructible_v) + c.def(pybind11::init<>()); c.def_static("CreateQuoteApi", autocxxpy::apply_function_transform< autocxxpy::function_constant< @@ -284,6 +311,7 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("Release", @@ -294,6 +322,7 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("GetTradingDay", @@ -304,6 +333,7 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("GetApiVersion", @@ -314,6 +344,7 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("GetApiLastError", @@ -324,8 +355,8 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) brigand::list< > >::value, - pybind11::call_guard(), - pybind11::return_value_policy::reference + pybind11::return_value_policy::reference, + pybind11::call_guard() ); c.def("SetUDPBufferSize", autocxxpy::apply_function_transform< @@ -335,6 +366,7 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("RegisterSpi", @@ -345,6 +377,7 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("SetHeartBeatInterval", @@ -355,6 +388,7 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("SubscribeMarketData", @@ -363,9 +397,10 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) &XTP::API::QuoteApi::SubscribeMarketData >, brigand::list< - autocxxpy::indexed_transform_holder + autocxxpy::indexed_transform_holder > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("UnSubscribeMarketData", @@ -374,9 +409,10 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) &XTP::API::QuoteApi::UnSubscribeMarketData >, brigand::list< - autocxxpy::indexed_transform_holder + autocxxpy::indexed_transform_holder > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("SubscribeOrderBook", @@ -385,9 +421,10 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) &XTP::API::QuoteApi::SubscribeOrderBook >, brigand::list< - autocxxpy::indexed_transform_holder + autocxxpy::indexed_transform_holder > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("UnSubscribeOrderBook", @@ -396,9 +433,10 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) &XTP::API::QuoteApi::UnSubscribeOrderBook >, brigand::list< - autocxxpy::indexed_transform_holder + autocxxpy::indexed_transform_holder > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("SubscribeTickByTick", @@ -407,9 +445,10 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) &XTP::API::QuoteApi::SubscribeTickByTick >, brigand::list< - autocxxpy::indexed_transform_holder + autocxxpy::indexed_transform_holder > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("UnSubscribeTickByTick", @@ -418,9 +457,10 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) &XTP::API::QuoteApi::UnSubscribeTickByTick >, brigand::list< - autocxxpy::indexed_transform_holder + autocxxpy::indexed_transform_holder > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("SubscribeAllMarketData", @@ -431,6 +471,7 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("UnSubscribeAllMarketData", @@ -441,6 +482,7 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("SubscribeAllOrderBook", @@ -451,6 +493,7 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("UnSubscribeAllOrderBook", @@ -461,6 +504,7 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("SubscribeAllTickByTick", @@ -471,6 +515,7 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("UnSubscribeAllTickByTick", @@ -481,6 +526,7 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("Login", @@ -491,6 +537,7 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("Logout", @@ -501,6 +548,7 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("QueryAllTickers", @@ -511,6 +559,7 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("QueryTickersPriceInfo", @@ -519,9 +568,10 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) &XTP::API::QuoteApi::QueryTickersPriceInfo >, brigand::list< - autocxxpy::indexed_transform_holder + autocxxpy::indexed_transform_holder > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("QueryAllTickersPriceInfo", @@ -532,6 +582,7 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("SubscribeAllOptionMarketData", @@ -542,6 +593,7 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("UnSubscribeAllOptionMarketData", @@ -552,6 +604,7 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("SubscribeAllOptionOrderBook", @@ -562,6 +615,7 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("UnSubscribeAllOptionOrderBook", @@ -572,6 +626,7 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("SubscribeAllOptionTickByTick", @@ -582,6 +637,7 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); c.def("UnSubscribeAllOptionTickByTick", @@ -592,32 +648,9 @@ void generate_class_XTP_API_QuoteApi(pybind11::object & parent) brigand::list< > >::value, + pybind11::return_value_policy::reference, pybind11::call_guard() ); AUTOCXXPY_POST_REGISTER_CLASS(tag_vnxtp, XTP::API::QuoteApi, c); module_vnxtp::objects.emplace("XTP::API::QuoteApi", c); } -void generate_caster_XTP_API(pybind11::object & parent) -{ - struct caster: autocxxpy::caster{}; - auto c = autocxxpy::caster::bind(parent, "caster"); - autocxxpy::caster::try_generate(c, "toTraderSpi)"); - autocxxpy::caster::try_generate(c, "toTraderApi)"); - autocxxpy::caster::try_generate(c, "toQuoteSpi)"); - autocxxpy::caster::try_generate(c, "toQuoteApi)"); -} -void generate_caster_XTP(pybind11::object & parent) -{ - struct caster: autocxxpy::caster{}; - auto c = autocxxpy::caster::bind(parent, "caster"); -} -void generate_class_XTPRspInfoStruct(pybind11::object & parent) -{ - pybind11::class_ c(parent, "XTPRspInfoStruct"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - c.AUTOCXXPY_DEF_PROPERTY(tag_vnxtp, XTPRspInfoStruct, "error_id", error_id); - c.AUTOCXXPY_DEF_PROPERTY(tag_vnxtp, XTPRspInfoStruct, "error_msg", error_msg); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vnxtp, XTPRspInfoStruct, c); - module_vnxtp::objects.emplace("XTPRspInfoStruct", c); -} diff --git a/vnpy/api/xtp/vnxtp/generated_files/generated_functions_2.cpp b/vnpy/api/xtp/vnxtp/generated_files/generated_functions_2.cpp index cdbfa638..ca09f299 100644 --- a/vnpy/api/xtp/vnxtp/generated_files/generated_functions_2.cpp +++ b/vnpy/api/xtp/vnxtp/generated_files/generated_functions_2.cpp @@ -11,6 +11,30 @@ #include "xtp_quote_api.h" +void generate_caster_XTP_API(pybind11::object & parent) +{ + struct caster: autocxxpy::caster{}; + auto c = autocxxpy::caster::bind(parent, "caster"); + autocxxpy::caster::try_generate(c, "toTraderSpi)"); + autocxxpy::caster::try_generate(c, "toTraderApi)"); + autocxxpy::caster::try_generate(c, "toQuoteSpi)"); + autocxxpy::caster::try_generate(c, "toQuoteApi)"); +} +void generate_caster_XTP(pybind11::object & parent) +{ + struct caster: autocxxpy::caster{}; + auto c = autocxxpy::caster::bind(parent, "caster"); +} +void generate_class_XTPRspInfoStruct(pybind11::object & parent) +{ + pybind11::class_ c(parent, "XTPRspInfoStruct"); + if constexpr (std::is_default_constructible_v) + c.def(pybind11::init<>()); + c.AUTOCXXPY_DEF_PROPERTY(tag_vnxtp, XTPRspInfoStruct, "error_id", error_id); + c.AUTOCXXPY_DEF_PROPERTY(tag_vnxtp, XTPRspInfoStruct, "error_msg", error_msg); + AUTOCXXPY_POST_REGISTER_CLASS(tag_vnxtp, XTPRspInfoStruct, c); + module_vnxtp::objects.emplace("XTPRspInfoStruct", c); +} void generate_class_XTPSpecificTickerStruct(pybind11::object & parent) { pybind11::class_ c(parent, "XTPSpecificTickerStruct"); @@ -658,3 +682,15 @@ void generate_enum_XTP_ORDER_STATUS_TYPE(pybind11::object & parent) e.export_values(); module_vnxtp::objects.emplace("XTP_ORDER_STATUS_TYPE", e); } +void generate_enum_XTP_ORDER_SUBMIT_STATUS_TYPE(pybind11::object & parent) +{ + pybind11::enum_ e(parent, "XTP_ORDER_SUBMIT_STATUS_TYPE", pybind11::arithmetic()); + e.value("XTP_ORDER_SUBMIT_STATUS_INSERT_SUBMITTED", XTP_ORDER_SUBMIT_STATUS_TYPE::XTP_ORDER_SUBMIT_STATUS_INSERT_SUBMITTED); + e.value("XTP_ORDER_SUBMIT_STATUS_INSERT_ACCEPTED", XTP_ORDER_SUBMIT_STATUS_TYPE::XTP_ORDER_SUBMIT_STATUS_INSERT_ACCEPTED); + e.value("XTP_ORDER_SUBMIT_STATUS_INSERT_REJECTED", XTP_ORDER_SUBMIT_STATUS_TYPE::XTP_ORDER_SUBMIT_STATUS_INSERT_REJECTED); + e.value("XTP_ORDER_SUBMIT_STATUS_CANCEL_SUBMITTED", XTP_ORDER_SUBMIT_STATUS_TYPE::XTP_ORDER_SUBMIT_STATUS_CANCEL_SUBMITTED); + e.value("XTP_ORDER_SUBMIT_STATUS_CANCEL_REJECTED", XTP_ORDER_SUBMIT_STATUS_TYPE::XTP_ORDER_SUBMIT_STATUS_CANCEL_REJECTED); + e.value("XTP_ORDER_SUBMIT_STATUS_CANCEL_ACCEPTED", XTP_ORDER_SUBMIT_STATUS_TYPE::XTP_ORDER_SUBMIT_STATUS_CANCEL_ACCEPTED); + e.export_values(); + module_vnxtp::objects.emplace("XTP_ORDER_SUBMIT_STATUS_TYPE", e); +} diff --git a/vnpy/api/xtp/vnxtp/generated_files/generated_functions_3.cpp b/vnpy/api/xtp/vnxtp/generated_files/generated_functions_3.cpp index b7c4e8f0..0d14f6b5 100644 --- a/vnpy/api/xtp/vnxtp/generated_files/generated_functions_3.cpp +++ b/vnpy/api/xtp/vnxtp/generated_files/generated_functions_3.cpp @@ -11,18 +11,6 @@ #include "xtp_quote_api.h" -void generate_enum_XTP_ORDER_SUBMIT_STATUS_TYPE(pybind11::object & parent) -{ - pybind11::enum_ e(parent, "XTP_ORDER_SUBMIT_STATUS_TYPE", pybind11::arithmetic()); - e.value("XTP_ORDER_SUBMIT_STATUS_INSERT_SUBMITTED", XTP_ORDER_SUBMIT_STATUS_TYPE::XTP_ORDER_SUBMIT_STATUS_INSERT_SUBMITTED); - e.value("XTP_ORDER_SUBMIT_STATUS_INSERT_ACCEPTED", XTP_ORDER_SUBMIT_STATUS_TYPE::XTP_ORDER_SUBMIT_STATUS_INSERT_ACCEPTED); - e.value("XTP_ORDER_SUBMIT_STATUS_INSERT_REJECTED", XTP_ORDER_SUBMIT_STATUS_TYPE::XTP_ORDER_SUBMIT_STATUS_INSERT_REJECTED); - e.value("XTP_ORDER_SUBMIT_STATUS_CANCEL_SUBMITTED", XTP_ORDER_SUBMIT_STATUS_TYPE::XTP_ORDER_SUBMIT_STATUS_CANCEL_SUBMITTED); - e.value("XTP_ORDER_SUBMIT_STATUS_CANCEL_REJECTED", XTP_ORDER_SUBMIT_STATUS_TYPE::XTP_ORDER_SUBMIT_STATUS_CANCEL_REJECTED); - e.value("XTP_ORDER_SUBMIT_STATUS_CANCEL_ACCEPTED", XTP_ORDER_SUBMIT_STATUS_TYPE::XTP_ORDER_SUBMIT_STATUS_CANCEL_ACCEPTED); - e.export_values(); - module_vnxtp::objects.emplace("XTP_ORDER_SUBMIT_STATUS_TYPE", e); -} void generate_enum_XTP_TE_RESUME_TYPE(pybind11::object & parent) { pybind11::enum_ e(parent, "XTP_TE_RESUME_TYPE", pybind11::arithmetic()); diff --git a/vnpy/api/xtp/vnxtp/generated_files/module.cpp b/vnpy/api/xtp/vnxtp/generated_files/module.cpp index 7c62af9f..ca6c1108 100644 --- a/vnpy/api/xtp/vnxtp/generated_files/module.cpp +++ b/vnpy/api/xtp/vnxtp/generated_files/module.cpp @@ -22,6 +22,7 @@ void additional_init(pybind11::module &m) void init_dispatcher(pybind11::module &m) { m.def("set_async_callback_exception_handler", &autocxxpy::async_callback_exception_handler::set_handler); + pybind11::class_ c(m, "AsyncDispatchException"); c.def_property("what", &autocxxpy::async_dispatch_exception::what, nullptr); c.def_readonly("instance", &autocxxpy::async_dispatch_exception::instance); diff --git a/vnpy/api/xtp/vnxtp/generated_files/module.hpp b/vnpy/api/xtp/vnxtp/generated_files/module.hpp index 7789ddc5..7b2c64af 100644 --- a/vnpy/api/xtp/vnxtp/generated_files/module.hpp +++ b/vnpy/api/xtp/vnxtp/generated_files/module.hpp @@ -9,6 +9,8 @@ struct module_vnxtp{ static inline void process_post_assign() { cross.process_assign(objects); + cross.clear(); + objects.clear(); } }; using module_tag=tag_vnxtp; diff --git a/vnpy/api/xtp/vnxtp/include/autocxxpy/callback_wrapper.hpp b/vnpy/api/xtp/vnxtp/include/autocxxpy/callback_wrapper.hpp index 2b9e523c..46ebf84d 100644 --- a/vnpy/api/xtp/vnxtp/include/autocxxpy/callback_wrapper.hpp +++ b/vnpy/api/xtp/vnxtp/include/autocxxpy/callback_wrapper.hpp @@ -91,7 +91,7 @@ namespace autocxxpy struct async_callback_exception_handler { - using handler_type = std::function; + using handler_type = std::function; static handler_type custom_handler; inline static void handle_excepiton(const async_dispatch_exception&e) @@ -153,19 +153,19 @@ namespace autocxxpy } template - inline std::optional& save(const T * val) + inline std::optional save(const T * val) { // match const pointer if (nullptr == val) AUTOCXXPY_UNLIKELY { return std::nullopt; } - return const_cast(*val); + return *val; } template - inline T& save(const T & val) + inline T save(const T & val) { // match everything else : just use original type - return const_cast(val); + return val; } diff --git a/vnpy/api/xtp/vnxtp/include/autocxxpy/cross_assign.hpp b/vnpy/api/xtp/vnxtp/include/autocxxpy/cross_assign.hpp index 2843a0ba..e99fd97c 100644 --- a/vnpy/api/xtp/vnxtp/include/autocxxpy/cross_assign.hpp +++ b/vnpy/api/xtp/vnxtp/include/autocxxpy/cross_assign.hpp @@ -40,6 +40,11 @@ namespace autocxxpy } } } + + void clear() + { + _delay_assings.clear(); + } private: std::vector> _delay_assings; }; diff --git a/vnpy/api/xtp/vnxtp/include/autocxxpy/wrappers/inout_argument.hpp b/vnpy/api/xtp/vnxtp/include/autocxxpy/wrappers/inout_argument.hpp index 54b27e40..a74d17b6 100644 --- a/vnpy/api/xtp/vnxtp/include/autocxxpy/wrappers/inout_argument.hpp +++ b/vnpy/api/xtp/vnxtp/include/autocxxpy/wrappers/inout_argument.hpp @@ -2,6 +2,7 @@ #include "../base/type.h" #include "../base/check.h" +#include "../utils/type_traits.hpp" #include #include "../brigand.hpp" @@ -14,6 +15,7 @@ #include #include "./utils.hpp" +#include namespace autocxxpy { @@ -24,19 +26,22 @@ namespace autocxxpy return [](Ls ... ls, base_t &arg, Rs ... rs) { constexpr auto method = method_constant::value; + //using func_t = ct::function_type_t; + //using args_t = wrap, list>; + //using ret_t = ct::return_type_t; + auto stdmethod = std::function>(method); if constexpr (std::is_void_v) { - method(ls..., &arg, rs...); + stdmethod(std::forward(ls)..., &arg, std::forward(rs)...); return std::move(arg); } else { - return append_as_tuple(method( - ls..., + return append_as_tuple(stdmethod( + std::forward(ls)..., &arg, - rs... + std::forward(rs)... ), std::move(arg)); - } }; } @@ -44,20 +49,21 @@ namespace autocxxpy inline constexpr auto wrap_reference_argument_as_inout_impl(brigand::list, brigand::list ) { namespace ct = boost::callable_traits; - return [](Ls ... ls, base_t &arg, Rs ... rs) + return [](Ls ... ls, base_t arg, Rs ... rs) { constexpr auto method = method_constant::value; + auto stdmethod = std::function>(method); if constexpr (std::is_void_v) { - method(ls..., arg, rs...); + stdmethod(std::forward(ls)..., arg, std::forward(rs)...); return arg; } else { - return append_as_tuple(method( - ls..., + return append_as_tuple(stdmethod( + std::forward(ls)..., arg, - rs... + std::forward(rs)... ), arg); } diff --git a/vnpy/api/xtp/vnxtp/include/autocxxpy/wrappers/output_argument.hpp b/vnpy/api/xtp/vnxtp/include/autocxxpy/wrappers/output_argument.hpp index 01a577bc..b9d5105a 100644 --- a/vnpy/api/xtp/vnxtp/include/autocxxpy/wrappers/output_argument.hpp +++ b/vnpy/api/xtp/vnxtp/include/autocxxpy/wrappers/output_argument.hpp @@ -25,17 +25,18 @@ namespace autocxxpy { base_t arg; constexpr auto method = method_constant::value; + auto stdmethod = std::function>(method); if constexpr (std::is_void_v) { - method(ls..., &arg, rs...); + stdmethod(std::forward(ls)..., &arg, std::forward(rs)...); return std::move(arg); } else { - return append_as_tuple(method( - ls..., + return append_as_tuple(stdmethod( + std::forward(ls)..., &arg, - rs... + std::forward(rs)... ), std::move(arg)); } @@ -49,17 +50,18 @@ namespace autocxxpy { base_t arg; constexpr auto method = method_constant::value; + auto stdmethod = std::function>(method); if constexpr (std::is_void_v) { - method(ls..., arg, rs...); + stdmethod(std::forward(ls)..., arg, std::forward(rs)...); return arg; } else { - return append_as_tuple(method( - ls..., + return append_as_tuple(stdmethod( + std::forward(ls)..., arg, - rs... + std::forward(rs)... ), arg); } diff --git a/vnpy/api/xtp/vnxtp/include/autocxxpy/wrappers/utils.hpp b/vnpy/api/xtp/vnxtp/include/autocxxpy/wrappers/utils.hpp index 7a070303..f405e8d1 100644 --- a/vnpy/api/xtp/vnxtp/include/autocxxpy/wrappers/utils.hpp +++ b/vnpy/api/xtp/vnxtp/include/autocxxpy/wrappers/utils.hpp @@ -1,10 +1,13 @@ #pragma once + +#include "../utils/type_traits.hpp" + namespace autocxxpy { template auto append_as_tuple(T&& v1, T2&& v2) { - return std::make_tuple(std::move(v1), std::move(v2)); + return std::make_tuple>(std::move(v1), std::move(v2)); } template diff --git a/vnpy/api/xtp/vnxtp_XTP_API.pyi b/vnpy/api/xtp/vnxtp_XTP_API.pyi index e3f98ddd..27730950 100644 --- a/vnpy/api/xtp/vnxtp_XTP_API.pyi +++ b/vnpy/api/xtp/vnxtp_XTP_API.pyi @@ -140,7 +140,7 @@ class QuoteSpi(): ... def OnUnSubMarketData(self, ticker: XTPSpecificTickerStruct, error_info: XTPRspInfoStruct, is_last: bool)->Any: ... - def OnDepthMarketData(self, market_data: XTPMarketDataStruct, bid1_qty: Sequence[int], bid1_count: int, max_bid1_count: int, ask1_qty: Sequence[int], ask1_count: int, max_ask1_count: int)->Any: + def OnDepthMarketData(self, market_data: XTPMarketDataStruct, bid1_qty: List[int], bid1_count: int, max_bid1_count: int, ask1_qty: List[int], ask1_count: int, max_ask1_count: int)->Any: ... def OnSubOrderBook(self, ticker: XTPSpecificTickerStruct, error_info: XTPRspInfoStruct, is_last: bool)->Any: ... @@ -204,17 +204,17 @@ class QuoteApi(): ... def SetHeartBeatInterval(self, interval: int)->Any: ... - def SubscribeMarketData(self, ticker: Sequence[str], exchange_id: XTP_EXCHANGE_TYPE)->int: + def SubscribeMarketData(self, ticker: List[str], exchange_id: XTP_EXCHANGE_TYPE)->int: ... - def UnSubscribeMarketData(self, ticker: Sequence[str], exchange_id: XTP_EXCHANGE_TYPE)->int: + def UnSubscribeMarketData(self, ticker: List[str], exchange_id: XTP_EXCHANGE_TYPE)->int: ... - def SubscribeOrderBook(self, ticker: Sequence[str], exchange_id: XTP_EXCHANGE_TYPE)->int: + def SubscribeOrderBook(self, ticker: List[str], exchange_id: XTP_EXCHANGE_TYPE)->int: ... - def UnSubscribeOrderBook(self, ticker: Sequence[str], exchange_id: XTP_EXCHANGE_TYPE)->int: + def UnSubscribeOrderBook(self, ticker: List[str], exchange_id: XTP_EXCHANGE_TYPE)->int: ... - def SubscribeTickByTick(self, ticker: Sequence[str], exchange_id: XTP_EXCHANGE_TYPE)->int: + def SubscribeTickByTick(self, ticker: List[str], exchange_id: XTP_EXCHANGE_TYPE)->int: ... - def UnSubscribeTickByTick(self, ticker: Sequence[str], exchange_id: XTP_EXCHANGE_TYPE)->int: + def UnSubscribeTickByTick(self, ticker: List[str], exchange_id: XTP_EXCHANGE_TYPE)->int: ... def SubscribeAllMarketData(self, exchange_id: XTP_EXCHANGE_TYPE)->int: ... @@ -234,7 +234,7 @@ class QuoteApi(): ... def QueryAllTickers(self, exchange_id: XTP_EXCHANGE_TYPE)->int: ... - def QueryTickersPriceInfo(self, ticker: Sequence[str], exchange_id: XTP_EXCHANGE_TYPE)->int: + def QueryTickersPriceInfo(self, ticker: List[str], exchange_id: XTP_EXCHANGE_TYPE)->int: ... def QueryAllTickersPriceInfo(self, )->int: ...