MarketByPrice via EWA/websocket; how can I read the value of Map/Entries/"Key" ?

Options

accessed MarketByPrice (6501.T) data via EWA/Python. How can I read these "Key" value? isn't it a pair of side&price?

image

Best Answer

  • jim.carroll
    Answer ✓

    Hi @kazuhisa.matsuda,

    The key type of a MarketByPrice Map is a Buffer, which is Base64-encoded. Python can decode these values:

    >>> 'OTE0MDAwMEE='.decode('base64')
    '9140000A'

Answers

  • Thank you for the response. so for Python3, it should be following?

    >>>base64.b64decode('OTE0MDAwMEE=')

    b'9140000A'