In [1]:
import os, sys
sys.path.append(os.path.abspath('../../main/python'))

In [2]:
import numpy as np
import thalesians.tsa.pypes as pypes

In [3]:
pype = pypes.Pype(pypes.Direction.OUTGOING, name='liveplotpype'); pype


Out[3]:
Pype(name="liveplotpype", direction=Direction.OUTGOING, host="*", port=22184)

In [31]:
mid = 110. + np.random.normal(0, 5.)
pype.send({'mid': mid, 'buy': mid - 25., 'sell': mid + 25.})

In [32]:
pype.close()