Annoying doc strings
parent
cde090bf24
commit
ca1c1cf415
|
@ -20,6 +20,7 @@ Interactive Brokers API backend.
|
|||
Note the client runs under an ``asyncio`` loop (since ``ib_insync`` is
|
||||
built on it) and thus actor aware API calls must be spawned with
|
||||
``infected_aio==True``.
|
||||
|
||||
"""
|
||||
from contextlib import asynccontextmanager as acm
|
||||
from dataclasses import asdict
|
||||
|
@ -547,10 +548,12 @@ class Client:
|
|||
# existing order so ask the client to create a new one (which it
|
||||
# seems to do by allocating an int counter - collision prone..)
|
||||
reqid: int = None,
|
||||
) -> int:
|
||||
"""Place an order and return integer request id provided by client.
|
||||
|
||||
"""
|
||||
) -> int:
|
||||
'''
|
||||
Place an order and return integer request id provided by client.
|
||||
|
||||
'''
|
||||
try:
|
||||
contract = self._contracts[symbol]
|
||||
except KeyError:
|
||||
|
@ -1608,7 +1611,7 @@ async def handle_order_requests(
|
|||
|
||||
global _accounts2clients
|
||||
|
||||
# request_msg: dict
|
||||
request_msg: dict
|
||||
async for request_msg in ems_order_stream:
|
||||
log.info(f'Received order request {request_msg}')
|
||||
|
||||
|
|
|
@ -521,7 +521,8 @@ async def translate_and_relay_brokerd_events(
|
|||
router: Router,
|
||||
|
||||
) -> AsyncIterator[dict]:
|
||||
'''Trades update loop - receive updates from ``brokerd`` trades
|
||||
'''
|
||||
Trades update loop - receive updates from ``brokerd`` trades
|
||||
endpoint, convert to EMS response msgs, transmit **only** to
|
||||
ordering client(s).
|
||||
|
||||
|
|
|
@ -155,8 +155,11 @@ class BrokerdOrder(BaseModel):
|
|||
|
||||
|
||||
class BrokerdOrderAck(BaseModel):
|
||||
'''Immediate reponse to a brokerd order request providing
|
||||
the broker specifci unique order id.
|
||||
'''
|
||||
Immediate reponse to a brokerd order request providing the broker
|
||||
specific unique order id so that the EMS can associate this
|
||||
(presumably differently formatted broker side ID) with our own
|
||||
``.oid`` (which is a uuid4).
|
||||
|
||||
'''
|
||||
name: str = 'ack'
|
||||
|
@ -203,7 +206,8 @@ class BrokerdStatus(BaseModel):
|
|||
|
||||
|
||||
class BrokerdFill(BaseModel):
|
||||
'''A single message indicating a "fill-details" event from the broker
|
||||
'''
|
||||
A single message indicating a "fill-details" event from the broker
|
||||
if avaiable.
|
||||
|
||||
'''
|
||||
|
@ -227,9 +231,11 @@ class BrokerdFill(BaseModel):
|
|||
|
||||
|
||||
class BrokerdError(BaseModel):
|
||||
'''Optional error type that can be relayed to emsd for error handling.
|
||||
'''
|
||||
Optional error type that can be relayed to emsd for error handling.
|
||||
|
||||
This is still a TODO thing since we're not sure how to employ it yet.
|
||||
|
||||
'''
|
||||
name: str = 'error'
|
||||
oid: str
|
||||
|
|
Loading…
Reference in New Issue