Embedded Python Real-Time FrameWork : API  Build 20250616.1
 All Classes Namespaces Files Functions Variables Pages
pyRT.crypto.ExchSvr Namespace Reference

cryptoOMS Exchange Server More...

Classes

class  Codec
 Codec : FlashJ-to-Exch and vice-versa. More...
 
class  Exchange
 Common Exchange Stuff. More...
 

Functions

def ExchStart
 WS.Register( WebSox._SOXEVT_END, self.OnSoxEnd ) More...
 
def ExchStop
 Stop WebSox. More...
 
def GetLiveOrderIDs
 Return Live Orders as [ OrderID1, OrderID2, ... More...
 
def GetOpenOrdersFromExch
 Query Exchange for Open Orders. More...
 
def IsRestored
 Return True and orders restored. More...
 
def On1SecTimer
 Useful Timer called every second from Zombie Thread. More...
 
def OnSoxConn
 Called BEFORE WebSox connects. More...
 
def OnSoxConnUp
 Called AFTER WebSox connects. More...
 
def OnSoxDisco
 Called BEFORE WebSox connection is shut down. More...
 
def OnSoxIdle
 Called at WebSoxConn Idle time; We check heartbeat. More...
 
def OnSoxMsg
 Called when WebSox Message Arrives. More...
 
def OnSoxStart
 Called when WebSoxConn Thread Starts. More...
 
def RestoreLiveOrders
 Restore Zombies to Live Orders from ODBC. More...
 
def Run
 gatea.sys.Thread Interface to zero out books in throttled manner More...
 
def SetState
 Set Exchange State; Propogate to FlsahJ. More...
 

Variables

 _bDoneZ
 while IsRunning() More...
 
 _bUP
 
 _ZDB
 

Detailed Description

cryptoOMS Exchange Server

Function Documentation

def pyRT.crypto.ExchSvr.ExchStart (   self)

WS.Register( WebSox._SOXEVT_END, self.OnSoxEnd )

Start Exchange

def pyRT.crypto.ExchSvr.ExchStop (   self)

Stop WebSox.

def pyRT.crypto.ExchSvr.GetLiveOrderIDs (   self,
  bLog = True 
)

Return Live Orders as [ OrderID1, OrderID2, ...

] and shove to AlgoServers

Parameters
bLog- True to log
Returns
Live Orders as [ OrderID1, OrderID2, ... ] and shove to AlgoServers
def pyRT.crypto.ExchSvr.GetOpenOrdersFromExch (   self)

Query Exchange for Open Orders.

Response as list of Orders as follows:

  1. tCreate
  2. Symbol
  3. OrderID
  4. OrdType
  5. OrdSts
  6. Price
  7. Qty
  8. Leaves
  9. TimeInForce
Returns
[ [ OrderID1, Leaves1 ], ... ] on success; None on failure
def pyRT.crypto.ExchSvr.IsRestored (   self)

Return True and orders restored.

def pyRT.crypto.ExchSvr.On1SecTimer (   self)

Useful Timer called every second from Zombie Thread.

def pyRT.crypto.ExchSvr.OnSoxConn (   self)

Called BEFORE WebSox connects.

We connect

def pyRT.crypto.ExchSvr.OnSoxConnUp (   self,
  msg 
)

Called AFTER WebSox connects.

We connect

Parameters
msg
def pyRT.crypto.ExchSvr.OnSoxDisco (   self)

Called BEFORE WebSox connection is shut down.

We re-queue subscriptions

def pyRT.crypto.ExchSvr.OnSoxIdle (   self)

Called at WebSoxConn Idle time; We check heartbeat.

def pyRT.crypto.ExchSvr.OnSoxMsg (   self,
  rx 
)

Called when WebSox Message Arrives.

Parameters
rx- Message Received
def pyRT.crypto.ExchSvr.OnSoxStart (   self)

Called when WebSoxConn Thread Starts.

We load static data.

def pyRT.crypto.ExchSvr.RestoreLiveOrders (   self)

Restore Zombies to Live Orders from ODBC.

Returns
True if restored; False if not
def pyRT.crypto.ExchSvr.Run (   self)

gatea.sys.Thread Interface to zero out books in throttled manner

def pyRT.crypto.ExchSvr.SetState (   self,
  bUP,
  msg 
)

Set Exchange State; Propogate to FlsahJ.

Parameters
bUP: True if UP
msg: Status Msg

Variable Documentation

pyRT.crypto.ExchSvr._bDoneZ

while IsRunning()

pyRT.crypto.ExchSvr._bUP
pyRT.crypto.ExchSvr._ZDB