Limit option chain to 1 rps

kivy_mainline_and_py3.8
Tyler Goodlet 2018-12-11 15:21:45 -05:00
parent 66ecb4c0cb
commit e7378538f6
1 changed files with 5 additions and 3 deletions

View File

@ -148,7 +148,7 @@ async def maybe_spawn_brokerd_as_subactor(sleep=0.5, tries=10, loglevel=None):
help='Broker backend to use') help='Broker backend to use')
@click.option('--loglevel', '-l', default='warning', help='Logging level') @click.option('--loglevel', '-l', default='warning', help='Logging level')
@click.option('--tl', is_flag=True, help='Enable tractor logging') @click.option('--tl', is_flag=True, help='Enable tractor logging')
@click.option('--rate', '-r', default=4, help='Quote rate limit') @click.option('--rate', '-r', default=3, help='Quote rate limit')
@click.option('--test', '-t', help='Test quote stream file') @click.option('--test', '-t', help='Test quote stream file')
@click.option('--dhost', '-dh', default='127.0.0.1', @click.option('--dhost', '-dh', default='127.0.0.1',
help='Daemon host address to connect to') help='Daemon host address to connect to')
@ -371,7 +371,7 @@ def optsquote(loglevel, broker, symbol, df_output, date):
@click.option('--tl', is_flag=True, help='Enable tractor logging') @click.option('--tl', is_flag=True, help='Enable tractor logging')
@click.option('--date', '-d', help='Contracts expiry date') @click.option('--date', '-d', help='Contracts expiry date')
@click.option('--test', '-t', help='Test quote stream file') @click.option('--test', '-t', help='Test quote stream file')
@click.option('--rate', '-r', default=4, help='Logging level') @click.option('--rate', '-r', default=1, help='Logging level')
@click.argument('symbol', required=True) @click.argument('symbol', required=True)
def optschain(loglevel, broker, symbol, date, tl, rate, test): def optschain(loglevel, broker, symbol, date, tl, rate, test):
"""Start the real-time option chain UI. """Start the real-time option chain UI.
@ -387,7 +387,9 @@ def optschain(loglevel, broker, symbol, date, tl, rate, test):
# run app "main" # run app "main"
await _async_main( await _async_main(
symbol, portal, symbol, portal,
brokermod, rate=rate, test=test, brokermod,
rate=rate,
test=test,
) )
tractor.run( tractor.run(