Compare commits
5 Commits
bf33cb93b1
...
94caa248e7
Author | SHA1 | Date |
---|---|---|
|
94caa248e7 | |
|
da953b6b0c | |
|
fb8375f608 | |
|
d5faf4f59d | |
|
df5e72f7ae |
|
@ -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?
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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',
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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'
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue