Embedded Python Real-Time FrameWork : API
Build 20250616.1
|
Functions | |
def | DateTimeUs |
Return string-ified time as YYYY-MM-DD HH:MM:SS.uuuuuu. More... | |
def | IsPY3 |
def | ProgressBar |
Helpers #. More... | |
def | ReadFile |
def | TimeUs |
Return string-ified time as HH:MM:SS.uuuuuu. More... | |
Variables | |
float | _MIKE = 0.000001 |
Hard-coded. More... | |
string | _QTE_STR = ',ask_amount,ask_price,bid_price,bid_amount' |
string | _TRD_STR = ',id,side,price,amount' |
list | ask = kv[5] |
list | aSz = kv[4] |
string | aVal = '%.2f' |
list | bid = kv[6] |
tuple | bQte = ( hdr.count( _QTE_STR ) != 0 ) |
list | bSz = kv[7] |
tuple | bTrd = ( hdr.count( _TRD_STR ) != 0 ) |
string | bVal = '%.2f' |
cout = sys.stdout | |
list | hdr = sdb[0] |
string | ins = ',' |
list | kv = sdb[i] |
tuple | ns = len( sdb ) |
string | ofile = ifile+'-scrubbed' |
tuple | op = open( ofile, 'w' ) |
list | pfx = [ kv[0], kv[1], tm, '+' ] |
list | prc = kv[6] |
string | qHdr = 'Exch,Sym,Time,+,BidSize,BidVal,Bid,Ask,AskVal,AskSize' |
list | qty = kv[7] |
list | row = [ '', bSz, bVal, bid, ask, aVal, aSz ] |
list | rows = [ qHdr + ',+,' + tHdr ] |
tuple | sdb = ReadFile( ifile ) |
# | |
list | side = kv[5] |
string | tHdr = 'Side,TrdPrc,TrdVal,TrdSz' |
tuple | tm = TimeUs( _MIKE * int( kv[3] ) ) |
string | tVal = '%.2f' |
def pyRT.crypto.util.DataScrub.DateTimeUs | ( | t | ) |
Return string-ified time as YYYY-MM-DD HH:MM:SS.uuuuuu.
t | - Unix Time; |
def pyRT.crypto.util.DataScrub.IsPY3 | ( | ) |
def pyRT.crypto.util.DataScrub.ProgressBar | ( | i, | |
tck = 10000 |
|||
) |
Helpers #.
def pyRT.crypto.util.DataScrub.ReadFile | ( | pFile | ) |
def pyRT.crypto.util.DataScrub.TimeUs | ( | t | ) |
Return string-ified time as HH:MM:SS.uuuuuu.
t | - Unix Time |
float pyRT.crypto.util.DataScrub._MIKE = 0.000001 |
Hard-coded.
string pyRT.crypto.util.DataScrub._QTE_STR = ',ask_amount,ask_price,bid_price,bid_amount' |
string pyRT.crypto.util.DataScrub._TRD_STR = ',id,side,price,amount' |
list pyRT.crypto.util.DataScrub.ask = kv[5] |
list pyRT.crypto.util.DataScrub.aSz = kv[4] |
string pyRT.crypto.util.DataScrub.aVal = '%.2f' |
list pyRT.crypto.util.DataScrub.bid = kv[6] |
tuple pyRT.crypto.util.DataScrub.bQte = ( hdr.count( _QTE_STR ) != 0 ) |
list pyRT.crypto.util.DataScrub.bSz = kv[7] |
tuple pyRT.crypto.util.DataScrub.bTrd = ( hdr.count( _TRD_STR ) != 0 ) |
string pyRT.crypto.util.DataScrub.bVal = '%.2f' |
pyRT.crypto.util.DataScrub.cout = sys.stdout |
list pyRT.crypto.util.DataScrub.hdr = sdb[0] |
string pyRT.crypto.util.DataScrub.ins = ',' |
list pyRT.crypto.util.DataScrub.kv = sdb[i] |
tuple pyRT.crypto.util.DataScrub.ns = len( sdb ) |
string pyRT.crypto.util.DataScrub.ofile = ifile+'-scrubbed' |
tuple pyRT.crypto.util.DataScrub.op = open( ofile, 'w' ) |
list pyRT.crypto.util.DataScrub.prc = kv[6] |
string pyRT.crypto.util.DataScrub.qHdr = 'Exch,Sym,Time,+,BidSize,BidVal,Bid,Ask,AskVal,AskSize' |
list pyRT.crypto.util.DataScrub.qty = kv[7] |
list pyRT.crypto.util.DataScrub.side = kv[5] |
string pyRT.crypto.util.DataScrub.tHdr = 'Side,TrdPrc,TrdVal,TrdSz' |
string pyRT.crypto.util.DataScrub.tVal = '%.2f' |