Compare commits

...

5 Commits

Author SHA1 Message Date
Tyler Goodlet 94caa248e7 TO-CHERRY: another sampler EoC suppression case?
Not sure whether this should get cherried onto `stop_is_eoc` or
`brokers_refinery` (need to a diff between the two first) but seems like
this might be the final resiliency update? 🙏
2025-06-09 10:27:01 -04:00
Tyler Goodlet da953b6b0c Port to newer `tractor.get_registry()` 2025-06-09 10:18:08 -04:00
Tyler Goodlet fb8375f608 deribit: fill out docstr for `.api.get_values_from_cb_normalized_date()` 2025-06-09 10:17:36 -04:00
Tyler Goodlet d5faf4f59d binance: add new `permissionSets` to base `Pair` 2025-06-09 10:16:41 -04:00
Tyler Goodlet df5e72f7ae max_pain-script: bit of multi-line fmting 2025-06-09 10:11:10 -04:00
5 changed files with 19 additions and 10 deletions

View File

@ -54,9 +54,13 @@ async def max_pain_daemon(
kind=kind kind=kind
) )
print(f'Available expiration dates for {currency}-{kind}:') log.info(
print(f'{expiry_dates}') f'Available expiries for {currency!r}-{kind}:\n'
expiry_date = input('Please enter a valid expiration date: ').upper() f'{expiry_dates}\n'
)
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,6 +97,8 @@ 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,
@ -142,7 +144,6 @@ 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 piker0) # Copyright (C) Guillermo Rodriguez (in stewardship for pikers)
# 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,7 +80,6 @@ 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
@ -195,7 +194,11 @@ 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_arbiter( tractor.get_registry(
host=host, host=host,
port=ports[0] port=ports[0]
) as portal ) as portal

View File

@ -284,7 +284,8 @@ 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'
@ -697,7 +698,7 @@ async def sample_and_broadcast(
log.warning( log.warning(
f'Feed OVERRUN {sub_key}' f'Feed OVERRUN {sub_key}'
'@{bus.brokername} -> \n' f'@{bus.brokername} -> \n'
f'feed @ {chan.uid}\n' f'feed @ {chan.uid}\n'
f'throttle = {throttle} Hz' f'throttle = {throttle} Hz'
) )