Compare commits

..

No commits in common. "94caa248e789c2b29469afd1bdc5ddd164657575" and "bf33cb93b1e53c62a95b15480db1efa7e4afcac4" have entirely different histories.

5 changed files with 10 additions and 19 deletions

View File

@ -54,13 +54,9 @@ async def max_pain_daemon(
kind=kind kind=kind
) )
log.info( print(f'Available expiration dates for {currency}-{kind}:')
f'Available expiries for {currency!r}-{kind}:\n' print(f'{expiry_dates}')
f'{expiry_dates}\n' expiry_date = input('Please enter a valid expiration date: ').upper()
)
expiry_date: str = input(
'Please enter a valid expiration date: '
).upper()
print('Starting little daemon...') print('Starting little daemon...')
# maybe move this type annot down to the assignment line? # maybe move this type annot down to the assignment line?

View File

@ -97,8 +97,6 @@ class Pair(Struct, frozen=True, kw_only=True):
baseAsset: str baseAsset: str
baseAssetPrecision: int baseAssetPrecision: int
permissionSets: list[list[str]]
filters: dict[ filters: dict[
str, str,
str | int | float, str | int | float,
@ -144,6 +142,7 @@ class SpotPair(Pair, frozen=True):
defaultSelfTradePreventionMode: str defaultSelfTradePreventionMode: str
allowedSelfTradePreventionModes: list[str] allowedSelfTradePreventionModes: list[str]
permissions: list[str] permissions: list[str]
permissionSets: list[list[str]]
# can the paint botz creat liq gaps even easier on this asset? # can the paint botz creat liq gaps even easier on this asset?
# Bp # Bp

View File

@ -1,5 +1,5 @@
# piker: trading gear for hackers # piker: trading gear for hackers
# Copyright (C) Guillermo Rodriguez (in stewardship for pikers) # Copyright (C) Guillermo Rodriguez (in stewardship for piker0)
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by # it under the terms of the GNU Affero General Public License as published by
@ -80,6 +80,7 @@ from piker.accounting import (
from piker.data import ( from piker.data import (
def_iohlcv_fields, def_iohlcv_fields,
match_from_pairs, match_from_pairs,
# Struct,
) )
from piker.data._web_bs import ( from piker.data._web_bs import (
open_jsonrpc_session open_jsonrpc_session
@ -194,11 +195,7 @@ def cb_sym_to_deribit_inst(sym: Symbol) -> str:
def get_values_from_cb_normalized_date(expiry_date: str) -> str: def get_values_from_cb_normalized_date(expiry_date: str) -> str:
''' # deribit specific
Convert the `cryptofeed` (expiry) datetime format to our own,
a simple 3 token `str: f'{day}{month}{year}'.
'''
cb_norm = [ cb_norm = [
'F', 'G', 'H', 'J', 'F', 'G', 'H', 'J',
'K', 'M', 'N', 'Q', 'K', 'M', 'N', 'Q',

View File

@ -335,7 +335,7 @@ def services(config, tl, ports):
name='service_query', name='service_query',
loglevel=config['loglevel'] if tl else None, loglevel=config['loglevel'] if tl else None,
), ),
tractor.get_registry( tractor.get_arbiter(
host=host, host=host,
port=ports[0] port=ports[0]
) as portal ) as portal

View File

@ -284,8 +284,7 @@ class Sampler:
except ( except (
trio.BrokenResourceError, trio.BrokenResourceError,
trio.ClosedResourceError, trio.ClosedResourceError
trio.EndOfChannel,
): ):
log.error( log.error(
f'{stream._ctx.chan.uid} dropped connection' f'{stream._ctx.chan.uid} dropped connection'
@ -698,7 +697,7 @@ async def sample_and_broadcast(
log.warning( log.warning(
f'Feed OVERRUN {sub_key}' f'Feed OVERRUN {sub_key}'
f'@{bus.brokername} -> \n' '@{bus.brokername} -> \n'
f'feed @ {chan.uid}\n' f'feed @ {chan.uid}\n'
f'throttle = {throttle} Hz' f'throttle = {throttle} Hz'
) )