Skip to content

Instantly share code, notes, and snippets.

Created Jun 6, 2021
What would you like to do?
import time
import socket
HOST = 'localhost'
PORT = 9009
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((HOST, PORT))
sock.sendall(('eod,instrument=fut open=141.5,high=142.0,low=139.9,close=142.0,settle_price=143.7,value=42.27\n').encode())
except socket.error as e:
print("Got error: %s" % (e))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment