|
| 1 | +# ------------------------------------------------------------------------------------------------- |
| 2 | +# Copyright (C) 2015-2021 Nautech Systems Pty Ltd. All rights reserved. |
| 3 | +# https://nautechsystems.io |
| 4 | +# |
| 5 | +# Licensed under the GNU Lesser General Public License Version 3.0 (the "License"); |
| 6 | +# You may not use this file except in compliance with the License. |
| 7 | +# You may obtain a copy of the License at https://www.gnu.org/licenses/lgpl-3.0.en.html |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | +# ------------------------------------------------------------------------------------------------- |
| 15 | + |
| 16 | +from nautilus_trader.model.c_enums.asset_class cimport AssetClass |
| 17 | +from nautilus_trader.model.identifiers cimport Security |
| 18 | +from nautilus_trader.model.instrument cimport Future |
| 19 | +from nautilus_trader.model.instrument cimport Instrument |
| 20 | + |
| 21 | + |
| 22 | +cdef class IBInstrumentProvider: |
| 23 | + cdef dict _instruments |
| 24 | + cdef object _client |
| 25 | + cdef str _host |
| 26 | + cdef str _port |
| 27 | + cdef int _client_id |
| 28 | + |
| 29 | + cdef readonly int count |
| 30 | + """The count of instruments held by the provider.\n\n:returns: `int`""" |
| 31 | + |
| 32 | + cpdef void connect(self) |
| 33 | + cpdef Future load_future(self, Security security, AssetClass asset_class=*) |
| 34 | + cpdef Instrument get(self, Security security) |
| 35 | + cdef inline int _tick_size_to_precision(self, double tick_size) except * |
| 36 | + cdef Future _parse_futures_contract(self, Security security, AssetClass asset_class, list details_list) |
0 commit comments