INNER CODE UNIT · Python

handler

5ymph0en1x/SyDOM · sydom.py:69

def handler(signum, frame):
    logger.info(" This is the end !")
    ws_bmex.exit()
    exit(0)


def get_ask(k):
    list_sell = []
    data = ws_bmex.market_depth()
    for batch in data:
        if batch['symbol'] == instrument_bmex:
            if batch['side'] == 'Sell':
                list_sell.append(batch)
    list_sell.sort(key=lambda i: i['id'], reverse=True)
    return list_sell[k]['price']


def get_ask_size(k):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…