Вверх ↑
Ответов: 480
Рейтинг: 86
#1: 2022-10-06 06:29:56 ЛС | профиль | цитата
faniss, Пример вывода подписки на "trade.BTCUSDT" в MTStrTbl.
websocat_win32.exe из предыдущего сообщения должна лежать в папке вместе с программой.

Add(MainForm,2953706,112,161)
{
Width=746
Height=480
Caption="rade.BTCUSDT"
Point(onClose)
link(onCreate,133730:doConsoleExec,[])
link(onClose,133730:doConsoleTerminate,[])
}
Add(WinExec,133730,175,161)
{
FileName="websocat_win32.exe"
Param="wss://stream.binance.com:9443/ws/bnbbtc@ticker"
Mode=0
Point(doConsoleExec)
Point(doConsoleTerminate)
Point(onConsoleResult)
Point(onConsoleTerminate)
Point(doConsoleInput)
link(onExec,3814215:doString,[(214,167)(214,153)(102,153)(102,209)])
link(Params,15578961:Text,[])
link(onConsoleResult,5437590:doReplace,[])
}
Add(VisualStrings,15578961,182,119)
{
Lines=#46:wss://stream-testnet.bybit.com/realtime_public|
Width=249
}
Add(FormatStr,3814215,112,203)
{
Mask="{"op": "subscribe", "args": ["trade.BTCUSDT"]}\r\n"
link(onFString,133730:doConsoleInput,[(158,209)(158,195)])
}
Add(Replace,5437590,231,175)
{
SubStr="""
link(onReplace,13454937:doSearch,[])
}
Add(BlockFind,13454937,287,175)
{
IncludeBlock=1
StartBlock="data:[{"
EndBlock="}]"
link(onSearch,4815368:doMT,[])
}
Add(MST_RowAction,9222960,399,168)
{
MSTControl="asd"
}
Add(MT_String,4815368,343,168)
{
Delimeter=","
link(onResult,9222960:doRowAction,[])
}
Add(EventFromData,5169557,483,119)
{
link(onEvent,12470464:doSplit,[])
}
Add(StrPart,12470464,532,119)
{
Char=":"
Point(Right)
link(onSplit,5169557:doData,[(571,125)(571,111)(473,111)(473,125)])
}
Add(MTStrTbl,13766072,483,168)
{
Left=405
Top=210
Align=5
Name="asd"
Columns=#6:symbol|14:tick_direction|5:price|4:size|9:timestamp|13:trade_time_ms|4:side|8:trade_id|14:is_block_trade|
ColorItems=0
link(CodePageSet,5169557:GetData,[])
}

карма: 10

1
Голосовали:faniss