├── .gitignore ├── .travis.yml ├── .travis ├── platform.sh ├── setenv_lua.sh └── setup_lua.sh ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── README.md ├── SConstruct ├── VERSION.txt ├── auth └── zap.lua ├── built ├── README.md └── quik_lua_rpc.tar.xz ├── config.json ├── curve_keypair_generator.lua ├── docker-compose.yaml ├── docs └── python_zmq_protobuf.md ├── impl ├── event_data_converter.lua ├── event_data_serializer.lua ├── event_publisher.lua ├── json_event_publisher.lua ├── json_request_response_serde.lua ├── procedure_wrappers.lua ├── protobuf_event_data_serializer.lua ├── protobuf_event_publisher.lua ├── protobuf_request_response_serde.lua └── request_response_serde.lua ├── json └── schema │ ├── AddColumn.args.scheme.json │ ├── AddColumn.result.scheme.json │ ├── AddLabel.args.scheme.json │ ├── AddLabel.result.scheme.json │ ├── AllocTable.result.scheme.json │ ├── CalcBuySell.args.scheme.json │ ├── CalcBuySell.result.scheme.json │ ├── CancelParamRequest.args.scheme.json │ ├── CancelParamRequest.result.scheme.json │ ├── Clear.args.scheme.json │ ├── Clear.result.scheme.json │ ├── CreateWindow.args.scheme.json │ ├── CreateWindow.result.scheme.json │ ├── DelAllLabels.args.scheme.json │ ├── DelAllLabels.result.scheme.json │ ├── DelLabel.args.scheme.json │ ├── DelLabel.result.scheme.json │ ├── DeleteRow.args.scheme.json │ ├── DeleteRow.result.scheme.json │ ├── DestroyTable.args.scheme.json │ ├── DestroyTable.result.scheme.json │ ├── GetCell.args.scheme.json │ ├── GetCell.result.scheme.json │ ├── GetLabelParams.args.scheme.json │ ├── GetLabelParams.result.scheme.json │ ├── GetTableSize.args.scheme.json │ ├── GetTableSize.result.scheme.json │ ├── GetWindowCaption.args.scheme.json │ ├── GetWindowCaption.result.scheme.json │ ├── GetWindowRect.args.scheme.json │ ├── GetWindowRect.result.scheme.json │ ├── Highlight.args.scheme.json │ ├── Highlight.result.scheme.json │ ├── InsertRow.args.scheme.json │ ├── InsertRow.result.scheme.json │ ├── IsSubscribed_Level_II_Quotes.args.scheme.json │ ├── IsSubscribed_Level_II_Quotes.result.scheme.json │ ├── IsWindowClosed.args.scheme.json │ ├── IsWindowClosed.result.scheme.json │ ├── ParamRequest.args.scheme.json │ ├── ParamRequest.result.scheme.json │ ├── PrintDbgStr.args.scheme.json │ ├── QluaStructures.scheme.json │ ├── RGB.args.scheme.json │ ├── RGB.result.scheme.json │ ├── SearchItems.args.scheme.json │ ├── SearchItems.result.scheme.json │ ├── SetCell.args.scheme.json │ ├── SetCell.result.scheme.json │ ├── SetColor.args.scheme.json │ ├── SetColor.result.scheme.json │ ├── SetLabelParams.args.scheme.json │ ├── SetLabelParams.result.scheme.json │ ├── SetSelectedRow.args.scheme.json │ ├── SetSelectedRow.result.scheme.json │ ├── SetTableNotificationCallback.args.scheme.json │ ├── SetTableNotificationCallback.result.scheme.json │ ├── SetWindowCaption.args.scheme.json │ ├── SetWindowCaption.result.scheme.json │ ├── SetWindowPos.args.scheme.json │ ├── SetWindowPos.result.scheme.json │ ├── Subscribe_Level_II_Quotes.args.scheme.json │ ├── Subscribe_Level_II_Quotes.result.scheme.json │ ├── Unsubscribe_Level_II_Quotes.args.scheme.json │ ├── Unsubscribe_Level_II_Quotes.result.scheme.json │ ├── bit │ ├── band.args.scheme.json │ ├── band.result.scheme.json │ ├── bnot.args.scheme.json │ ├── bnot.result.scheme.json │ ├── bor.args.scheme.json │ ├── bor.result.scheme.json │ ├── bxor.args.scheme.json │ ├── bxor.result.scheme.json │ ├── test.args.scheme.json │ ├── test.result.scheme.json │ ├── tohex.args.scheme.json │ └── tohex.result.scheme.json │ ├── datasource │ ├── Close.args.scheme.json │ ├── Close.result.scheme.json │ ├── CreateDataSource.args.scheme.json │ ├── CreateDataSource.result.scheme.json │ ├── OHLCV.args.scheme.json │ ├── OHLCV.result.scheme.json │ ├── SetEmptyCallback.args.scheme.json │ ├── SetEmptyCallback.result.scheme.json │ ├── SetUpdateCallback.args.scheme.json │ ├── SetUpdateCallback.result.scheme.json │ ├── Size.args.scheme.json │ ├── Size.result.scheme.json │ ├── T.args.scheme.json │ └── T.result.scheme.json │ ├── getBuySellInfo.args.scheme.json │ ├── getBuySellInfo.result.scheme.json │ ├── getBuySellInfoEx.args.scheme.json │ ├── getBuySellInfoEx.result.scheme.json │ ├── getCandlesByIndex.args.scheme.json │ ├── getCandlesByIndex.result.scheme.json │ ├── getClassInfo.args.scheme.json │ ├── getClassInfo.result.scheme.json │ ├── getClassSecurities.args.scheme.json │ ├── getClassSecurities.result.scheme.json │ ├── getClassesList.result.scheme.json │ ├── getDepo.args.scheme.json │ ├── getDepo.result.scheme.json │ ├── getDepoEx.args.scheme.json │ ├── getDepoEx.result.scheme.json │ ├── getFuturesHolding.args.scheme.json │ ├── getFuturesHolding.result.scheme.json │ ├── getFuturesLimit.args.scheme.json │ ├── getFuturesLimit.result.scheme.json │ ├── getInfoParam.args.scheme.json │ ├── getInfoParam.result.scheme.json │ ├── getItem.args.scheme.json │ ├── getItem.result.scheme.json │ ├── getLinesCount.args.scheme.json │ ├── getLinesCount.result.scheme.json │ ├── getMoney.args.scheme.json │ ├── getMoney.result.scheme.json │ ├── getMoneyEx.args.scheme.json │ ├── getMoneyEx.result.scheme.json │ ├── getNumCandles.args.scheme.json │ ├── getNumCandles.result.scheme.json │ ├── getNumberOf.args.scheme.json │ ├── getNumberOf.result.scheme.json │ ├── getOrderByNumber.args.scheme.json │ ├── getOrderByNumber.result.scheme.json │ ├── getParamEx.args.scheme.json │ ├── getParamEx.result.scheme.json │ ├── getParamEx2.args.scheme.json │ ├── getParamEx2.result.scheme.json │ ├── getPortfolioInfo.args.scheme.json │ ├── getPortfolioInfo.result.scheme.json │ ├── getPortfolioInfoEx.args.scheme.json │ ├── getPortfolioInfoEx.result.scheme.json │ ├── getQuoteLevel2.args.scheme.json │ ├── getQuoteLevel2.result.scheme.json │ ├── getScriptPath.result.scheme.json │ ├── getSecurityInfo.args.scheme.json │ ├── getSecurityInfo.result.scheme.json │ ├── getTradeDate.result.scheme.json │ ├── getWorkingFolder.result.scheme.json │ ├── isConnected.result.scheme.json │ ├── message.args.scheme.json │ ├── message.result.scheme.json │ ├── os │ └── sysdate.result.scheme.json │ ├── sendTransaction.args.scheme.json │ ├── sendTransaction.result.scheme.json │ ├── sleep.args.scheme.json │ └── sleep.result.scheme.json ├── main.lua ├── qlua ├── qlua_pb_init.lua ├── qlua_pb_types.lua └── rpc │ ├── AddColumn.proto │ ├── AddLabel.proto │ ├── AllocTable.proto │ ├── CalcBuySell.proto │ ├── CancelParamRequest.proto │ ├── Clear.proto │ ├── CreateWindow.proto │ ├── DelAllLabels.proto │ ├── DelLabel.proto │ ├── DeleteRow.proto │ ├── DestroyTable.proto │ ├── GetCell.proto │ ├── GetLabelParams.proto │ ├── GetTableSize.proto │ ├── GetWindowCaption.proto │ ├── GetWindowRect.proto │ ├── Highlight.proto │ ├── InsertRow.proto │ ├── IsSubscribed_Level_II_Quotes.proto │ ├── IsWindowClosed.proto │ ├── ParamRequest.proto │ ├── PrintDbgStr.proto │ ├── RGB.proto │ ├── RPC.proto │ ├── SearchItems.proto │ ├── SetCell.proto │ ├── SetColor.proto │ ├── SetLabelParams.proto │ ├── SetSelectedRow.proto │ ├── SetTableNotificationCallback.proto │ ├── SetWindowCaption.proto │ ├── SetWindowPos.proto │ ├── Subscribe_Level_II_Quotes.proto │ ├── Unsubscribe_Level_II_Quotes.proto │ ├── bit │ ├── band.proto │ ├── bnot.proto │ ├── bor.proto │ ├── btest.proto │ ├── bxor.proto │ └── tohex.proto │ ├── datasource │ ├── C.proto │ ├── Close.proto │ ├── CreateDataSource.proto │ ├── H.proto │ ├── L.proto │ ├── O.proto │ ├── SetEmptyCallback.proto │ ├── SetUpdateCallback.proto │ ├── Size.proto │ ├── T.proto │ └── V.proto │ ├── getBuySellInfo.proto │ ├── getBuySellInfoEx.proto │ ├── getCandlesByIndex.proto │ ├── getClassInfo.proto │ ├── getClassSecurities.proto │ ├── getClassesList.proto │ ├── getDepo.proto │ ├── getDepoEx.proto │ ├── getFuturesHolding.proto │ ├── getFuturesLimit.proto │ ├── getInfoParam.proto │ ├── getItem.proto │ ├── getLinesCount.proto │ ├── getMoney.proto │ ├── getMoneyEx.proto │ ├── getNumCandles.proto │ ├── getNumberOf.proto │ ├── getOrderByNumber.proto │ ├── getParamEx.proto │ ├── getParamEx2.proto │ ├── getPortfolioInfo.proto │ ├── getPortfolioInfoEx.proto │ ├── getQuoteLevel2.proto │ ├── getScriptPath.proto │ ├── getSecurityInfo.proto │ ├── getTradeDate.proto │ ├── getWorkingFolder.proto │ ├── isConnected.proto │ ├── message.proto │ ├── os │ └── sysdate.proto │ ├── qlua_events.proto │ ├── qlua_structures.proto │ ├── qlua_types.proto │ ├── sendTransaction.proto │ └── sleep.proto ├── quik_redist ├── lua53.dll └── qlua.dll ├── redist.zip ├── service.lua ├── test └── json │ ├── DeleteRow │ ├── request.json │ └── result.json │ └── json_request_response_serde.test.lua └── utils ├── config_parser.lua ├── json.lua ├── utils.lua └── uuid.lua /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Lua sources 2 | luac.out 3 | 4 | # luarocks build files 5 | *.src.rock 6 | *.tar.gz 7 | 8 | # Object files 9 | *.o 10 | *.os 11 | *.ko 12 | *.obj 13 | *.elf 14 | 15 | # Precompiled Headers 16 | *.gch 17 | *.pch 18 | 19 | # Libraries 20 | *.lib 21 | *.a 22 | *.la 23 | *.lo 24 | *.def 25 | *.exp 26 | 27 | # Shared objects (inc. Windows DLLs) 28 | *.dll 29 | *.so 30 | *.so.* 31 | *.dylib 32 | 33 | # Executables 34 | *.exe 35 | *.out 36 | *.app 37 | *.i*86 38 | *.x86_64 39 | *.hex 40 | 41 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | 3 | sudo: false 4 | 5 | env: 6 | global: 7 | - LUAROCKS=2.3.0 8 | matrix: 9 | - LUA=lua5.1 10 | 11 | before_install: 12 | - source .travis/setenv_lua.sh 13 | - luarocks install protobuf 14 | - luarocks install luabitop 15 | - luarocks install luacov 16 | - luarocks install luacov-coveralls 17 | - luarocks install busted 18 | 19 | script: 20 | - busted --coverage test/json/*.test.lua 21 | 22 | after_success: 23 | - luacov-coveralls -e install -e test --verbose 24 | 25 | notifications: 26 | email: 27 | on_success: change 28 | on_failure: always 29 | 30 | -------------------------------------------------------------------------------- /.travis/platform.sh: -------------------------------------------------------------------------------- 1 | if [ -z "${PLATFORM:-}" ]; then 2 | PLATFORM=$TRAVIS_OS_NAME; 3 | fi 4 | 5 | if [ "$PLATFORM" == "osx" ]; then 6 | PLATFORM="macosx"; 7 | fi 8 | 9 | if [ -z "$PLATFORM" ]; then 10 | if [ "$(uname)" == "Linux" ]; then 11 | PLATFORM="linux"; 12 | else 13 | PLATFORM="macosx"; 14 | fi; 15 | fi 16 | -------------------------------------------------------------------------------- /.travis/setenv_lua.sh: -------------------------------------------------------------------------------- 1 | export PATH=${PATH}:$HOME/.lua:$HOME/.local/bin:${TRAVIS_BUILD_DIR}/install/luarocks/bin 2 | bash .travis/setup_lua.sh 3 | eval `$HOME/.lua/luarocks path` 4 | -------------------------------------------------------------------------------- /.travis/setup_lua.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # A script for setting up environment for travis-ci testing. 4 | # Sets up Lua and Luarocks. 5 | # LUA must be "lua5.1", "lua5.2" or "luajit". 6 | # luajit2.0 - master v2.0 7 | # luajit2.1 - master v2.1 8 | 9 | set -eufo pipefail 10 | 11 | LUAJIT_VERSION="2.0.4" 12 | LUAJIT_BASE="LuaJIT-$LUAJIT_VERSION" 13 | 14 | source .travis/platform.sh 15 | 16 | LUA_HOME_DIR=$TRAVIS_BUILD_DIR/install/lua 17 | 18 | LR_HOME_DIR=$TRAVIS_BUILD_DIR/install/luarocks 19 | 20 | mkdir $HOME/.lua 21 | 22 | LUAJIT="no" 23 | 24 | if [ "$PLATFORM" == "macosx" ]; then 25 | if [ "$LUA" == "luajit" ]; then 26 | LUAJIT="yes"; 27 | fi 28 | if [ "$LUA" == "luajit2.0" ]; then 29 | LUAJIT="yes"; 30 | fi 31 | if [ "$LUA" == "luajit2.1" ]; then 32 | LUAJIT="yes"; 33 | fi; 34 | elif [ "$(expr substr $LUA 1 6)" == "luajit" ]; then 35 | LUAJIT="yes"; 36 | fi 37 | 38 | mkdir -p "$LUA_HOME_DIR" 39 | 40 | if [ "$LUAJIT" == "yes" ]; then 41 | 42 | if [ "$LUA" == "luajit" ]; then 43 | curl --location https://github.com/LuaJIT/LuaJIT/archive/v$LUAJIT_VERSION.tar.gz | tar xz; 44 | else 45 | git clone https://github.com/LuaJIT/LuaJIT.git $LUAJIT_BASE; 46 | fi 47 | 48 | cd $LUAJIT_BASE 49 | 50 | if [ "$LUA" == "luajit2.1" ]; then 51 | git checkout v2.1; 52 | # force the INSTALL_TNAME to be luajit 53 | perl -i -pe 's/INSTALL_TNAME=.+/INSTALL_TNAME= luajit/' Makefile 54 | fi 55 | 56 | make && make install PREFIX="$LUA_HOME_DIR" 57 | 58 | ln -s $LUA_HOME_DIR/bin/luajit $HOME/.lua/luajit 59 | ln -s $LUA_HOME_DIR/bin/luajit $HOME/.lua/lua; 60 | 61 | else 62 | 63 | if [ "$LUA" == "lua5.1" ]; then 64 | curl http://www.lua.org/ftp/lua-5.1.5.tar.gz | tar xz 65 | cd lua-5.1.5; 66 | elif [ "$LUA" == "lua5.2" ]; then 67 | curl http://www.lua.org/ftp/lua-5.2.4.tar.gz | tar xz 68 | cd lua-5.2.4; 69 | elif [ "$LUA" == "lua5.3" ]; then 70 | curl http://www.lua.org/ftp/lua-5.3.2.tar.gz | tar xz 71 | cd lua-5.3.2; 72 | fi 73 | 74 | # Build Lua without backwards compatibility for testing 75 | perl -i -pe 's/-DLUA_COMPAT_(ALL|5_2)//' src/Makefile 76 | make $PLATFORM 77 | make INSTALL_TOP="$LUA_HOME_DIR" install; 78 | 79 | ln -s $LUA_HOME_DIR/bin/lua $HOME/.lua/lua 80 | ln -s $LUA_HOME_DIR/bin/luac $HOME/.lua/luac; 81 | 82 | fi 83 | 84 | cd $TRAVIS_BUILD_DIR 85 | 86 | lua -v 87 | 88 | LUAROCKS_BASE=luarocks-$LUAROCKS 89 | 90 | curl --location http://luarocks.org/releases/$LUAROCKS_BASE.tar.gz | tar xz 91 | 92 | cd $LUAROCKS_BASE 93 | 94 | if [ "$LUA" == "luajit" ]; then 95 | ./configure --lua-suffix=jit --with-lua-include="$LUA_HOME_DIR/include/luajit-2.0" --prefix="$LR_HOME_DIR"; 96 | elif [ "$LUA" == "luajit2.0" ]; then 97 | ./configure --lua-suffix=jit --with-lua-include="$LUA_HOME_DIR/include/luajit-2.0" --prefix="$LR_HOME_DIR"; 98 | elif [ "$LUA" == "luajit2.1" ]; then 99 | ./configure --lua-suffix=jit --with-lua-include="$LUA_HOME_DIR/include/luajit-2.1" --prefix="$LR_HOME_DIR"; 100 | else 101 | ./configure --with-lua="$LUA_HOME_DIR" --prefix="$LR_HOME_DIR" 102 | fi 103 | 104 | make build && make install 105 | 106 | ln -s $LR_HOME_DIR/bin/luarocks $HOME/.lua/luarocks 107 | 108 | cd $TRAVIS_BUILD_DIR 109 | 110 | luarocks --version 111 | 112 | rm -rf $LUAROCKS_BASE 113 | 114 | if [ "$LUAJIT" == "yes" ]; then 115 | rm -rf $LUAJIT_BASE; 116 | elif [ "$LUA" == "lua5.1" ]; then 117 | rm -rf lua-5.1.5; 118 | elif [ "$LUA" == "lua5.2" ]; then 119 | rm -rf lua-5.2.4; 120 | elif [ "$LUA" == "lua5.3" ]; then 121 | rm -rf lua-5.3.2; 122 | fi 123 | -------------------------------------------------------------------------------- /SConstruct: -------------------------------------------------------------------------------- 1 | """ 2 | Ссылка на загрузку Quik: https://arqatech.com/ru/support/files/ 3 | 4 | ZMQ рекомендует для Linux: sudo sysctl -w net.inet.tcp.sendspace=1300000 5 | """ 6 | 7 | import os 8 | import SCons 9 | from SCons.Environment import Environment 10 | 11 | 12 | # НАСТРОЙКА ОКРУЖЕНИЯ 13 | env_vars = os.environ 14 | env = Environment() 15 | env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1 16 | env.Replace(PROGSUFFIX='.exe') 17 | env.Replace(SHLIBSUFFIX='.dll') 18 | env.Replace(LIBSUFFIX='.lib') 19 | env.Replace(SHOBJSUFFIX='.obj') 20 | env.Replace(OBJSUFFIX='.obj') 21 | env.Replace(CC=os.environ['CC']) 22 | env.Replace(CFLAGS=os.environ['CFLAGS']) 23 | 24 | # QUIK-LUA-RPC 25 | qlr_path = env_vars['QUIK_LUA_RPC_PREFIX'] 26 | qlr_libs = ['auth', 27 | 'impl', 28 | 'json', 29 | 'qlua', 30 | 'utils', 31 | 'config.json', 32 | 'curve_keypair_generator.lua', 33 | 'main.lua', 34 | 'service.lua', 35 | ] 36 | 37 | # QUIK REDIST 38 | quik_libs_path = env_vars['QUIK_PREFIX'] 39 | quik_libs = ['qlua.dll', 'lua53.dll'] 40 | 41 | # LUA 42 | lua_path = env_vars['LUA_REPO'] 43 | lua_obj = env.SharedObject(env.Glob(f'{lua_path}/*.c')) 44 | lua_dll = env.SharedLibrary(f'{lua_path}/lua', lua_obj) 45 | 46 | # LUA-PROTOBUF 47 | lua_pb_path = env_vars['LUA_PROTOBUF_REPO'] 48 | lua_pb_dll = env.SharedLibrary(f'{lua_pb_path}/libpb.dll', 49 | f'{lua_pb_path}/pb.c', 50 | CPPPATH=lua_path, 51 | LIBPATH=quik_libs_path, 52 | LIBS=quik_libs) 53 | 54 | # LIBSODIUM 55 | sodium_built = env_vars['SODIUM_PREFIX'] 56 | 57 | # LIBZMQ 58 | libzmq_built = env_vars['LIBZMQ_PREFIX'] 59 | libzmq_dll = f'{libzmq_built}/bin/libzmq.dll' 60 | libzmq_include = f'{libzmq_built}/include' 61 | 62 | # LZMQ 63 | lzmq_path = env_vars['LZMQ_REPO'] 64 | lzmq_dll = env.SharedLibrary(f'{lzmq_path}/src/liblzmq.dll', 65 | [env.Glob(f'{lzmq_path}/src/*.c'), 66 | lua_dll, libzmq_dll], 67 | CPPPATH=(libzmq_include, lua_path)) 68 | 69 | # INSTALL 70 | inst_dir = 'built' 71 | inst_path = '{}/{}'.format(os.getcwd(), inst_dir) 72 | mingw_libs = [ 73 | '/usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/libgcc_s_seh-1.dll', 74 | '/usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/libstdc++-6.dll', 75 | ] 76 | 77 | env.Install(inst_path, 78 | [libzmq_dll, lua_dll, mingw_libs, 79 | f'{sodium_built}/bin/libsodium-23.dll']) 80 | 81 | env.InstallAs([ 82 | f'{inst_path}/lzmq.dll', 83 | f'{inst_path}/pb.dll', 84 | ], [ 85 | lzmq_dll, 86 | lua_pb_dll, 87 | ]) 88 | 89 | env.Install(f'{inst_path}/lua', [ 90 | f'{lzmq_path}/src/lua/lzmq', 91 | ]) 92 | 93 | env.Install(f'{inst_path}/lua/quik-lua-rpc', 94 | [f'{qlr_path}/{i}' for i in qlr_libs]) 95 | 96 | env.Install(f'{inst_path}/lua/lua-protobuf', [ 97 | env.Glob(f'{lua_pb_path}/*.lua'), 98 | ]) 99 | -------------------------------------------------------------------------------- /VERSION.txt: -------------------------------------------------------------------------------- 1 | v2.0-alpha 2 | -------------------------------------------------------------------------------- /built/README.md: -------------------------------------------------------------------------------- 1 | Установка 2 | ========= 3 | Распакуйте архив в каталог установки Quik. 4 | -------------------------------------------------------------------------------- /built/quik_lua_rpc.tar.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Enfernuz/quik-lua-rpc/2fb4c8fa65e196b0085a625655e4f13cb83dd68d/built/quik_lua_rpc.tar.xz -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "endpoints": [ 3 | { 4 | "type": "RPC", 5 | "serde_protocol": "protobuf", 6 | "active": true, 7 | "address": { 8 | "host": "127.0.0.1", 9 | "port": 5560 10 | }, 11 | "auth": { 12 | "mechanism": "CURVE", 13 | "plain": { 14 | "users": [ 15 | {"username": "test_user", "password": "test_password"} 16 | ] 17 | }, 18 | "curve": { 19 | "server": { 20 | "public": "rq:rM>}U?@Lns47E1%kR.o@n%FcmmsL/@{H8]yf7", 21 | "secret": "JTKVSB%%)wK0E.X)V>+}o?pNmC{O&4W4b!Ni{Lh6" 22 | }, 23 | "clients": ["Yne@$w-vo}U?@Lns47E1%kR.o@n%FcmmsL/@{H8]yf7", 46 | "secret": "JTKVSB%%)wK0E.X)V>+}o?pNmC{O&4W4b!Ni{Lh6" 47 | }, 48 | "clients": ["Yne@$w-vo.", filePath, err) 24 | error( localize(msg) ) 25 | end 26 | 27 | file:write( string.format("[pub]\n%s\n[sec]\n%s\n\n", tostring(pub), tostring(sec)) ) 28 | 29 | file:close() 30 | 31 | local msg = string.format("Ключевая пара добавлена в файл\n%s.", filePath) 32 | message( localize(msg) ) 33 | end 34 | -------------------------------------------------------------------------------- /docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | quik-lua-rpc: 4 | build: . 5 | image: quik-lua-rpc:latest 6 | container_name: quik-lua-rpc 7 | volumes: 8 | - "./built:/mnt/built:rw" 9 | -------------------------------------------------------------------------------- /impl/event_data_serializer.lua: -------------------------------------------------------------------------------- 1 | package.path = "../?.lua;" .. package.path 2 | 3 | local EventDataSerializer = {} 4 | 5 | function EventDataSerializer:new () 6 | 7 | -- "Object Oriented" Lua examples: https://habr.com/post/259265/ 8 | local public = {} 9 | 10 | -- return event_key, event_data 11 | 12 | function EventDataSerializer:OnClose () 13 | return nil, nil 14 | end 15 | 16 | function EventDataSerializer:PublisherOnline () 17 | return nil, nil 18 | end 19 | 20 | function EventDataSerializer:PublisherOffline (signal) 21 | return nil, nil 22 | end 23 | 24 | function EventDataSerializer:OnFirm (firm) 25 | return nil, nil 26 | end 27 | 28 | function EventDataSerializer:OnAllTrade (alltrade) 29 | return nil, nil 30 | end 31 | 32 | function EventDataSerializer:OnTrade (trade) 33 | return nil, nil 34 | end 35 | 36 | function EventDataSerializer:OnOrder (order) 37 | return nil, nil 38 | end 39 | 40 | function EventDataSerializer:OnAccountBalance (acc_bal) 41 | return nil, nil 42 | end 43 | 44 | function EventDataSerializer:OnFuturesLimitChange (fut_limit) 45 | return nil, nil 46 | end 47 | 48 | function EventDataSerializer:OnFuturesLimitDelete (lim_del) 49 | return nil, nil 50 | end 51 | 52 | function EventDataSerializer:OnFuturesClientHolding (fut_pos) 53 | return nil, nil 54 | end 55 | 56 | function EventDataSerializer:OnMoneyLimit (mlimit) 57 | return nil, nil 58 | end 59 | 60 | function EventDataSerializer:OnMoneyLimitDelete (mlimit_del) 61 | return nil, nil 62 | end 63 | 64 | function EventDataSerializer:OnDepoLimit (dlimit) 65 | return nil, nil 66 | end 67 | 68 | function EventDataSerializer:OnDepoLimitDelete (dlimit_del) 69 | return nil, nil 70 | end 71 | 72 | function EventDataSerializer:OnAccountPosition (acc_pos) 73 | return nil, nil 74 | end 75 | 76 | function EventDataSerializer:OnNegDeal (neg_deal) 77 | return nil, nil 78 | end 79 | 80 | function EventDataSerializer:OnNegTrade (neg_trade) 81 | return nil, nil 82 | end 83 | 84 | function EventDataSerializer:OnStopOrder (stop_order) 85 | return nil, nil 86 | end 87 | 88 | function EventDataSerializer:OnTransReply (trans_reply) 89 | return nil, nil 90 | end 91 | 92 | function EventDataSerializer:OnParam (class_code, sec_code) 93 | return nil, nil 94 | end 95 | 96 | function EventDataSerializer:OnQuote (class_code, sec_code) 97 | return nil, nil 98 | end 99 | 100 | function EventDataSerializer:OnDisconnected () 101 | return nil, nil 102 | end 103 | 104 | function EventDataSerializer:OnConnected (flag) 105 | return nil, nil 106 | end 107 | 108 | function EventDataSerializer:OnCleanUp () 109 | return nil, nil 110 | end 111 | 112 | function EventDataSerializer:OnDataSourceUpdate (update_info) 113 | return nil, nil 114 | end 115 | 116 | setmetatable(public, self) 117 | self.__index = self 118 | 119 | return public 120 | end 121 | 122 | return EventDataSerializer 123 | -------------------------------------------------------------------------------- /impl/event_publisher.lua: -------------------------------------------------------------------------------- 1 | package.path = "../?.lua;" .. package.path 2 | 3 | local zmq = require("lzmq") 4 | 5 | local EventPublisher = {} 6 | 7 | function EventPublisher:new () 8 | 9 | local private = {} 10 | private.pub_sockets = {} 11 | 12 | -- "Object Oriented" Lua examples: https://habr.com/post/259265/ 13 | local public = {} 14 | 15 | function public:publish (event_type, event_data) 16 | 17 | local pub_key, pub_data = self:serialize(event_type, event_data) 18 | 19 | for _, pub_socket in ipairs(private.pub_sockets) do 20 | 21 | local ok, err 22 | if pub_data == nil then 23 | ok, err = pcall(function() pub_socket:send(pub_key) end) -- send the subscription key 24 | -- if not ok then (log error somehow...) end 25 | else 26 | ok, err = pcall(function() pub_socket:send_more(pub_key) end) -- send the subscription key 27 | if ok then 28 | local msg = zmq.msg_init_data(pub_data) 29 | ok, err = pcall(function() msg:send(pub_socket) end) 30 | -- if not ok then (log error somehow...) end 31 | msg:close() 32 | else 33 | -- (log error somehow...) 34 | end 35 | end 36 | end 37 | 38 | end 39 | 40 | function public:add_pub_socket (pub_socket) 41 | table.sinsert(private.pub_sockets, pub_socket) 42 | end 43 | 44 | setmetatable(public, self) 45 | self.__index = self 46 | 47 | return public 48 | end 49 | 50 | return EventPublisher 51 | -------------------------------------------------------------------------------- /impl/json_event_publisher.lua: -------------------------------------------------------------------------------- 1 | package.path = "../?.lua;" .. package.path 2 | 3 | local EventPublisher = require("impl.event_publisher") 4 | local json = require("utils.json") 5 | 6 | local JsonEventPublisher = {} 7 | 8 | setmetatable(JsonEventPublisher, {__index = EventPublisher}) 9 | 10 | function JsonEventPublisher:serialize (event_type, event_data) 11 | 12 | if event_data then 13 | return event_type, json.encode(event_data) 14 | else 15 | return event_type, nil 16 | end 17 | end 18 | 19 | return JsonEventPublisher 20 | -------------------------------------------------------------------------------- /impl/protobuf_event_publisher.lua: -------------------------------------------------------------------------------- 1 | package.path = "../?.lua;" .. package.path 2 | 3 | local EventPublisher = require("impl.event_publisher") 4 | local pb_event_data_serializer = require("impl.protobuf_event_data_serializer") 5 | 6 | local ProtobufEventPublisher = {} 7 | 8 | setmetatable(ProtobufEventPublisher, {__index = EventPublisher}) 9 | 10 | -- The following functions need the module "qlua.qlua_pb_init.lua" being already loaded 11 | 12 | function ProtobufEventPublisher:serialize (event_type, event_data) 13 | return pb_event_data_serializer[event_type](pb_event_data_serializer, event_data) 14 | end 15 | 16 | return ProtobufEventPublisher 17 | -------------------------------------------------------------------------------- /impl/request_response_serde.lua: -------------------------------------------------------------------------------- 1 | package.path = "../?.lua;" .. package.path 2 | 3 | local RequestResponseSerde = {} 4 | 5 | function RequestResponseSerde:new () 6 | 7 | -- "Object Oriented" Lua examples: https://habr.com/post/259265/ 8 | local public = {} 9 | 10 | function RequestResponseSerde:deserialize_request (serialized_request) 11 | end 12 | 13 | function RequestResponseSerde:serialize_response (deserialized_response) 14 | end 15 | 16 | setmetatable(public, self) 17 | self.__index = self 18 | 19 | return public 20 | end 21 | 22 | return RequestResponseSerde 23 | -------------------------------------------------------------------------------- /json/schema/AddColumn.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/AddColumn.args.scheme.json", 4 | "title": "Аргументы процедуры AddColumn", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры AddColumn", 6 | "type": "object", 7 | "properties": { 8 | "t_id": { 9 | "description": "Параметр t_id", 10 | "type": "number" 11 | }, 12 | "iCode": { 13 | "description": "Параметр iCode", 14 | "type": "number" 15 | }, 16 | "name": { 17 | "description": "Параметр name", 18 | "type": "string" 19 | }, 20 | "is_default": { 21 | "description": "Параметр is_default", 22 | "type": "boolean" 23 | }, 24 | "par_type": { 25 | "description": "Параметр par_type", 26 | "type": "string", 27 | "pattern": "QTABLE_INT_TYPE|QTABLE_DOUBLE_TYPE|QTABLE_INT64_TYPE|QTABLE_CACHED_STRING_TYPE|QTABLE_TIME_TYPE|QTABLE_DATE_TYPE|QTABLE_STRING_TYPE" 28 | }, 29 | "width": { 30 | "description": "Параметр width", 31 | "type": "number" 32 | } 33 | }, 34 | "additionalProperties": false, 35 | "required": [ 36 | "t_id", 37 | "iCode", 38 | "name", 39 | "is_default", 40 | "par_type", 41 | "width" 42 | ] 43 | } 44 | -------------------------------------------------------------------------------- /json/schema/AddColumn.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/AddColumn.result.scheme.json", 4 | "title": "Результат процедуры AddColumn", 5 | "description": "Схема объекта результата удалённого вызова процедуры AddColumn", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "number" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/AddLabel.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/AddLabel.args.scheme.json", 4 | "title": "Аргументы процедуры AddLabel", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры AddLabel", 6 | "type": "object", 7 | "properties": { 8 | "chart_tag": { 9 | "description": "Параметр chart_tag", 10 | "type": "string" 11 | }, 12 | "label_params": { 13 | "description": "Параметр label_params", 14 | "type": "object", 15 | "additionalProperties": { 16 | "type": "string" 17 | } 18 | } 19 | }, 20 | "additionalProperties": false, 21 | "required": ["chart_tag", "label_params"] 22 | } 23 | -------------------------------------------------------------------------------- /json/schema/AddLabel.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/AddLabel.result.scheme.json", 4 | "title": "Результат процедуры AddLabel", 5 | "description": "Схема объекта результата удалённого вызова процедуры AddLabel", 6 | "type": "object", 7 | "properties": { 8 | "label_id": { 9 | "description": "Параметр label_id", 10 | "type": "number" 11 | } 12 | }, 13 | "additionalProperties": false 14 | } 15 | -------------------------------------------------------------------------------- /json/schema/AllocTable.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/AllocTable.result.scheme.json", 4 | "title": "Результат процедуры AllocTable", 5 | "description": "Схема объекта результата удалённого вызова процедуры AllocTable", 6 | "type": "object", 7 | "properties": { 8 | "t_id": { 9 | "description": "Параметр t_id", 10 | "type": "number" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["t_id"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/CalcBuySell.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/CalcBuySell.args.scheme.json", 4 | "title": "Аргументы процедуры CalcBuySell", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры CalcBuySell", 6 | "type": "object", 7 | "properties": { 8 | "class_code": { 9 | "description": "Параметр class_code", 10 | "type": "string" 11 | }, 12 | "sec_code": { 13 | "description": "Параметр sec_code", 14 | "type": "string" 15 | }, 16 | "client_code": { 17 | "description": "Параметр client_code", 18 | "type": "string" 19 | }, 20 | "account": { 21 | "description": "Параметр account", 22 | "type": "string" 23 | }, 24 | "price": { 25 | "description": "Параметр price", 26 | "$ref": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/QluaStructures.scheme.json#/definitions/NumberAsString" 27 | }, 28 | "is_buy": { 29 | "description": "Параметр is_buy", 30 | "type": "boolean" 31 | }, 32 | "is_market": { 33 | "description": "Параметр is_market", 34 | "type": "boolean" 35 | } 36 | }, 37 | "additionalProperties": false, 38 | "required": ["class_code", "sec_code", "client_code", "account", "price", "is_buy", "is_market"] 39 | } 40 | -------------------------------------------------------------------------------- /json/schema/CalcBuySell.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/CalcBuySell.result.scheme.json", 4 | "title": "Результат процедуры CalcBuySell", 5 | "description": "Схема объекта результата удалённого вызова процедуры CalcBuySell", 6 | "type": "object", 7 | "properties": { 8 | "qty": { 9 | "description": "Параметр qty", 10 | "type": "number" 11 | }, 12 | "comission": { 13 | "description": "Параметр comission", 14 | "type": "string" 15 | } 16 | }, 17 | "additionalProperties": false, 18 | "required": ["qty", "comission"] 19 | } -------------------------------------------------------------------------------- /json/schema/CancelParamRequest.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/CancelParamRequest.args.scheme.json", 4 | "title": "Аргументы процедуры CancelParamRequest", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры CancelParamRequest", 6 | "type": "object", 7 | "properties": { 8 | "class_code": { 9 | "description": "Параметр class_code", 10 | "type": "string" 11 | }, 12 | "sec_code": { 13 | "description": "Параметр sec_code", 14 | "type": "string" 15 | }, 16 | "db_name": { 17 | "description": "Параметр db_name", 18 | "type": "string" 19 | } 20 | }, 21 | "additionalProperties": false, 22 | "required": ["class_code", "sec_code", "db_name"] 23 | } 24 | -------------------------------------------------------------------------------- /json/schema/CancelParamRequest.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/CancelParamRequest.result.scheme.json", 4 | "title": "Результат процедуры CancelParamRequest", 5 | "description": "Схема объекта результата удалённого вызова процедуры CancelParamRequest", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "boolean" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/Clear.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/Clear.args.scheme.json", 4 | "title": "Аргументы процедуры Clear", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры Clear", 6 | "type": "object", 7 | "properties": { 8 | "t_id": { 9 | "description": "Параметр t_id", 10 | "type": "number" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["t_id"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/Clear.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/Clear.result.scheme.json", 4 | "title": "Результат процедуры Clear", 5 | "description": "Схема объекта результата удалённого вызова процедуры Clear", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "boolean" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/CreateWindow.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/CreateWindow.args.scheme.json", 4 | "title": "Аргументы процедуры CreateWindow", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры CreateWindow", 6 | "type": "object", 7 | "properties": { 8 | "t_id": { 9 | "description": "Параметр t_id", 10 | "type": "number" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["t_id"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/CreateWindow.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/CreateWindow.result.scheme.json", 4 | "title": "Результат процедуры CreateWindow", 5 | "description": "Схема объекта результата удалённого вызова процедуры CreateWindow", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "number" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/DelAllLabels.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/DelAllLabels.args.scheme.json", 4 | "title": "Аргументы процедуры DelAllLabels", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры DelAllLabels", 6 | "type": "object", 7 | "properties": { 8 | "chart_tag": { 9 | "description": "Параметр chart_tag", 10 | "type": "string" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["chart_tag"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/DelAllLabels.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/DelAllLabels.result.scheme.json", 4 | "title": "Результат процедуры DelAllLabels", 5 | "description": "Схема объекта результата удалённого вызова процедуры DelAllLabels", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "boolean" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/DelLabel.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/DelLabel.args.scheme.json", 4 | "title": "Аргументы процедуры DelLabel", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры DelLabel", 6 | "type": "object", 7 | "properties": { 8 | "chart_tag": { 9 | "description": "Параметр chart_tag", 10 | "type": "string" 11 | }, 12 | "label_id": { 13 | "description": "Параметр label_id", 14 | "type": "number" 15 | } 16 | }, 17 | "additionalProperties": false, 18 | "required": ["chart_tag", "label_id"] 19 | } 20 | -------------------------------------------------------------------------------- /json/schema/DelLabel.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/DelLabel.result.scheme.json", 4 | "title": "Результат процедуры DelLabel", 5 | "description": "Схема объекта результата удалённого вызова процедуры DelLabel", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "boolean" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/DeleteRow.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/DeleteRow.args.scheme.json", 4 | "title": "Аргументы процедуры DeleteRow", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры DeleteRow", 6 | "type": "object", 7 | "properties": { 8 | "t_id": { 9 | "description": "Параметр t_id", 10 | "type": "number" 11 | }, 12 | "key": { 13 | "description": "Параметр key", 14 | "type": "integer" 15 | } 16 | }, 17 | "additionalProperties": false, 18 | "required": ["t_id", "key"] 19 | } 20 | -------------------------------------------------------------------------------- /json/schema/DeleteRow.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/DeleteRow.result.scheme.json", 4 | "title": "Результат процедуры DeleteRow", 5 | "description": "Схема объекта результата удалённого вызова процедуры DeleteRow", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "boolean" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/DestroyTable.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/DestroyTable.args.scheme.json", 4 | "title": "Аргументы процедуры DestroyTable", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры DestroyTable", 6 | "type": "object", 7 | "properties": { 8 | "t_id": { 9 | "description": "Параметр t_id", 10 | "type": "number" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["t_id"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/DestroyTable.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/DestroyTable.result.scheme.json", 4 | "title": "Результат процедуры DestroyTable", 5 | "description": "Схема объекта результата удалённого вызова процедуры DestroyTable", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "boolean" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/GetCell.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/GetCell.args.scheme.json", 4 | "title": "Аргументы процедуры GetCell", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры GetCell", 6 | "type": "object", 7 | "properties": { 8 | "t_id": { 9 | "description": "Параметр t_id", 10 | "type": "number" 11 | }, 12 | "key": { 13 | "description": "Параметр key", 14 | "type": "integer" 15 | }, 16 | "code": { 17 | "description": "Параметр code", 18 | "type": "integer" 19 | } 20 | }, 21 | "additionalProperties": false, 22 | "required": ["t_id", "key", "code"] 23 | } 24 | -------------------------------------------------------------------------------- /json/schema/GetCell.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/GetCell.result.scheme.json", 4 | "title": "Результат процедуры GetCell", 5 | "description": "Схема объекта результата удалённого вызова процедуры GetCell", 6 | "type": "object", 7 | "properties": { 8 | "image": { 9 | "description": "Параметр image", 10 | "type": "string" 11 | }, 12 | "value": { 13 | "description": "Параметр value", 14 | "type": "string" 15 | } 16 | }, 17 | "additionalProperties": false 18 | } 19 | -------------------------------------------------------------------------------- /json/schema/GetLabelParams.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/GetLabelParams.args.scheme.json", 4 | "title": "Аргументы процедуры GetLabelParams", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры GetLabelParams", 6 | "type": "object", 7 | "properties": { 8 | "chart_tag": { 9 | "description": "Параметр chart_tag", 10 | "type": "string" 11 | }, 12 | "label_id": { 13 | "description": "Параметр label_id", 14 | "type": "number" 15 | } 16 | }, 17 | "additionalProperties": false, 18 | "required": ["chart_tag", "label_id"] 19 | } 20 | -------------------------------------------------------------------------------- /json/schema/GetLabelParams.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/GetLabelParams.result.scheme.json", 4 | "title": "Результат процедуры GetLabelParams", 5 | "description": "Схема объекта результата удалённого вызова процедуры GetLabelParams", 6 | "type": "object", 7 | "properties": { 8 | "label_params": { 9 | "description": "Результат", 10 | "type": "object", 11 | "additionalProperties": { 12 | "type": "string" 13 | } 14 | } 15 | }, 16 | "additionalProperties": false 17 | } 18 | -------------------------------------------------------------------------------- /json/schema/GetTableSize.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/GetTableSize.args.scheme.json", 4 | "title": "Аргументы процедуры GetTableSize", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры GetTableSize", 6 | "type": "object", 7 | "properties": { 8 | "t_id": { 9 | "description": "Параметр t_id", 10 | "type": "number" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["t_id"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/GetTableSize.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/GetTableSize.result.scheme.json", 4 | "title": "Результат процедуры GetTableSize", 5 | "description": "Схема объекта результата удалённого вызова процедуры GetTableSize", 6 | "type": "object", 7 | "properties": { 8 | "table_size": { 9 | "description": "Результат", 10 | "type": "object", 11 | "properties": { 12 | "rows": { 13 | "description": "Параметр rows", 14 | "type": "number" 15 | }, 16 | "col": { 17 | "description": "Параметр col", 18 | "type": "number" 19 | } 20 | }, 21 | "additionalProperties": false, 22 | "required": ["rows", "col"] 23 | } 24 | }, 25 | "additionalProperties": false 26 | } 27 | -------------------------------------------------------------------------------- /json/schema/GetWindowCaption.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/GetWindowCaption.args.scheme.json", 4 | "title": "Аргументы процедуры GetWindowCaption", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры GetWindowCaption", 6 | "type": "object", 7 | "properties": { 8 | "t_id": { 9 | "description": "Параметр t_id", 10 | "type": "number" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["t_id"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/GetWindowCaption.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/GetWindowCaption.result.scheme.json", 4 | "title": "Результат процедуры GetWindowCaption", 5 | "description": "Схема объекта результата удалённого вызова процедуры GetWindowCaption", 6 | "type": "object", 7 | "properties": { 8 | "caption": { 9 | "description": "Результат", 10 | "type": "string" 11 | } 12 | }, 13 | "additionalProperties": false 14 | } 15 | -------------------------------------------------------------------------------- /json/schema/GetWindowRect.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/GetWindowRect.args.scheme.json", 4 | "title": "Аргументы процедуры GetWindowRect", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры GetWindowRect", 6 | "type": "object", 7 | "properties": { 8 | "t_id": { 9 | "description": "Параметр t_id", 10 | "type": "number" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["t_id"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/GetWindowRect.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/GetWindowRect.result.scheme.json", 4 | "title": "Результат процедуры GetWindowRect", 5 | "description": "Схема объекта результата удалённого вызова процедуры GetWindowRect", 6 | "type": "object", 7 | "properties": { 8 | "window_rect": { 9 | "description": "Результат", 10 | "type": "object", 11 | "properties": { 12 | "top": { 13 | "description": "Параметр top", 14 | "type": "number" 15 | }, 16 | "left": { 17 | "description": "Параметр left", 18 | "type": "number" 19 | }, 20 | "bottom": { 21 | "description": "Параметр bottom", 22 | "type": "number" 23 | }, 24 | "right": { 25 | "description": "Параметр right", 26 | "type": "number" 27 | } 28 | }, 29 | "additionalProperties": false, 30 | "required": ["top", "left", "bottom", "right"] 31 | } 32 | }, 33 | "additionalProperties": false 34 | } 35 | -------------------------------------------------------------------------------- /json/schema/Highlight.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/Highlight.args.scheme.json", 4 | "title": "Аргументы процедуры Highlight", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры Highlight", 6 | "type": "object", 7 | "definitions": { 8 | "MatrixIndex": { 9 | "description": "Индекс элемента матрицы", 10 | "type": ["integer", "null"], 11 | "minimum": 0 12 | }, 13 | "Color": { 14 | "description": "Цвет в формате RGB", 15 | "type": ["integer", "null"] 16 | } 17 | }, 18 | "properties": { 19 | "t_id": { 20 | "description": "Параметр t_id", 21 | "type": "number" 22 | }, 23 | "row": { 24 | "description": "Параметр row", 25 | "$ref": "#/definitions/MatrixIndex" 26 | }, 27 | "col": { 28 | "description": "Параметр col", 29 | "$ref": "#/definitions/MatrixIndex" 30 | }, 31 | "b_color": { 32 | "description": "Параметр b_color", 33 | "$ref": "#/definitions/Color" 34 | }, 35 | "f_color": { 36 | "description": "Параметр f_color", 37 | "$ref": "#/definitions/Color" 38 | }, 39 | "timeout": { 40 | "description": "Параметр timeout", 41 | "type": "number" 42 | } 43 | }, 44 | "additionalProperties": false, 45 | "required": ["t_id", "timeout"] 46 | } 47 | -------------------------------------------------------------------------------- /json/schema/Highlight.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/Highlight.result.scheme.json", 4 | "title": "Результат процедуры Highlight", 5 | "description": "Схема объекта результата удалённого вызова процедуры Highlight", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "boolean" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/InsertRow.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/InsertRow.args.scheme.json", 4 | "title": "Аргументы процедуры InsertRow", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры InsertRow", 6 | "type": "object", 7 | "properties": { 8 | "t_id": { 9 | "description": "Параметр t_id", 10 | "type": "number" 11 | }, 12 | "key": { 13 | "description": "Параметр key", 14 | "type": "number" 15 | } 16 | }, 17 | "additionalProperties": false, 18 | "required": ["t_id", "key"] 19 | } 20 | -------------------------------------------------------------------------------- /json/schema/InsertRow.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/InsertRow.result.scheme.json", 4 | "title": "Результат процедуры InsertRow", 5 | "description": "Схема объекта результата удалённого вызова процедуры InsertRow", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "number" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/IsSubscribed_Level_II_Quotes.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/IsSubscribed_Level_II_Quotes.args.scheme.json", 4 | "title": "Аргументы процедуры IsSubscribed_Level_II_Quotes", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры IsSubscribed_Level_II_Quotes", 6 | "type": "object", 7 | "properties": { 8 | "class_code": { 9 | "description": "Параметр class_code", 10 | "type": "string" 11 | }, 12 | "sec_code": { 13 | "description": "Параметр sec_code", 14 | "type": "string" 15 | } 16 | }, 17 | "additionalProperties": false, 18 | "required": ["class_code", "sec_code"] 19 | } 20 | -------------------------------------------------------------------------------- /json/schema/IsSubscribed_Level_II_Quotes.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/IsSubscribed_Level_II_Quotes.result.scheme.json", 4 | "title": "Результат процедуры IsSubscribed_Level_II_Quotes", 5 | "description": "Схема объекта результата удалённого вызова процедуры IsSubscribed_Level_II_Quotes", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "boolean" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/IsWindowClosed.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/IsWindowClosed.args.scheme.json", 4 | "title": "Аргументы процедуры IsWindowClosed", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры IsWindowClosed", 6 | "type": "object", 7 | "properties": { 8 | "t_id": { 9 | "description": "Параметр t_id", 10 | "type": "number" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["t_id"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/IsWindowClosed.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/IsWindowClosed.result.scheme.json", 4 | "title": "Результат процедуры IsWindowClosed", 5 | "description": "Схема объекта результата удалённого вызова процедуры IsWindowClosed", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "boolean" 11 | } 12 | }, 13 | "additionalProperties": false 14 | } 15 | -------------------------------------------------------------------------------- /json/schema/ParamRequest.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/ParamRequest.args.scheme.json", 4 | "title": "Аргументы процедуры ParamRequest", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры ParamRequest", 6 | "type": "object", 7 | "properties": { 8 | "class_code": { 9 | "description": "Параметр class_code", 10 | "type": "string" 11 | }, 12 | "sec_code": { 13 | "description": "Параметр sec_code", 14 | "type": "string" 15 | }, 16 | "db_name": { 17 | "description": "Параметр db_name", 18 | "type": "string" 19 | } 20 | }, 21 | "additionalProperties": false, 22 | "required": ["class_code", "sec_code", "db_name"] 23 | } 24 | -------------------------------------------------------------------------------- /json/schema/ParamRequest.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/ParamRequest.result.scheme.json", 4 | "title": "Результат процедуры ParamRequest", 5 | "description": "Схема объекта результата удалённого вызова процедуры ParamRequest", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "boolean" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/PrintDbgStr.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/PrintDbgStr.args.scheme.json", 4 | "title": "Аргументы процедуры PrintDbgStr", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры PrintDbgStr", 6 | "type": "object", 7 | "properties": { 8 | "s": { 9 | "description": "Параметр s", 10 | "type": "string" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["s"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/RGB.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/RGB.args.scheme.json", 4 | "title": "Аргументы процедуры RGB", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры RGB", 6 | "type": "object", 7 | "definitions": { 8 | "ColorComponent": { 9 | "description": "Компонент цвета", 10 | "type": "integer", 11 | "minimum": 0, 12 | "maximum": 255 13 | } 14 | }, 15 | "properties": { 16 | "red": { 17 | "description": "Параметр red", 18 | "$ref": "#/definitions/ColorComponent" 19 | }, 20 | "green": { 21 | "description": "Параметр green", 22 | "$ref": "#/definitions/ColorComponent" 23 | }, 24 | "blue": { 25 | "description": "Параметр blue", 26 | "$ref": "#/definitions/ColorComponent" 27 | } 28 | }, 29 | "additionalProperties": false, 30 | "required": ["red", "green", "blue"] 31 | } 32 | -------------------------------------------------------------------------------- /json/schema/RGB.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/RGB.result.scheme.json", 4 | "title": "Результат процедуры RGB", 5 | "description": "Схема объекта результата удалённого вызова процедуры RGB", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "integer" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/SearchItems.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/SearchItems.args.scheme.json", 4 | "title": "Аргументы процедуры SearchItems", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры SearchItems", 6 | "type": "object", 7 | "definitions": { 8 | "ElementIndex": { 9 | "description": "Индекс элемента", 10 | "type": "integer", 11 | "minimum": 0 12 | }, 13 | "NullableElementIndex": { 14 | "description": "Индекс элемента", 15 | "type": ["integer", "null"], 16 | "minimum": 0 17 | } 18 | }, 19 | "properties": { 20 | "table_name": { 21 | "description": "Параметр table_name", 22 | "type": "string" 23 | }, 24 | "start_index": { 25 | "description": "Параметр start_index", 26 | "$ref": "#/definitions/ElementIndex" 27 | }, 28 | "end_index": { 29 | "description": "Параметр end_index", 30 | "$ref": "#/definitions/NullableElementIndex" 31 | }, 32 | "fn_def": { 33 | "description": "Параметр fn_def", 34 | "type": "string" 35 | }, 36 | "params": { 37 | "description": "Параметр params", 38 | "type": ["string", "null"] 39 | } 40 | }, 41 | "additionalProperties": false, 42 | "required": ["table_name", "start_index", "fn_def"] 43 | } 44 | -------------------------------------------------------------------------------- /json/schema/SearchItems.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/SearchItems.result.scheme.json", 4 | "title": "Результат процедуры SearchItems", 5 | "description": "Схема объекта результата удалённого вызова процедуры SearchItems", 6 | "type": "object", 7 | "properties": { 8 | "items_indices": { 9 | "description": "Результат", 10 | "type": "array", 11 | "items": { 12 | "type": "integer" 13 | } 14 | } 15 | }, 16 | "additionalProperties": false 17 | } 18 | -------------------------------------------------------------------------------- /json/schema/SetCell.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/SetCell.args.scheme.json", 4 | "title": "Аргументы процедуры SetCell", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры SetCell", 6 | "type": "object", 7 | "definitions": { 8 | "MatrixIndex": { 9 | "description": "Индекс элемента матрицы", 10 | "type": "integer", 11 | "minimum": 0 12 | } 13 | }, 14 | "properties": { 15 | "t_id": { 16 | "description": "Параметр t_id", 17 | "type": "number" 18 | }, 19 | "key": { 20 | "description": "Параметр key", 21 | "$ref": "#/definitions/MatrixIndex" 22 | }, 23 | "code": { 24 | "description": "Параметр code", 25 | "$ref": "#/definitions/MatrixIndex" 26 | }, 27 | "text": { 28 | "description": "Параметр text", 29 | "type": "string" 30 | }, 31 | "value": { 32 | "description": "Параметр value", 33 | "type": ["number", "null"] 34 | } 35 | }, 36 | "additionalProperties": false, 37 | "required": ["t_id", "key", "code", "text"] 38 | } 39 | -------------------------------------------------------------------------------- /json/schema/SetCell.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/SetCell.result.scheme.json", 4 | "title": "Результат процедуры SetCell", 5 | "description": "Схема объекта результата удалённого вызова процедуры SetCell", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "boolean" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/SetColor.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/SetColor.args.scheme.json", 4 | "title": "Аргументы процедуры SetColor", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры SetColor", 6 | "type": "object", 7 | "definitions": { 8 | "NullableMatrixIndex": { 9 | "description": "Индекс элемента матрицы", 10 | "type": ["integer", "null"], 11 | "minimum": 0 12 | }, 13 | "NullableColor": { 14 | "description": "Цвет в формате RGB", 15 | "type": ["integer", "null"] 16 | } 17 | }, 18 | "properties": { 19 | "t_id": { 20 | "description": "Параметр t_id", 21 | "type": "number" 22 | }, 23 | "row": { 24 | "description": "Параметр row", 25 | "$ref": "#/definitions/NullableMatrixIndex" 26 | }, 27 | "col": { 28 | "description": "Параметр col", 29 | "$ref": "#/definitions/NullableMatrixIndex" 30 | }, 31 | "b_color": { 32 | "description": "Параметр b_color", 33 | "$ref": "#/definitions/NullableColor" 34 | }, 35 | "f_color": { 36 | "description": "Параметр f_color", 37 | "$ref": "#/definitions/NullableColor" 38 | }, 39 | "sel_b_color": { 40 | "description": "Параметр sel_b_color", 41 | "$ref": "#/definitions/NullableColor" 42 | }, 43 | "sel_f_color": { 44 | "description": "Параметр sel_f_color", 45 | "$ref": "#/definitions/NullableColor" 46 | } 47 | }, 48 | "additionalProperties": false, 49 | "required": ["t_id"] 50 | } 51 | -------------------------------------------------------------------------------- /json/schema/SetColor.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/SetColor.result.scheme.json", 4 | "title": "Результат процедуры SetColor", 5 | "description": "Схема объекта результата удалённого вызова процедуры SetColor", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "boolean" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/SetLabelParams.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/SetLabelParams.args.scheme.json", 4 | "title": "Аргументы процедуры SetLabelParams", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры SetLabelParams", 6 | "type": "object", 7 | "properties": { 8 | "chart_tag": { 9 | "description": "Параметр chart_tag", 10 | "type": "string" 11 | }, 12 | "label_id": { 13 | "description": "Параметр label_id", 14 | "type": "number" 15 | }, 16 | "label_params": { 17 | "description": "Параметр label_params", 18 | "type": "object", 19 | "additionalProperties": { 20 | "type": "string" 21 | } 22 | } 23 | }, 24 | "additionalProperties": false, 25 | "required": ["chart_tag", "label_id", "label_params"] 26 | } 27 | -------------------------------------------------------------------------------- /json/schema/SetLabelParams.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/SetLabelParams.result.scheme.json", 4 | "title": "Результат процедуры SetLabelParams", 5 | "description": "Схема объекта результата удалённого вызова процедуры SetLabelParams", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "boolean" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/SetSelectedRow.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/SetSelectedRow.args.scheme.json", 4 | "title": "Аргументы процедуры SetSelectedRow", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры SetSelectedRow", 6 | "type": "object", 7 | "properties": { 8 | "table_id": { 9 | "description": "Параметр table_id", 10 | "type": "number" 11 | }, 12 | "row": { 13 | "description": "Параметр row", 14 | "type": ["integer", "null"], 15 | "minimum": 0 16 | } 17 | }, 18 | "additionalProperties": false, 19 | "required": ["table_id"] 20 | } 21 | -------------------------------------------------------------------------------- /json/schema/SetSelectedRow.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/SetSelectedRow.result.scheme.json", 4 | "title": "Результат процедуры SetSelectedRow", 5 | "description": "Схема объекта результата удалённого вызова процедуры SetSelectedRow", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Параметр result", 10 | "type": "integer" 11 | } 12 | }, 13 | "additionalProperties": false 14 | } 15 | -------------------------------------------------------------------------------- /json/schema/SetTableNotificationCallback.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/SetTableNotificationCallback.args.scheme.json", 4 | "title": "Аргументы процедуры SetTableNotificationCallback", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры SetTableNotificationCallback", 6 | "type": "object", 7 | "properties": { 8 | "t_id": { 9 | "description": "Параметр t_id", 10 | "type": "number" 11 | }, 12 | "f_cb_def": { 13 | "description": "Параметр f_cb_def", 14 | "type": "string" 15 | } 16 | }, 17 | "additionalProperties": false, 18 | "required": ["t_id", "f_cb_def"] 19 | } 20 | -------------------------------------------------------------------------------- /json/schema/SetTableNotificationCallback.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/SetTableNotificationCallback.result.scheme.json", 4 | "title": "Результат процедуры SetTableNotificationCallback", 5 | "description": "Схема объекта результата удалённого вызова процедуры SetTableNotificationCallback", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Параметр result", 10 | "type": "integer" 11 | } 12 | }, 13 | "additionalProperties": false 14 | } 15 | -------------------------------------------------------------------------------- /json/schema/SetWindowCaption.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/SetWindowCaption.args.scheme.json", 4 | "title": "Аргументы процедуры SetWindowCaption", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры SetWindowCaption", 6 | "type": "object", 7 | "properties": { 8 | "t_id": { 9 | "description": "Параметр t_id", 10 | "type": "number" 11 | }, 12 | "str": { 13 | "description": "Параметр str", 14 | "type": "string" 15 | } 16 | }, 17 | "additionalProperties": false, 18 | "required": ["t_id", "str"] 19 | } 20 | -------------------------------------------------------------------------------- /json/schema/SetWindowCaption.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/SetWindowCaption.result.scheme.json", 4 | "title": "Результат процедуры SetWindowCaption", 5 | "description": "Схема объекта результата удалённого вызова процедуры SetWindowCaption", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "boolean" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/SetWindowPos.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/SetWindowPos.args.scheme.json", 4 | "title": "Аргументы процедуры SetWindowPos", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры SetWindowPos", 6 | "type": "object", 7 | "properties": { 8 | "t_id": { 9 | "description": "Параметр t_id", 10 | "type": "number" 11 | }, 12 | "x": { 13 | "description": "Параметр x", 14 | "type": "integer" 15 | }, 16 | "y": { 17 | "description": "Параметр y", 18 | "type": "integer" 19 | }, 20 | "dx": { 21 | "description": "Параметр dx", 22 | "type": "integer" 23 | }, 24 | "dy": { 25 | "description": "Параметр dy", 26 | "type": "integer" 27 | } 28 | }, 29 | "additionalProperties": false, 30 | "required": ["t_id", "x", "y", "dx", "dy"] 31 | } 32 | -------------------------------------------------------------------------------- /json/schema/SetWindowPos.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/SetWindowPos.result.scheme.json", 4 | "title": "Результат процедуры SetWindowPos", 5 | "description": "Схема объекта результата удалённого вызова процедуры SetWindowPos", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "boolean" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/Subscribe_Level_II_Quotes.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/Subscribe_Level_II_Quotes.args.scheme.json", 4 | "title": "Аргументы процедуры Subscribe_Level_II_Quotes", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры Subscribe_Level_II_Quotes", 6 | "type": "object", 7 | "properties": { 8 | "class_code": { 9 | "description": "Параметр class_code", 10 | "type": "string" 11 | }, 12 | "sec_code": { 13 | "description": "Параметр sec_code", 14 | "type": "string" 15 | } 16 | }, 17 | "additionalProperties": false, 18 | "required": ["class_code", "sec_code"] 19 | } 20 | -------------------------------------------------------------------------------- /json/schema/Subscribe_Level_II_Quotes.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/Subscribe_Level_II_Quotes.result.scheme.json", 4 | "title": "Результат процедуры Subscribe_Level_II_Quotes", 5 | "description": "Схема объекта результата удалённого вызова процедуры Subscribe_Level_II_Quotes", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "boolean" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/Unsubscribe_Level_II_Quotes.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/Unsubscribe_Level_II_Quotes.args.scheme.json", 4 | "title": "Аргументы процедуры Unsubscribe_Level_II_Quotes", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры Unsubscribe_Level_II_Quotes", 6 | "type": "object", 7 | "properties": { 8 | "class_code": { 9 | "description": "Параметр class_code", 10 | "type": "string" 11 | }, 12 | "sec_code": { 13 | "description": "Параметр sec_code", 14 | "type": "string" 15 | } 16 | }, 17 | "additionalProperties": false, 18 | "required": ["class_code", "sec_code"] 19 | } 20 | -------------------------------------------------------------------------------- /json/schema/Unsubscribe_Level_II_Quotes.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/Unsubscribe_Level_II_Quotes.result.scheme.json", 4 | "title": "Результат процедуры Unsubscribe_Level_II_Quotes", 5 | "description": "Схема объекта результата удалённого вызова процедуры Unsubscribe_Level_II_Quotes", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "boolean" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/bit/band.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/bit/band.args.scheme.json", 4 | "title": "Аргументы процедуры bit.band", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры bit.band", 6 | "type": "object", 7 | "properties": { 8 | "x1": { 9 | "description": "Параметр x1", 10 | "type": "number" 11 | }, 12 | "x2": { 13 | "description": "Параметр x2", 14 | "type": "number" 15 | }, 16 | "xi": { 17 | "description": "Параметр xi", 18 | "type": "array", 19 | "items": { 20 | "type": "number" 21 | } 22 | } 23 | }, 24 | "additionalProperties": false, 25 | "required": ["x1", "x2"] 26 | } 27 | -------------------------------------------------------------------------------- /json/schema/bit/band.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/bit/band.result.scheme.json", 4 | "title": "Результат процедуры bit.band", 5 | "description": "Схема объекта результата удалённого вызова процедуры bit.band", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "number" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/bit/bnot.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/bit/bnot.args.scheme.json", 4 | "title": "Аргументы процедуры bit.bnot", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры bit.bnot", 6 | "type": "object", 7 | "properties": { 8 | "x": { 9 | "description": "Параметр x", 10 | "type": "number" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["x1", "x2"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/bit/bnot.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/bit/bnot.result.scheme.json", 4 | "title": "Результат процедуры bit.bnot", 5 | "description": "Схема объекта результата удалённого вызова процедуры bit.bnot", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "number" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/bit/bor.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/bit/bor.args.scheme.json", 4 | "title": "Аргументы процедуры bit.bor", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры bit.bor", 6 | "type": "object", 7 | "properties": { 8 | "x1": { 9 | "description": "Параметр x1", 10 | "type": "number" 11 | }, 12 | "x2": { 13 | "description": "Параметр x2", 14 | "type": "number" 15 | }, 16 | "xi": { 17 | "description": "Параметр xi", 18 | "type": "array", 19 | "items": { 20 | "type": "number" 21 | } 22 | } 23 | }, 24 | "additionalProperties": false, 25 | "required": ["x1", "x2"] 26 | } 27 | -------------------------------------------------------------------------------- /json/schema/bit/bor.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/bit/bor.result.scheme.json", 4 | "title": "Результат процедуры bit.bor", 5 | "description": "Схема объекта результата удалённого вызова процедуры bit.bor", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "number" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/bit/bxor.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/bit/bxor.args.scheme.json", 4 | "title": "Аргументы процедуры bit.bxor", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры bit.bxor", 6 | "type": "object", 7 | "properties": { 8 | "x1": { 9 | "description": "Параметр x1", 10 | "type": "number" 11 | }, 12 | "x2": { 13 | "description": "Параметр x2", 14 | "type": "number" 15 | }, 16 | "xi": { 17 | "description": "Параметр xi", 18 | "type": "array", 19 | "items": { 20 | "type": "number" 21 | } 22 | } 23 | }, 24 | "additionalProperties": false, 25 | "required": ["x1", "x2"] 26 | } 27 | -------------------------------------------------------------------------------- /json/schema/bit/bxor.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/bit/bxor.result.scheme.json", 4 | "title": "Результат процедуры bit.bxor", 5 | "description": "Схема объекта результата удалённого вызова процедуры bit.bxor", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "number" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/bit/test.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/bit/test.args.scheme.json", 4 | "title": "Аргументы процедуры bit.test", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры bit.test", 6 | "type": "object", 7 | "properties": { 8 | "x": { 9 | "description": "Параметр x", 10 | "type": "number" 11 | }, 12 | "n": { 13 | "description": "Параметр n", 14 | "type": "integer", 15 | "minimum": 0 16 | } 17 | }, 18 | "additionalProperties": false, 19 | "required": ["x", "n"] 20 | } 21 | -------------------------------------------------------------------------------- /json/schema/bit/test.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/bit/band.result.scheme.json", 4 | "title": "Результат процедуры bit.band", 5 | "description": "Схема объекта результата удалённого вызова процедуры bit.band", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "boolean" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/bit/tohex.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/bit/tohex.args.scheme.json", 4 | "title": "Аргументы процедуры bit.tohex", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры bit.tohex", 6 | "type": "object", 7 | "properties": { 8 | "x": { 9 | "description": "Параметр x", 10 | "type": "number" 11 | }, 12 | "n": { 13 | "description": "Параметр n", 14 | "type": "integer", 15 | "minimum": 0 16 | } 17 | }, 18 | "additionalProperties": false, 19 | "required": ["x"] 20 | } 21 | -------------------------------------------------------------------------------- /json/schema/bit/tohex.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/bit/tohex.result.scheme.json", 4 | "title": "Результат процедуры bit.tohex", 5 | "description": "Схема объекта результата удалённого вызова процедуры bit.tohex", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "string" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/datasource/Close.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/datasource/Close.args.scheme.json", 4 | "title": "Аргументы процедуры datasource.Close", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры datasource.Close", 6 | "type": "object", 7 | "properties": { 8 | "datasource_uuid": { 9 | "description": "Параметр datasource_uuid", 10 | "$ref": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/QluaStructures.scheme.json#/definitions/DatasourceUUID" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["datasource_uuid"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/datasource/Close.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/datasource/Close.result.scheme.json", 4 | "title": "Результат процедуры datasource.Close", 5 | "description": "Схема объекта результата удалённого вызова процедуры datasource.Close", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "boolean" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/datasource/CreateDataSource.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/datasource/CreateDataSource.args.scheme.json", 4 | "title": "Аргументы процедуры datasource.CreateDataSource", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры datasource.CreateDataSource", 6 | "type": "object", 7 | "properties": { 8 | "class_code": { 9 | "description": "Параметр class_code", 10 | "type": "string" 11 | }, 12 | "sec_code": { 13 | "description": "Параметр sec_code", 14 | "type": "string" 15 | }, 16 | "interval": { 17 | "description": "Параметр interval", 18 | "type": "string", 19 | "pattern": "INTERVAL_TICK|INTERVAL_M1|INTERVAL_M2|INTERVAL_M3|INTERVAL_M4|INTERVAL_M5|INTERVAL_M6|INTERVAL_M10|INTERVAL_M15|INTERVAL_M20|INTERVAL_M30|INTERVAL_H1|INTERVAL_H2|INTERVAL_H4|INTERVAL_D1|INTERVAL_W1|INTERVAL_MN1" 20 | }, 21 | "param": { 22 | "description": "Параметр param", 23 | "type": "string" 24 | } 25 | }, 26 | "additionalProperties": false, 27 | "required": ["class_code", "sec_code", "interval"] 28 | } 29 | -------------------------------------------------------------------------------- /json/schema/datasource/CreateDataSource.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/datasource/CreateDataSource.result.scheme.json", 4 | "title": "Результат процедуры datasource.CreateDataSource", 5 | "description": "Схема объекта результата удалённого вызова процедуры datasource.CreateDataSource", 6 | "type": "object", 7 | "properties": { 8 | "datasource_uuid": { 9 | "description": "UUID созданного источника данных", 10 | "$ref": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/QluaStructures.scheme.json#/definitions/DatasourceUUID" 11 | }, 12 | "error_desc": { 13 | "description": "Описание ошибки, если таковая возникла", 14 | "type": "string" 15 | }, 16 | "is_error": { 17 | "description": "Флаг наличия ошибки", 18 | "type": "boolean" 19 | } 20 | }, 21 | "additionalProperties": false, 22 | "required": ["is_error"] 23 | } 24 | -------------------------------------------------------------------------------- /json/schema/datasource/OHLCV.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/datasource/OHLCV.args.scheme.json", 4 | "title": "Аргументы процедур datasource.O, H, L, C, V", 5 | "description": "Схема объекта аргументов к удалённому вызову процедур datasource.O, H, L, C, V", 6 | "type": "object", 7 | "properties": { 8 | "datasource_uuid": { 9 | "description": "Параметр datasource_uuid", 10 | "$ref": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/QluaStructures.scheme.json#/definitions/DatasourceUUID" 11 | }, 12 | "candle_index": { 13 | "description": "Параметр candle_index", 14 | "$ref": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/QluaStructures.scheme.json#/definitions/Index" 15 | } 16 | }, 17 | "additionalProperties": false, 18 | "required": ["datasource_uuid", "candle_index"] 19 | } 20 | -------------------------------------------------------------------------------- /json/schema/datasource/OHLCV.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/datasource/OHLCV.result.scheme.json", 4 | "title": "Результат процедур datasource.O, H, L, C, V", 5 | "description": "Схема объекта результата удалённого вызова процедур datasource.O, H, L, C, V", 6 | "type": "object", 7 | "properties": { 8 | "value": { 9 | "description": "Результат", 10 | "$ref": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/QluaStructures.scheme.json#/definitions/NumberAsString" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["value"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/datasource/SetEmptyCallback.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/datasource/SetEmptyCallback.args.scheme.json", 4 | "title": "Аргументы процедуры datasource.SetEmptyCallback", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры datasource.SetEmptyCallback", 6 | "type": "object", 7 | "properties": { 8 | "datasource_uuid": { 9 | "description": "Параметр datasource_uuid", 10 | "$ref": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/QluaStructures.scheme.json#/definitions/DatasourceUUID" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["datasource_uuid"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/datasource/SetEmptyCallback.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/datasource/SetEmptyCallback.result.scheme.json", 4 | "title": "Результат процедуры datasource.SetEmptyCallback", 5 | "description": "Схема объекта результата удалённого вызова процедуры datasource.SetEmptyCallback", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "boolean" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/datasource/SetUpdateCallback.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/datasource/SetUpdateCallback.args.scheme.json", 4 | "title": "Аргументы процедуры datasource.SetUpdateCallback", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры datasource.SetUpdateCallback", 6 | "type": "object", 7 | "properties": { 8 | "datasource_uuid": { 9 | "description": "Параметр datasource_uuid", 10 | "$ref": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/QluaStructures.scheme.json#/definitions/DatasourceUUID" 11 | }, 12 | "f_cb_def": { 13 | "description": "Параметр f_cb_def", 14 | "type": "string" 15 | }, 16 | "watching_O": { 17 | "description": "Параметр watching_O", 18 | "type": "boolean" 19 | }, 20 | "watching_H": { 21 | "description": "Параметр watching_H", 22 | "type": "boolean" 23 | }, 24 | "watching_L": { 25 | "description": "Параметр watching_L", 26 | "type": "boolean" 27 | }, 28 | "watching_C": { 29 | "description": "Параметр watching_C", 30 | "type": "boolean" 31 | }, 32 | "watching_V": { 33 | "description": "Параметр watching_V", 34 | "type": "boolean" 35 | }, 36 | "watching_T": { 37 | "description": "Параметр watching_T", 38 | "type": "boolean" 39 | }, 40 | "watching_Size": { 41 | "description": "Параметр watching_Size", 42 | "type": "boolean" 43 | } 44 | }, 45 | "additionalProperties": false, 46 | "required": ["datasource_uuid", "f_cb_def"] 47 | } 48 | -------------------------------------------------------------------------------- /json/schema/datasource/SetUpdateCallback.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/datasource/SetUpdateCallback.result.scheme.json", 4 | "title": "Результат процедуры datasource.SetUpdateCallback", 5 | "description": "Схема объекта результата удалённого вызова процедуры datasource.SetUpdateCallback", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "boolean" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/datasource/Size.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/datasource/Size.args.scheme.json", 4 | "title": "Аргументы процедуры datasource.Size", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры datasource.Size", 6 | "type": "object", 7 | "properties": { 8 | "datasource_uuid": { 9 | "description": "Параметр datasource_uuid", 10 | "$ref": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/QluaStructures.scheme.json#/definitions/DatasourceUUID" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["datasource_uuid"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/datasource/Size.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/datasource/Size.result.scheme.json", 4 | "title": "Результат процедуры datasource.Size", 5 | "description": "Схема объекта результата удалённого вызова процедуры datasource.Size", 6 | "type": "object", 7 | "properties": { 8 | "value": { 9 | "description": "Результат", 10 | "type": "integer" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["value"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/datasource/T.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/datasource/T.args.scheme.json", 4 | "title": "Аргументы процедуры datasource.T", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры datasource.T", 6 | "type": "object", 7 | "properties": { 8 | "datasource_uuid": { 9 | "description": "Параметр datasource_uuid", 10 | "$ref": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/QluaStructures.scheme.json#/definitions/DatasourceUUID" 11 | }, 12 | "candle_index": { 13 | "description": "Параметр candle_index", 14 | "$ref": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/QluaStructures.scheme.json#/definitions/Index" 15 | } 16 | }, 17 | "additionalProperties": false, 18 | "required": ["datasource_uuid", "candle_index"] 19 | } 20 | -------------------------------------------------------------------------------- /json/schema/datasource/T.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/datasource/T.result.scheme.json", 4 | "title": "Результат процедуры datasource.T", 5 | "description": "Схема объекта результата удалённого вызова процедуры datasource.T", 6 | "type": "object", 7 | "properties": { 8 | "time": { 9 | "description": "Параметр time", 10 | "$ref": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/QluaStructures.scheme.json#/definitions/DatasourceTime" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["time"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/getBuySellInfo.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getBuySellInfo.args.scheme.json", 4 | "title": "Аргументы процедуры getBuySellInfo", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры getBuySellInfo", 6 | "type": "object", 7 | "properties": { 8 | "firm_id": { 9 | "description": "Параметр firm_id", 10 | "type": "string" 11 | }, 12 | "client_code": { 13 | "description": "Параметр client_code", 14 | "type": "string" 15 | }, 16 | "class_code": { 17 | "description": "Параметр class_code", 18 | "type": "string" 19 | }, 20 | "sec_code": { 21 | "description": "Параметр sec_code", 22 | "type": "string" 23 | }, 24 | "price": { 25 | "description": "Параметр price", 26 | "$ref": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/QluaStructures.scheme.json#/definitions/NumberAsString" 27 | } 28 | }, 29 | "additionalProperties": false, 30 | "required": ["firm_id", "client_code", "class_code", "sec_code", "price"] 31 | } 32 | -------------------------------------------------------------------------------- /json/schema/getBuySellInfoEx.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getBuySellInfoEx.args.scheme.json", 4 | "title": "Аргументы процедуры getBuySellInfoEx", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры getBuySellInfoEx", 6 | "type": "object", 7 | "properties": { 8 | "firm_id": { 9 | "description": "Параметр firm_id", 10 | "type": "string" 11 | }, 12 | "client_code": { 13 | "description": "Параметр client_code", 14 | "type": "string" 15 | }, 16 | "class_code": { 17 | "description": "Параметр class_code", 18 | "type": "string" 19 | }, 20 | "sec_code": { 21 | "description": "Параметр sec_code", 22 | "type": "string" 23 | }, 24 | "price": { 25 | "description": "Параметр price", 26 | "$ref": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/QluaStructures.scheme.json#/definitions/NumberAsString" 27 | } 28 | }, 29 | "additionalProperties": false, 30 | "required": ["firm_id", "client_code", "class_code", "sec_code", "price"] 31 | } 32 | -------------------------------------------------------------------------------- /json/schema/getCandlesByIndex.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getCandlesByIndex.args.scheme.json", 4 | "title": "Аргументы процедуры getCandlesByIndex", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры getCandlesByIndex", 6 | "type": "object", 7 | "properties": { 8 | "tag": { 9 | "description": "Параметр tag", 10 | "type": "string" 11 | }, 12 | "line": { 13 | "description": "Параметр line", 14 | "$ref": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/QluaStructures.scheme.json#/definitions/Index" 15 | }, 16 | "first_candle": { 17 | "description": "Параметр first_candle", 18 | "$ref": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/QluaStructures.scheme.json#/definitions/Index" 19 | }, 20 | "count": { 21 | "description": "Параметр count", 22 | "type": "integer", 23 | "minimum": 0 24 | } 25 | }, 26 | "additionalProperties": false, 27 | "required": ["tag", "line", "first_candle", "count"] 28 | } 29 | -------------------------------------------------------------------------------- /json/schema/getCandlesByIndex.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getCandlesByIndex.result.scheme.json", 4 | "title": "Результат процедуры getCandlesByIndex", 5 | "description": "Схема объекта результата удалённого вызова процедуры getCandlesByIndex", 6 | "type": "object", 7 | "properties": { 8 | "t": { 9 | "description": "Параметр t", 10 | "type": "array", 11 | "items": { 12 | "type": "object", 13 | "properties": { 14 | "open": { 15 | "description": "Параметр open", 16 | "type": "string" 17 | }, 18 | "close": { 19 | "description": "Параметр close", 20 | "type": "string" 21 | }, 22 | "high": { 23 | "description": "Параметр high", 24 | "type": "string" 25 | }, 26 | "low": { 27 | "description": "Параметр low", 28 | "type": "string" 29 | }, 30 | "volume": { 31 | "description": "Параметр volume", 32 | "type": "string" 33 | }, 34 | "datetime": { 35 | "description": "Параметр datetime", 36 | "$ref": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/QluaStructures.scheme.json#/definitions/DateTimeEntry" 37 | }, 38 | "does_exist": { 39 | "description": "Параметр does_exist", 40 | "type": "number" 41 | } 42 | }, 43 | "required": ["open", "close", "high", "low", "volume"] 44 | } 45 | }, 46 | "n": { 47 | "description": "Параметр n", 48 | "type": "number" 49 | }, 50 | "l": { 51 | "description": "Параметр l", 52 | "type": "string" 53 | } 54 | }, 55 | "additionalProperties": false, 56 | "required": ["t", "n", "l"] 57 | } 58 | -------------------------------------------------------------------------------- /json/schema/getClassInfo.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getClassInfo.args.scheme.json", 4 | "title": "Аргументы процедуры getClassInfo", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры getClassInfo", 6 | "type": "object", 7 | "properties": { 8 | "class_code": { 9 | "description": "Параметр class_code", 10 | "type": "string" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["class_code"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/getClassInfo.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getClassInfo.result.scheme.json", 4 | "title": "Результат процедуры getClassInfo", 5 | "description": "Схема объекта результата удалённого вызова процедуры getClassInfo", 6 | "type": "object", 7 | "properties": { 8 | "class_info": { 9 | "description": "Результат", 10 | "type": "object", 11 | "properties": { 12 | "firmid": { 13 | "description": "Параметр firmid", 14 | "type": "string" 15 | }, 16 | "name": { 17 | "description": "Параметр name", 18 | "type": "string" 19 | }, 20 | "code": { 21 | "description": "Параметр code", 22 | "type": "string" 23 | }, 24 | "npars": { 25 | "description": "Параметр npars", 26 | "type": "number" 27 | }, 28 | "nsecs": { 29 | "description": "Параметр nsecs", 30 | "type": "number" 31 | } 32 | } 33 | } 34 | }, 35 | "additionalProperties": false, 36 | "required": ["class_info"] 37 | } 38 | -------------------------------------------------------------------------------- /json/schema/getClassSecurities.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getClassSecurities.args.scheme.json", 4 | "title": "Аргументы процедуры getClassSecurities", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры getClassSecurities", 6 | "type": "object", 7 | "properties": { 8 | "class_code": { 9 | "description": "Параметр class_code", 10 | "type": "string" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["class_code"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/getClassSecurities.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getClassSecurities.result.scheme.json", 4 | "title": "Результат процедуры getClassSecurities", 5 | "description": "Схема объекта результата удалённого вызова процедуры getClassSecurities", 6 | "type": "object", 7 | "properties": { 8 | "class_securities": { 9 | "description": "Результат", 10 | "type": "string" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["class_securities"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/getClassesList.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getClassesList.result.scheme.json", 4 | "title": "Результат процедуры getClassesList", 5 | "description": "Схема объекта результата удалённого вызова процедуры getClassesList", 6 | "type": "object", 7 | "properties": { 8 | "classes_list": { 9 | "description": "Результат", 10 | "type": "string" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["classes_list"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/getDepo.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getDepo.args.scheme.json", 4 | "title": "Аргументы процедуры getDepo", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры getDepo", 6 | "type": "object", 7 | "properties": { 8 | "client_code": { 9 | "description": "Параметр client_code", 10 | "type": "string" 11 | }, 12 | "firmid": { 13 | "description": "Параметр firmid", 14 | "type": "string" 15 | }, 16 | "sec_code": { 17 | "description": "Параметр sec_code", 18 | "type": "string" 19 | }, 20 | "trdaccid": { 21 | "description": "Параметр trdaccid", 22 | "type": "string" 23 | } 24 | }, 25 | "additionalProperties": false, 26 | "required": ["client_code", "firmid", "sec_code", "trdaccid"] 27 | } 28 | -------------------------------------------------------------------------------- /json/schema/getDepo.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getDepo.result.scheme.json", 4 | "title": "Результат процедуры getDepo", 5 | "description": "Схема объекта результата удалённого вызова процедуры getDepo", 6 | "type": "object", 7 | "properties": { 8 | "depo": { 9 | "description": "Результат", 10 | "type": "object", 11 | "properties": { 12 | "depo_limit_locked_buy_value": { 13 | "description": "Параметр depo_limit_locked_buy_value", 14 | "type": "string" 15 | }, 16 | "depo_current_balance": { 17 | "description": "Параметр depo_current_balance", 18 | "type": "string" 19 | }, 20 | "depo_limit_locked_buy": { 21 | "description": "Параметр depo_limit_locked_buy", 22 | "type": "string" 23 | }, 24 | "depo_limit_locked": { 25 | "description": "Параметр depo_limit_locked", 26 | "type": "string" 27 | }, 28 | "depo_limit_available": { 29 | "description": "Параметр depo_limit_available", 30 | "type": "string" 31 | }, 32 | "depo_current_limit": { 33 | "description": "Параметр depo_current_limit", 34 | "type": "string" 35 | }, 36 | "depo_open_balance": { 37 | "description": "Параметр depo_open_balance", 38 | "type": "string" 39 | }, 40 | "depo_open_limit": { 41 | "description": "Параметр depo_open_limit", 42 | "type": "string" 43 | } 44 | } 45 | } 46 | }, 47 | "additionalProperties": false, 48 | "required": ["depo"] 49 | } 50 | -------------------------------------------------------------------------------- /json/schema/getDepoEx.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getDepoEx.args.scheme.json", 4 | "title": "Аргументы процедуры getDepoEx", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры getDepoEx", 6 | "type": "object", 7 | "properties": { 8 | "firmid": { 9 | "description": "Параметр firmid", 10 | "type": "string" 11 | }, 12 | "client_code": { 13 | "description": "Параметр client_code", 14 | "type": "string" 15 | }, 16 | "sec_code": { 17 | "description": "Параметр sec_code", 18 | "type": "string" 19 | }, 20 | "trdaccid": { 21 | "description": "Параметр trdaccid", 22 | "type": "string" 23 | }, 24 | "limit_kind": { 25 | "description": "Параметр limit_kind", 26 | "type": "integer" 27 | } 28 | }, 29 | "additionalProperties": false, 30 | "required": ["firmid", "client_code", "sec_code", "trdaccid", "limit_kind"] 31 | } 32 | -------------------------------------------------------------------------------- /json/schema/getDepoEx.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getDepoEx.result.scheme.json", 4 | "title": "Результат процедуры getDepoEx", 5 | "description": "Схема объекта результата удалённого вызова процедуры getDepoEx", 6 | "type": "object", 7 | "properties": { 8 | "depo_ex": { 9 | "description": "Результат", 10 | "type": "object", 11 | "properties": { 12 | "sec_code": { 13 | "description": "Параметр sec_code", 14 | "type": "string" 15 | }, 16 | "trdaccid": { 17 | "description": "Параметр trdaccid", 18 | "type": "string" 19 | }, 20 | "firmid": { 21 | "description": "Параметр firmid", 22 | "type": "string" 23 | }, 24 | "client_code": { 25 | "description": "Параметр client_code", 26 | "type": "string" 27 | }, 28 | "openbal": { 29 | "description": "Параметр openbal", 30 | "type": "number" 31 | }, 32 | "openlimit": { 33 | "description": "Параметр openlimit", 34 | "type": "number" 35 | }, 36 | "currentbal": { 37 | "description": "Параметр currentbal", 38 | "type": "number" 39 | }, 40 | "currentlimit": { 41 | "description": "Параметр currentlimit", 42 | "type": "number" 43 | }, 44 | "locked_sell": { 45 | "description": "Параметр locked_sell", 46 | "type": "number" 47 | }, 48 | "locked_buy": { 49 | "description": "Параметр locked_buy", 50 | "type": "number" 51 | }, 52 | "locked_buy_value": { 53 | "description": "Параметр locked_buy_value", 54 | "type": "string" 55 | }, 56 | "locked_sell_value": { 57 | "description": "Параметр locked_sell_value", 58 | "type": "string" 59 | }, 60 | "wa_position_price": { 61 | "description": "Параметр wa_position_price", 62 | "type": "string" 63 | }, 64 | "limit_kind": { 65 | "description": "Параметр limit_kind", 66 | "type": "number" 67 | } 68 | }, 69 | "required": [ 70 | "sec_code", 71 | "trdaccid", 72 | "firmid", 73 | "client_code", 74 | "openbal", 75 | "openlimit", 76 | "currentbal", 77 | "currentlimit", 78 | "locked_sell", 79 | "locked_buy", 80 | "locked_buy_value", 81 | "locked_sell_value", 82 | "wa_position_price", 83 | "limit_kind" 84 | ] 85 | } 86 | }, 87 | "additionalProperties": false, 88 | "required": ["depo_ex"] 89 | } 90 | -------------------------------------------------------------------------------- /json/schema/getFuturesHolding.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getFuturesHolding.args.scheme.json", 4 | "title": "Аргументы процедуры getFuturesHolding", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры getFuturesHolding", 6 | "type": "object", 7 | "properties": { 8 | "firmid": { 9 | "description": "Параметр firmid", 10 | "type": "string" 11 | }, 12 | "trdaccid": { 13 | "description": "Параметр trdaccid", 14 | "type": "string" 15 | }, 16 | "sec_code": { 17 | "description": "Параметр sec_code", 18 | "type": "string" 19 | }, 20 | "type": { 21 | "description": "Параметр type", 22 | "type": "integer" 23 | } 24 | }, 25 | "additionalProperties": false, 26 | "required": ["firmid", "trdaccid", "sec_code", "type"] 27 | } 28 | -------------------------------------------------------------------------------- /json/schema/getFuturesLimit.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getFuturesLimit.args.scheme.json", 4 | "title": "Аргументы процедуры getFuturesLimit", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры getFuturesLimit", 6 | "type": "object", 7 | "properties": { 8 | "firmid": { 9 | "description": "Параметр firmid", 10 | "type": "string" 11 | }, 12 | "trdaccid": { 13 | "description": "Параметр trdaccid", 14 | "type": "string" 15 | }, 16 | "limit_type": { 17 | "description": "Параметр limit_type", 18 | "type": "integer" 19 | }, 20 | "currcode": { 21 | "description": "Параметр currcode", 22 | "type": "string" 23 | } 24 | }, 25 | "additionalProperties": false, 26 | "required": ["firmid", "trdaccid", "limit_type", "currcode"] 27 | } 28 | -------------------------------------------------------------------------------- /json/schema/getFuturesLimit.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getFuturesLimit.result.scheme.json", 4 | "title": "Результат процедуры getFuturesLimit", 5 | "description": "Схема объекта результата удалённого вызова процедуры getFuturesLimit", 6 | "type": "object", 7 | "properties": { 8 | "futures_limit": { 9 | "description": "Результат", 10 | "type": "object", 11 | "properties": { 12 | "firmid": { 13 | "description": "Параметр firmid", 14 | "type": "string" 15 | }, 16 | "trdaccid": { 17 | "description": "Параметр trdaccid", 18 | "type": "string" 19 | }, 20 | "limit_type": { 21 | "description": "Параметр limit_type", 22 | "type": "number" 23 | }, 24 | "liquidity_coef": { 25 | "description": "Параметр liquidity_coef", 26 | "type": "string" 27 | }, 28 | "cbp_prev_limit": { 29 | "description": "Параметр cbp_prev_limit", 30 | "type": "string" 31 | }, 32 | "cbplimit": { 33 | "description": "Параметр cbplimit", 34 | "type": "string" 35 | }, 36 | "cbplused": { 37 | "description": "Параметр cbplused", 38 | "type": "string" 39 | }, 40 | "cbplplanned": { 41 | "description": "Параметр cbplplanned", 42 | "type": "string" 43 | }, 44 | "varmargin": { 45 | "description": "Параметр varmargin", 46 | "type": "string" 47 | }, 48 | "accruedint": { 49 | "description": "Параметр accruedint", 50 | "type": "string" 51 | }, 52 | "cbplused_for_orders": { 53 | "description": "Параметр cbplused_for_orders", 54 | "type": "string" 55 | }, 56 | "cbplused_for_positions": { 57 | "description": "Параметр cbplused_for_positions", 58 | "type": "string" 59 | }, 60 | "options_premium": { 61 | "description": "Параметр options_premium", 62 | "type": "string" 63 | }, 64 | "ts_comission": { 65 | "description": "Параметр ts_comission", 66 | "type": "string" 67 | }, 68 | "kgo": { 69 | "description": "Параметр kgo", 70 | "type": "string" 71 | }, 72 | "currcode": { 73 | "description": "Параметр currcode", 74 | "type": "string" 75 | }, 76 | "real_varmargin": { 77 | "description": "Параметр real_varmargin", 78 | "type": "string" 79 | } 80 | }, 81 | "required": ["firmid", "trdaccid", "limit_type", "currcode"] 82 | } 83 | }, 84 | "additionalProperties": false 85 | } 86 | -------------------------------------------------------------------------------- /json/schema/getInfoParam.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getInfoParam.args.scheme.json", 4 | "title": "Аргументы процедуры getInfoParam", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры getInfoParam", 6 | "type": "object", 7 | "properties": { 8 | "param_name": { 9 | "description": "Параметр param_name", 10 | "type": "string" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["param_name"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/getInfoParam.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getInfoParam.result.scheme.json", 4 | "title": "Результат процедуры getInfoParam", 5 | "description": "Схема объекта результата удалённого вызова процедуры getInfoParam", 6 | "type": "object", 7 | "properties": { 8 | "info_param": { 9 | "description": "Результат", 10 | "type": "string" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["info_param"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/getItem.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getItem.args.scheme.json", 4 | "title": "Аргументы процедуры getItem", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры getItem", 6 | "type": "object", 7 | "properties": { 8 | "table_name": { 9 | "description": "Параметр table_name", 10 | "type": "string" 11 | }, 12 | "index": { 13 | "description": "Параметр index", 14 | "$ref": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/QluaStructures.scheme.json#/definitions/Index" 15 | } 16 | }, 17 | "additionalProperties": false, 18 | "required": ["table_name", "index"] 19 | } 20 | -------------------------------------------------------------------------------- /json/schema/getItem.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getItem.result.scheme.json", 4 | "title": "Результат процедуры getItem", 5 | "description": "Схема объекта результата удалённого вызова процедуры getItem", 6 | "type": "object", 7 | "properties": { 8 | "table_row": { 9 | "description": "Параметр table_row", 10 | "type": "object", 11 | "additionalProperties": { 12 | "type": "string" 13 | } 14 | } 15 | }, 16 | "additionalProperties": false 17 | } 18 | -------------------------------------------------------------------------------- /json/schema/getLinesCount.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getLinesCount.args.scheme.json", 4 | "title": "Аргументы процедуры getLinesCount", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры getLinesCount", 6 | "type": "object", 7 | "properties": { 8 | "tag": { 9 | "description": "Параметр tag", 10 | "type": "string" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["tag"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/getLinesCount.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getLinesCount.result.scheme.json", 4 | "title": "Результат процедуры getLinesCount", 5 | "description": "Схема объекта результата удалённого вызова процедуры getLinesCount", 6 | "type": "object", 7 | "properties": { 8 | "lines_count": { 9 | "description": "Результат", 10 | "type": "number" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["lines_count"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/getMoney.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getMoney.args.scheme.json", 4 | "title": "Аргументы процедуры getMoney", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры getMoney", 6 | "type": "object", 7 | "properties": { 8 | "client_code": { 9 | "description": "Параметр client_code", 10 | "type": "string" 11 | }, 12 | "firmid": { 13 | "description": "Параметр firmid", 14 | "type": "string" 15 | }, 16 | "tag": { 17 | "description": "Параметр tag", 18 | "type": "string" 19 | }, 20 | "currcode": { 21 | "description": "Параметр currcode", 22 | "type": "string" 23 | } 24 | }, 25 | "additionalProperties": false, 26 | "required": ["client_code", "firmid", "tag", "currcode"] 27 | } 28 | -------------------------------------------------------------------------------- /json/schema/getMoney.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getMoney.result.scheme.json", 4 | "title": "Результат процедуры getMoney", 5 | "description": "Схема объекта результата удалённого вызова процедуры getMoney", 6 | "type": "object", 7 | "properties": { 8 | "money": { 9 | "description": "Результат", 10 | "type": "object", 11 | "properties": { 12 | "money_open_limit": { 13 | "description": "Параметр money_open_limit", 14 | "type": "string" 15 | }, 16 | "money_limit_locked_nonmarginal_value": { 17 | "description": "Параметр money_limit_locked_nonmarginal_value", 18 | "type": "string" 19 | }, 20 | "money_limit_locked": { 21 | "description": "Параметр money_limit_locked", 22 | "type": "string" 23 | }, 24 | "money_open_balance": { 25 | "description": "Параметр money_open_balance", 26 | "type": "string" 27 | }, 28 | "money_current_limit": { 29 | "description": "Параметр money_current_limit", 30 | "type": "string" 31 | }, 32 | "money_current_balance": { 33 | "description": "Параметр money_current_balance", 34 | "type": "string" 35 | }, 36 | "money_limit_available": { 37 | "description": "Параметр money_limit_available", 38 | "type": "string" 39 | } 40 | } 41 | } 42 | }, 43 | "additionalProperties": false, 44 | "required": ["money"] 45 | } 46 | -------------------------------------------------------------------------------- /json/schema/getMoneyEx.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getMoneyEx.args.scheme.json", 4 | "title": "Аргументы процедуры getMoneyEx", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры getMoneyEx", 6 | "type": "object", 7 | "properties": { 8 | "firmid": { 9 | "description": "Параметр firmid", 10 | "type": "string" 11 | }, 12 | "client_code": { 13 | "description": "Параметр client_code", 14 | "type": "string" 15 | }, 16 | "tag": { 17 | "description": "Параметр tag", 18 | "type": "string" 19 | }, 20 | "currcode": { 21 | "description": "Параметр currcode", 22 | "type": "string" 23 | }, 24 | "limit_kind": { 25 | "description": "Параметр limit_kind", 26 | "type": "integer" 27 | } 28 | }, 29 | "additionalProperties": false, 30 | "required": ["firmid", "client_code", "tag", "currcode", "limit_kind"] 31 | } 32 | -------------------------------------------------------------------------------- /json/schema/getMoneyEx.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getMoneyEx.result.scheme.json", 4 | "title": "Результат процедуры getMoneyEx", 5 | "description": "Схема объекта результата удалённого вызова процедуры getMoneyEx", 6 | "type": "object", 7 | "properties": { 8 | "money_ex": { 9 | "description": "Результат", 10 | "type": "object", 11 | "properties": { 12 | "currcode": { 13 | "description": "Параметр currcode", 14 | "type": "string" 15 | }, 16 | "tag": { 17 | "description": "Параметр tag", 18 | "type": "string" 19 | }, 20 | "firmid": { 21 | "description": "Параметр firmid", 22 | "type": "string" 23 | }, 24 | "client_code": { 25 | "description": "Параметр client_code", 26 | "type": "string" 27 | }, 28 | "openbal": { 29 | "description": "Параметр openbal", 30 | "type": "string" 31 | }, 32 | "openlimit": { 33 | "description": "Параметр openlimit", 34 | "type": "string" 35 | }, 36 | "currentbal": { 37 | "description": "Параметр currentbal", 38 | "type": "string" 39 | }, 40 | "currentlimit": { 41 | "description": "Параметр currentlimit", 42 | "type": "string" 43 | }, 44 | "locked": { 45 | "description": "Параметр locked", 46 | "type": "string" 47 | }, 48 | "locked_value_coef": { 49 | "description": "Параметр locked_value_coef", 50 | "type": "string" 51 | }, 52 | "locked_margin_value": { 53 | "description": "Параметр locked_margin_value", 54 | "type": "string" 55 | }, 56 | "leverage": { 57 | "description": "Параметр leverage", 58 | "type": "string" 59 | }, 60 | "limit_kind": { 61 | "description": "Параметр limit_kind", 62 | "type": "number" 63 | }, 64 | "wa_position_price": { 65 | "description": "Параметр wa_position_price", 66 | "type": "string" 67 | }, 68 | "orders_collateral": { 69 | "description": "Параметр orders_collateral", 70 | "type": "string" 71 | }, 72 | "positions_collateral": { 73 | "description": "Параметр positions_collateral", 74 | "type": "string" 75 | } 76 | }, 77 | "required": ["currcode", "tag", "firmid", "client_code", "limit_kind"] 78 | } 79 | }, 80 | "additionalProperties": false 81 | } 82 | -------------------------------------------------------------------------------- /json/schema/getNumCandles.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getNumCandles.args.scheme.json", 4 | "title": "Аргументы процедуры getNumCandles", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры getNumCandles", 6 | "type": "object", 7 | "properties": { 8 | "tag": { 9 | "description": "Параметр tag", 10 | "type": "string" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["tag"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/getNumCandles.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getNumCandles.result.scheme.json", 4 | "title": "Результат процедуры getNumCandles", 5 | "description": "Схема объекта результата удалённого вызова процедуры getNumCandles", 6 | "type": "object", 7 | "properties": { 8 | "num_candles": { 9 | "description": "Результат", 10 | "type": "number" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["num_candles"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/getNumberOf.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getNumberOf.args.scheme.json", 4 | "title": "Аргументы процедуры getNumberOf", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры getNumberOf", 6 | "type": "object", 7 | "properties": { 8 | "table_name": { 9 | "description": "Параметр table_name", 10 | "type": "string" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["table_name"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/getNumberOf.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getNumberOf.result.scheme.json", 4 | "title": "Результат процедуры getNumberOf", 5 | "description": "Схема объекта результата удалённого вызова процедуры getNumberOf", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "number" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/getOrderByNumber.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getOrderByNumber.args.scheme.json", 4 | "title": "Аргументы процедуры getOrderByNumber", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры getOrderByNumber", 6 | "type": "object", 7 | "properties": { 8 | "class_code": { 9 | "description": "Параметр class_code", 10 | "type": "string" 11 | }, 12 | "order_id": { 13 | "description": "Параметр order_id", 14 | "type": "number" 15 | } 16 | }, 17 | "additionalProperties": false, 18 | "required": ["class_code", "order_id"] 19 | } 20 | -------------------------------------------------------------------------------- /json/schema/getParamEx.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getParamEx.args.scheme.json", 4 | "title": "Аргументы процедуры getParamEx", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры getParamEx", 6 | "type": "object", 7 | "properties": { 8 | "class_code": { 9 | "description": "Параметр class_code", 10 | "type": "string" 11 | }, 12 | "sec_code": { 13 | "description": "Параметр sec_code", 14 | "type": "string" 15 | }, 16 | "param_name": { 17 | "description": "Параметр param_name", 18 | "type": "string" 19 | } 20 | }, 21 | "additionalProperties": false, 22 | "required": ["class_code", "sec_code", "param_name"] 23 | } 24 | -------------------------------------------------------------------------------- /json/schema/getParamEx.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getParamEx.result.scheme.json", 4 | "title": "Результат процедуры getParamEx", 5 | "description": "Схема объекта результата удалённого вызова процедуры getParamEx", 6 | "type": "object", 7 | "properties": { 8 | "param_ex": { 9 | "description": "Результат", 10 | "type": "object", 11 | "properties": { 12 | "param_type": { 13 | "description": "Параметр param_type", 14 | "type": "string" 15 | }, 16 | "param_value": { 17 | "description": "Параметр param_value", 18 | "type": "string" 19 | }, 20 | "param_image": { 21 | "description": "Параметр param_image", 22 | "type": "string" 23 | }, 24 | "result": { 25 | "description": "Параметр result", 26 | "type": "string" 27 | } 28 | } 29 | } 30 | }, 31 | "additionalProperties": false, 32 | "required": ["param_ex"] 33 | } 34 | -------------------------------------------------------------------------------- /json/schema/getParamEx2.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getParamEx2.args.scheme.json", 4 | "title": "Аргументы процедуры getParamEx2", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры getParamEx2", 6 | "type": "object", 7 | "properties": { 8 | "class_code": { 9 | "description": "Параметр class_code", 10 | "type": "string" 11 | }, 12 | "sec_code": { 13 | "description": "Параметр sec_code", 14 | "type": "string" 15 | }, 16 | "param_name": { 17 | "description": "Параметр param_name", 18 | "type": "string" 19 | } 20 | }, 21 | "additionalProperties": false, 22 | "required": ["class_code", "sec_code", "param_name"] 23 | } 24 | -------------------------------------------------------------------------------- /json/schema/getParamEx2.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getParamEx2.result.scheme.json", 4 | "title": "Результат процедуры getParamEx2", 5 | "description": "Схема объекта результата удалённого вызова процедуры getParamEx2", 6 | "type": "object", 7 | "properties": { 8 | "param_ex": { 9 | "description": "Результат", 10 | "type": "object", 11 | "properties": { 12 | "param_type": { 13 | "description": "Параметр param_type", 14 | "type": "string" 15 | }, 16 | "param_value": { 17 | "description": "Параметр param_value", 18 | "type": "string" 19 | }, 20 | "param_image": { 21 | "description": "Параметр param_image", 22 | "type": "string" 23 | }, 24 | "result": { 25 | "description": "Параметр result", 26 | "type": "string" 27 | } 28 | } 29 | } 30 | }, 31 | "additionalProperties": false, 32 | "required": ["param_ex"] 33 | } 34 | -------------------------------------------------------------------------------- /json/schema/getPortfolioInfo.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getPortfolioInfo.args.scheme.json", 4 | "title": "Аргументы процедуры getPortfolioInfo", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры getPortfolioInfo", 6 | "type": "object", 7 | "properties": { 8 | "firm_id": { 9 | "description": "Параметр firm_id", 10 | "type": "string" 11 | }, 12 | "client_code": { 13 | "description": "Параметр client_code", 14 | "type": "string" 15 | } 16 | }, 17 | "additionalProperties": false, 18 | "required": ["firm_id", "client_code"] 19 | } 20 | -------------------------------------------------------------------------------- /json/schema/getPortfolioInfoEx.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getPortfolioInfoEx.args.scheme.json", 4 | "title": "Аргументы процедуры getPortfolioInfoEx", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры getPortfolioInfoEx", 6 | "type": "object", 7 | "properties": { 8 | "firm_id": { 9 | "description": "Параметр firm_id", 10 | "type": "string" 11 | }, 12 | "client_code": { 13 | "description": "Параметр client_code", 14 | "type": "string" 15 | }, 16 | "limit_kind": { 17 | "description": "Параметр client_code", 18 | "type": "number" 19 | } 20 | }, 21 | "additionalProperties": false, 22 | "required": ["firm_id", "client_code", "limit_kind"] 23 | } 24 | -------------------------------------------------------------------------------- /json/schema/getQuoteLevel2.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getQuoteLevel2.args.scheme.json", 4 | "title": "Аргументы процедуры getQuoteLevel2", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры getQuoteLevel2", 6 | "type": "object", 7 | "properties": { 8 | "class_code": { 9 | "description": "Параметр class_code", 10 | "type": "string" 11 | }, 12 | "sec_code": { 13 | "description": "Параметр sec_code", 14 | "type": "string" 15 | } 16 | }, 17 | "additionalProperties": false, 18 | "required": ["class_code", "sec_code"] 19 | } 20 | -------------------------------------------------------------------------------- /json/schema/getQuoteLevel2.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getQuoteLevel2.result.scheme.json", 4 | "title": "Результат процедуры getQuoteLevel2", 5 | "description": "Схема объекта результата удалённого вызова процедуры getQuoteLevel2", 6 | "type": "object", 7 | "definitions": { 8 | "QuoteEntry": { 9 | "description": "Котировка", 10 | "type": "object", 11 | "properties": { 12 | "price": { 13 | "description": "Параметр price", 14 | "type": "string" 15 | }, 16 | "quantity": { 17 | "description": "Параметр quantity", 18 | "type": "string" 19 | } 20 | } 21 | } 22 | }, 23 | "properties": { 24 | "bid_count": { 25 | "description": "Параметр bid_count", 26 | "type": "string" 27 | }, 28 | "offer_count": { 29 | "description": "Параметр offer_count", 30 | "type": "string" 31 | }, 32 | "bids": { 33 | "description": "Параметр bid", 34 | "type": "array", 35 | "items": { 36 | "$ref": "#/definitions/QuoteEntry" 37 | } 38 | }, 39 | "offers": { 40 | "description": "Параметр offer", 41 | "type": "array", 42 | "items": { 43 | "$ref": "#/definitions/QuoteEntry" 44 | } 45 | } 46 | }, 47 | "additionalProperties": false, 48 | "required": ["bid_count", "offer_count", "bids", "offers"] 49 | } 50 | -------------------------------------------------------------------------------- /json/schema/getScriptPath.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getScriptPath.result.scheme.json", 4 | "title": "Результат процедуры getScriptPath", 5 | "description": "Схема объекта результата удалённого вызова процедуры getScriptPath", 6 | "type": "object", 7 | "properties": { 8 | "script_path": { 9 | "description": "Результат", 10 | "type": "string" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["script_path"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/getSecurityInfo.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getSecurityInfo.args.scheme.json", 4 | "title": "Аргументы процедуры getSecurityInfo", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры getSecurityInfo", 6 | "type": "object", 7 | "properties": { 8 | "class_code": { 9 | "description": "Параметр class_code", 10 | "type": "string" 11 | }, 12 | "sec_code": { 13 | "description": "Параметр sec_code", 14 | "type": "string" 15 | } 16 | }, 17 | "additionalProperties": false, 18 | "required": ["class_code", "sec_code"] 19 | } 20 | -------------------------------------------------------------------------------- /json/schema/getSecurityInfo.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getSecurityInfo.result.scheme.json", 4 | "title": "Результат процедуры getSecurityInfo", 5 | "description": "Схема объекта результата удалённого вызова процедуры getSecurityInfo", 6 | "type": "object", 7 | "definitions": { 8 | "Security": { 9 | "description": "Информация по инструменту", 10 | "type": "object", 11 | "properties": { 12 | "code": { 13 | "description": "Параметр code", 14 | "type": "string" 15 | }, 16 | "name": { 17 | "description": "Параметр name", 18 | "type": "string" 19 | }, 20 | "short_name": { 21 | "description": "Параметр short_name", 22 | "type": "string" 23 | }, 24 | "class_code": { 25 | "description": "Параметр class_code", 26 | "type": "string" 27 | }, 28 | "class_name": { 29 | "description": "Параметр class_name", 30 | "type": "string" 31 | }, 32 | "face_value": { 33 | "description": "Параметр face_value", 34 | "type": "string" 35 | }, 36 | "face_unit": { 37 | "description": "Параметр face_unit", 38 | "type": "string" 39 | }, 40 | "scale": { 41 | "description": "Параметр scale", 42 | "type": "string" 43 | }, 44 | "mat_date": { 45 | "description": "Параметр mat_date", 46 | "type": "string" 47 | }, 48 | "lot_size": { 49 | "description": "Параметр lot_size", 50 | "type": "string" 51 | }, 52 | "isin_code": { 53 | "description": "Параметр isin_code", 54 | "type": "string" 55 | }, 56 | "min_price_step": { 57 | "description": "Параметр min_price_step", 58 | "type": "string" 59 | } 60 | } 61 | } 62 | }, 63 | "properties": { 64 | "security_info": { 65 | "$ref": "#/definitions/Security" 66 | } 67 | }, 68 | "additionalProperties": false 69 | } 70 | -------------------------------------------------------------------------------- /json/schema/getTradeDate.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getTradeDate.result.scheme.json", 4 | "title": "Результат процедуры getTradeDate", 5 | "description": "Схема объекта результата удалённого вызова процедуры getTradeDate", 6 | "type": "object", 7 | "properties": { 8 | "trade_date": { 9 | "type": "object", 10 | "properties": { 11 | "date": { 12 | "description": "Параметр date", 13 | "type": "string" 14 | }, 15 | "year": { 16 | "description": "Параметр year", 17 | "type": "number" 18 | }, 19 | "month": { 20 | "description": "Параметр month", 21 | "type": "number" 22 | }, 23 | "day": { 24 | "description": "Параметр day", 25 | "type": "number" 26 | } 27 | }, 28 | "required": ["date", "year", "month", "day"] 29 | } 30 | }, 31 | "additionalProperties": false, 32 | "required": ["trade_date"] 33 | } 34 | -------------------------------------------------------------------------------- /json/schema/getWorkingFolder.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/getWorkingFolder.result.scheme.json", 4 | "title": "Результат процедуры getWorkingFolder", 5 | "description": "Схема объекта результата удалённого вызова процедуры getWorkingFolder", 6 | "type": "object", 7 | "properties": { 8 | "working_folder": { 9 | "description": "Результат", 10 | "type": "string" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["working_folder"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/isConnected.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/isConnected.result.scheme.json", 4 | "title": "Результат процедуры isConnected", 5 | "description": "Схема объекта результата удалённого вызова процедуры isConnected", 6 | "type": "object", 7 | "properties": { 8 | "is_connected": { 9 | "description": "Результат", 10 | "type": "number" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["is_connected"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/message.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/message.args.scheme.json", 4 | "title": "Аргументы процедуры message", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры message", 6 | "type": "object", 7 | "properties": { 8 | "message": { 9 | "description": "Параметр message", 10 | "type": "string" 11 | }, 12 | "icon_type": { 13 | "type": ["integer", "null"], 14 | "minimum": 1, 15 | "maximum": 3 16 | } 17 | }, 18 | "additionalProperties": false, 19 | "required": ["message"] 20 | } 21 | -------------------------------------------------------------------------------- /json/schema/message.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/message.result.scheme.json", 4 | "title": "Результат процедуры message", 5 | "description": "Схема объекта результата удалённого вызова процедуры message", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "number" 11 | } 12 | }, 13 | "additionalProperties": false 14 | } 15 | -------------------------------------------------------------------------------- /json/schema/os/sysdate.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/os/sysdate.result.scheme.json", 4 | "title": "Результат процедуры os.sysdate", 5 | "description": "Схема объекта результата удалённого вызова процедуры os.sysdate", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "$ref": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/QluaStructures.scheme.json#/definitions/DateTimeEntry" 10 | } 11 | }, 12 | "additionalProperties": false, 13 | "required": ["result"] 14 | } 15 | -------------------------------------------------------------------------------- /json/schema/sendTransaction.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/sendTransaction.args.scheme.json", 4 | "title": "Аргументы процедуры sendTransaction", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры sendTransaction", 6 | "type": "object", 7 | "properties": { 8 | "transaction": { 9 | "description": "Параметр transaction", 10 | "type": "object", 11 | "additionalProperties": { 12 | "type": "string" 13 | } 14 | } 15 | }, 16 | "additionalProperties": false, 17 | "required": ["transaction"] 18 | } 19 | -------------------------------------------------------------------------------- /json/schema/sendTransaction.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/sendTransaction.result.scheme.json", 4 | "title": "Результат процедуры sendTransaction", 5 | "description": "Схема объекта результата удалённого вызова процедуры sendTransaction", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "string" 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["result"] 15 | } 16 | -------------------------------------------------------------------------------- /json/schema/sleep.args.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/sleep.args.scheme.json", 4 | "title": "Аргументы процедуры sleep", 5 | "description": "Схема объекта аргументов к удалённому вызову процедуры sleep", 6 | "type": "object", 7 | "properties": { 8 | "time": { 9 | "description": "Параметр time", 10 | "type": "integer", 11 | "minimum": 0 12 | } 13 | }, 14 | "additionalProperties": false, 15 | "required": ["time"] 16 | } 17 | -------------------------------------------------------------------------------- /json/schema/sleep.result.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/Enfernuz/quik-lua-rpc/json/schema/Clear.result.scheme.json", 4 | "title": "Результат процедуры Clear", 5 | "description": "Схема объекта результата удалённого вызова процедуры Clear", 6 | "type": "object", 7 | "properties": { 8 | "result": { 9 | "description": "Результат", 10 | "type": "integer" 11 | } 12 | }, 13 | "additionalProperties": false 14 | } 15 | -------------------------------------------------------------------------------- /main.lua: -------------------------------------------------------------------------------- 1 | package.path = getScriptPath() .. '/?.lua;' .. package.path 2 | 3 | _G.EMPTY_TABLE = {} 4 | 5 | ----- 6 | 7 | local service = require("service") 8 | 9 | service.init() 10 | 11 | OnClose = service.event_callbacks.OnClose or service.terminate 12 | OnStop = service.event_callbacks.OnStop or service.terminate 13 | OnCleanUp = service.event_callbacks.OnCleanUp 14 | 15 | OnConnected = service.event_callbacks.OnConnected 16 | OnDisconnected = service.event_callbacks.OnDisconnected 17 | 18 | OnFirm = service.event_callbacks.OnFirm 19 | OnAllTrade = service.event_callbacks.OnAllTrade 20 | OnTrade = service.event_callbacks.OnTrade 21 | OnOrder = service.event_callbacks.OnOrder 22 | OnAccountBalance = service.event_callbacks.OnAccountBalance 23 | OnFuturesLimitChange = service.event_callbacks.OnFuturesLimitChange 24 | OnFuturesLimitDelete = service.event_callbacks.OnFuturesLimitDelete 25 | OnFuturesClientHolding = service.event_callbacks.OnFuturesClientHolding 26 | OnMoneyLimit = service.event_callbacks.OnMoneyLimit 27 | OnMoneyLimitDelete = service.event_callbacks.OnMoneyLimitDelete 28 | OnDepoLimit = service.event_callbacks.OnDepoLimit 29 | OnDepoLimitDelete = service.event_callbacks.OnDepoLimitDelete 30 | OnAccountPosition = service.event_callbacks.OnAccountPosition 31 | OnNegDeal = service.event_callbacks.OnNegDeal 32 | OnNegTrade = service.event_callbacks.OnNegTrade 33 | OnStopOrder = service.event_callbacks.OnStopOrder 34 | OnTransReply = service.event_callbacks.OnTransReply 35 | OnParam = service.event_callbacks.OnParam 36 | OnQuote = service.event_callbacks.OnQuote 37 | 38 | OnDataSourceUpdate = service.event_callbacks.OnDataSourceUpdate 39 | 40 | OnInit = function (script_path) 41 | 42 | end 43 | 44 | ----- 45 | 46 | function main () 47 | 48 | local ok, err = pcall(service.start) 49 | if not ok then 50 | message("Ошибка в функции main: "..tostring(err)) 51 | end 52 | end 53 | -------------------------------------------------------------------------------- /qlua/rpc/AddColumn.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.AddColumn; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | enum ColumnParameterType { 11 | 12 | UNDEFINED = 0; 13 | QTABLE_INT_TYPE = 1; 14 | QTABLE_DOUBLE_TYPE = 2; 15 | QTABLE_INT64_TYPE = 3; 16 | QTABLE_CACHED_STRING_TYPE = 4; 17 | QTABLE_TIME_TYPE = 5; 18 | QTABLE_DATE_TYPE = 6; 19 | QTABLE_STRING_TYPE = 7; 20 | } 21 | 22 | // Важно! Это не указано в документации к Quik: 23 | // добавлять столбцы нужно перед вызовом CreateWindow для указанной таблице. Иначе потом 24 | // вызовы AddColumn будут возвращать ответ, что столбец добавлен, но визуально ничего не изменится. 25 | // Я даже пробовал скрывать таблицу и создавать новое окно для неё, но всё равно добавленные 26 | // между делом столбцы не отобразились. 27 | message Args { 28 | 29 | int32 t_id = 1; 30 | int32 icode = 2; 31 | string name = 3; 32 | bool is_default = 4; 33 | ColumnParameterType par_type = 5; 34 | int32 width = 6; 35 | } 36 | 37 | message Result { 38 | int32 result = 1; 39 | } 40 | -------------------------------------------------------------------------------- /qlua/rpc/AddLabel.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.AddLabel; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | 12 | string chart_tag = 1; 13 | map label_params = 2; 14 | } 15 | 16 | message Result { 17 | 18 | oneof message_result { 19 | bool null_result = 1; 20 | int32 label_id = 2; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /qlua/rpc/AllocTable.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.AllocTable; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Result { 11 | int32 t_id = 1; 12 | } 13 | -------------------------------------------------------------------------------- /qlua/rpc/CalcBuySell.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.CalcBuySell; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | 12 | string class_code = 1; 13 | string sec_code = 2; 14 | string client_code = 3; 15 | string account = 4; 16 | string price = 5; 17 | bool is_buy = 6; 18 | bool is_market = 7; 19 | } 20 | 21 | message Result { 22 | 23 | int32 qty = 1; 24 | string comission = 2; 25 | } 26 | -------------------------------------------------------------------------------- /qlua/rpc/CancelParamRequest.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.CancelParamRequest; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | 12 | string class_code = 1; 13 | string sec_code = 2; 14 | string db_name = 3; 15 | } 16 | 17 | message Result { 18 | bool result = 1; 19 | } 20 | -------------------------------------------------------------------------------- /qlua/rpc/Clear.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.Clear; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | int32 t_id = 1; 12 | } 13 | 14 | message Result { 15 | bool result = 1; 16 | } 17 | -------------------------------------------------------------------------------- /qlua/rpc/CreateWindow.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.CreateWindow; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | int32 t_id = 1; 12 | } 13 | 14 | message Result { 15 | int32 result = 1; 16 | } 17 | -------------------------------------------------------------------------------- /qlua/rpc/DelAllLabels.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.DelAllLabels; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | string chart_tag = 1; 12 | } 13 | 14 | message Result { 15 | bool result = 1; 16 | } 17 | -------------------------------------------------------------------------------- /qlua/rpc/DelLabel.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.DelLabel; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | 12 | string chart_tag = 1; 13 | int32 label_id = 2; 14 | } 15 | 16 | message Result { 17 | bool result = 1; 18 | } 19 | -------------------------------------------------------------------------------- /qlua/rpc/DeleteRow.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.DeleteRow; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | 12 | int32 t_id = 1; 13 | int32 key = 2; 14 | } 15 | 16 | message Result { 17 | bool result = 1; 18 | } 19 | -------------------------------------------------------------------------------- /qlua/rpc/DestroyTable.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.DestroyTable; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | int32 t_id = 1; 12 | } 13 | 14 | message Result { 15 | bool result = 1; 16 | } 17 | -------------------------------------------------------------------------------- /qlua/rpc/GetCell.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.GetCell; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | 12 | int32 t_id = 1; 13 | int32 key = 2; 14 | int32 code = 3; 15 | } 16 | 17 | message Result { 18 | 19 | string image = 1; 20 | string value = 2; // the parsing is left to be done on the client side, the library returns it as 0 if the cell's number is not set, so "0" goes on the wire in that case 21 | } 22 | -------------------------------------------------------------------------------- /qlua/rpc/GetLabelParams.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.GetLabelParams; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | 12 | string chart_tag = 1; 13 | int32 label_id = 2; 14 | } 15 | 16 | message Result { 17 | 18 | bool null_label_params = 1; 19 | map label_params = 2; 20 | } 21 | -------------------------------------------------------------------------------- /qlua/rpc/GetTableSize.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.GetTableSize; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message TableSize { 11 | 12 | int32 rows = 1; 13 | int32 col = 2; 14 | } 15 | 16 | message Args { 17 | int32 t_id = 1; 18 | } 19 | 20 | message Result { 21 | TableSize table_size = 1; 22 | } 23 | -------------------------------------------------------------------------------- /qlua/rpc/GetWindowCaption.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.GetWindowCaption; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | int32 t_id = 1; 12 | } 13 | 14 | message Result { 15 | string caption = 1; 16 | } 17 | -------------------------------------------------------------------------------- /qlua/rpc/GetWindowRect.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.GetWindowRect; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message WindowRect { 11 | 12 | int32 top = 1; 13 | int32 left = 2; 14 | int32 bottom = 3; 15 | int32 right = 4; 16 | } 17 | 18 | message Args { 19 | int32 t_id = 1; 20 | } 21 | 22 | message Result { 23 | 24 | WindowRect window_rect = 1; 25 | } 26 | -------------------------------------------------------------------------------- /qlua/rpc/Highlight.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.Highlight; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | 12 | int32 t_id = 1; 13 | oneof row { 14 | bool null_row = 2; 15 | uint32 value_row = 3; 16 | } 17 | oneof col { 18 | bool null_col = 4; 19 | uint32 value_col = 5; 20 | } 21 | oneof b_color { 22 | bool null_b_color = 6; 23 | int32 value_b_color = 7; 24 | } 25 | oneof f_color { 26 | bool null_f_color = 8; 27 | int32 value_f_color = 9; 28 | } 29 | uint64 timeout = 10; 30 | } 31 | 32 | message Result { 33 | bool result = 1; 34 | } 35 | -------------------------------------------------------------------------------- /qlua/rpc/InsertRow.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.InsertRow; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | 12 | int32 t_id = 1; 13 | int32 key = 2; 14 | } 15 | 16 | message Result { 17 | int32 result = 1; 18 | } 19 | -------------------------------------------------------------------------------- /qlua/rpc/IsSubscribed_Level_II_Quotes.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.IsSubscribed_Level_II_Quotes; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | 12 | string class_code = 1; 13 | string sec_code = 2; 14 | } 15 | 16 | message Result { 17 | bool result = 1; 18 | } 19 | -------------------------------------------------------------------------------- /qlua/rpc/IsWindowClosed.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.IsWindowClosed; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | int32 t_id = 1; 12 | } 13 | 14 | message Result { 15 | 16 | oneof window_closed { 17 | bool null_window_closed = 1; 18 | bool value_window_closed = 2; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /qlua/rpc/ParamRequest.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.ParamRequest; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | 12 | string class_code = 1; 13 | string sec_code = 2; 14 | string db_name = 3; 15 | } 16 | 17 | message Result { 18 | bool result = 1; 19 | } 20 | -------------------------------------------------------------------------------- /qlua/rpc/PrintDbgStr.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.PrintDbgStr; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | string s = 1; 12 | } 13 | -------------------------------------------------------------------------------- /qlua/rpc/RGB.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.RGB; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | // NB: на самом деле, библиотечная функция RGB должна называться BGR, ибо она выдаёт числа именно в этом формате. В SetColor, однако, тоже ожидается цвет в формате BGR, так что это не баг, а фича. 11 | message Args { 12 | 13 | int32 red = 1; 14 | int32 green = 2; 15 | int32 blue = 3; 16 | } 17 | 18 | message Result { 19 | int32 result = 1; 20 | } 21 | -------------------------------------------------------------------------------- /qlua/rpc/RPC.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.RPC; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | enum ProcedureType { 11 | option allow_alias = true; 12 | 13 | PROCEDURE_TYPE_UNKNOWN = 0; 14 | IS_CONNECTED = 1; 15 | GET_SCRIPT_PATH = 2; 16 | GET_INFO_PARAM = 3; 17 | MESSAGE = 4; 18 | SLEEP = 5; 19 | GET_WORKING_FOLDER = 6; 20 | PRINT_DBG_STR = 7; 21 | GET_ITEM = 8; 22 | GET_ORDER_BY_NUMBER = 9; 23 | GET_NUMBER_OF = 10; 24 | SEARCH_ITEMS = 11; 25 | GET_CLASSES_LIST = 12; 26 | GET_CLASS_INFO = 13; 27 | GET_CLASS_SECURITIES = 14; 28 | GET_MONEY = 15; 29 | GET_MONEY_EX = 16; 30 | GET_DEPO = 17; 31 | GET_DEPO_EX = 18; 32 | GET_FUTURES_LIMIT = 19; 33 | GET_FUTURES_HOLDING = 20; 34 | GET_SECURITY_INFO = 21; 35 | GET_TRADE_DATE = 22; 36 | GET_QUOTE_LEVEL2 = 23; 37 | 38 | GET_LINES_COUNT = 24; 39 | GET_NUM_CANDLES = 25; 40 | GET_CANDLES_BY_INDEX = 26; 41 | 42 | CREATE_DATA_SOURCE = 27; 43 | DS_SET_UPDATE_CALLBACK = 28; 44 | DS_O = 29; 45 | DS_H = 30; 46 | DS_L = 31; 47 | DS_C = 32; 48 | DS_V = 33; 49 | DS_T = 34; 50 | DS_SIZE = 35; 51 | DS_CLOSE = 36; 52 | DS_SET_EMPTY_CALLBACK = 37; 53 | 54 | SEND_TRANSACTION = 38; 55 | CALC_BUY_SELL = 39; 56 | 57 | GET_PARAM_EX = 40; 58 | GET_PARAM_EX2 = 41; // NB: использовать структуры запроса и ответа от GET_PARAM_EX 59 | GET_PARAM_EX_2 = 41; // NB: Оставлено для обратной совместимости. 60 | 61 | GET_PORTFOLIO_INFO = 42; 62 | GET_PORTFOLIO_INFO_EX = 43; 63 | 64 | GET_BUY_SELL_INFO = 44; 65 | GET_BUY_SELL_INFO_EX = 45; // NB: использовать структуры запроса и ответа от GET_BUY_SELL_INFO 66 | 67 | ADD_COLUMN = 46; // нужно бы ещё потестить, т.к. после добавления одного столбца другие добавляются, но визуально не отображаются 68 | ALLOC_TABLE = 47; 69 | CLEAR = 48; 70 | CREATE_WINDOW = 49; 71 | DELETE_ROW = 50; 72 | DESTROY_TABLE = 51; 73 | INSERT_ROW = 52; // NB: использовать после создания окна для таблицы (процедура CREATE_WINDOW) 74 | IS_WINDOW_CLOSED = 53; 75 | GET_CELL = 54; 76 | GET_TABLE_SIZE = 55; 77 | GET_WINDOW_CAPTION = 56; 78 | GET_WINDOW_RECT = 57; 79 | SET_CELL = 58; 80 | SET_WINDOW_CAPTION = 59; 81 | SET_WINDOW_POS = 60; 82 | SET_TABLE_NOTIFICATION_CALLBACK = 61; 83 | RGB = 62; // NB: на самом деле, библиотечная функция RGB должна называться BGR, ибо она выдаёт числа именно в этом формате. В SetColor, однако, тоже ожидается цвет в формате BGR, так что это не баг, а фича. 84 | SET_COLOR = 63; 85 | HIGHLIGHT = 64; 86 | SET_SELECTED_ROW = 65; 87 | 88 | ADD_LABEL = 66; 89 | DEL_LABEL = 67; 90 | DEL_ALL_LABELS = 68; 91 | GET_LABEL_PARAMS = 69; 92 | SET_LABEL_PARAMS = 70; 93 | 94 | SUBSCRIBE_LEVEL_II_QUOTES = 71; 95 | UNSUBSCRIBE_LEVEL_II_QUOTES = 72; 96 | IS_SUBSCRIBED_LEVEL_II_QUOTES = 73; 97 | 98 | PARAM_REQUEST = 74; 99 | CANCEL_PARAM_REQUEST = 75; 100 | 101 | BIT_TOHEX = 76; 102 | BIT_BNOT = 77; 103 | BIT_BAND = 78; 104 | BIT_BOR = 79; 105 | BIT_BXOR = 80; 106 | BIT_TEST = 81; 107 | 108 | OS_SYSDATE = 82; 109 | } 110 | 111 | message Request { 112 | 113 | ProcedureType type = 1; 114 | bytes args = 2; // the protoc-lua-plugin gives out a corrupted .lua file if we're using google.protobuf.Any 115 | } 116 | 117 | message Response { 118 | 119 | bool is_error = 2; 120 | bytes result = 3; 121 | } 122 | 123 | message Error { 124 | 125 | int32 code = 1; 126 | string message = 2; 127 | } 128 | -------------------------------------------------------------------------------- /qlua/rpc/SearchItems.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.SearchItems; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | 12 | string table_name = 1; 13 | int32 start_index = 2; 14 | 15 | // Для удобства наличие null_end_index интерпретируется как getNumberOf(table_name) - 1 16 | oneof end_index { 17 | bool null_end_index = 3; 18 | int32 value_end_index = 4; 19 | } 20 | 21 | // Формат функции без использования params: "function (TABLE t) ... end", возвращаемые значения: BOOLEAN, nil; 22 | // где t -- строка таблицы table_name со всеми параметрами. 23 | // Формат функции при использовании params: "function (p1, p2, ...) ... end", возвращаемые значения: BOOLEAN, nil; 24 | // где p1, p2, ... -- значения параметров, заказанных в params 25 | 26 | // Внимание! По результам тестирования возврат nil из fn не приводит к ожидаемому результату (возврат списка уже пройденных индексов, удовлетворяющих условию + индекс, на котором возвратили nil + остановка процесса проверки условия) -- вместо этого процесс проверки условия прерывается и функция SearchItems возвращает nil. Подозреваю, что это баг в QLUA или ошибка в документации. 27 | string fn_def = 5; 28 | 29 | string params = 6; 30 | } 31 | 32 | message Result { 33 | 34 | bool null_items_indices = 1; 35 | repeated int32 items_indices = 2; 36 | //NB: Недоработка QLUA: пустой список индексов возвращается в виде nil, и ошибка при работе функции проверки элемента (fn) 37 | //тоже приводит к возврату nil, так что непонятно, не нашли ли мы удовлетворяющих условию элементов или написали ошибочную 38 | //функцию проверки условия. 39 | } 40 | -------------------------------------------------------------------------------- /qlua/rpc/SetCell.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.SetCell; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | 12 | int32 t_id = 1; 13 | int32 key = 2; 14 | int32 code = 3; 15 | string text = 4; 16 | string value = 5; 17 | } 18 | 19 | message Result { 20 | bool result = 1; 21 | } 22 | -------------------------------------------------------------------------------- /qlua/rpc/SetColor.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.SetColor; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | 12 | int32 t_id = 1; 13 | oneof row { 14 | bool null_row = 2; 15 | uint32 value_row = 3; 16 | } 17 | oneof col { 18 | bool null_col = 4; 19 | uint32 value_col = 5; 20 | } 21 | oneof b_color { 22 | bool null_b_color = 6; 23 | int32 value_b_color = 7; 24 | } 25 | oneof f_color { 26 | bool null_f_color = 8; 27 | int32 value_f_color = 9; 28 | } 29 | oneof sel_b_color { 30 | bool null_sel_b_color = 10; 31 | int32 value_sel_b_color = 11; 32 | } 33 | oneof sel_f_color { 34 | bool null_sel_f_color = 12; 35 | int32 value_sel_f_color = 13; 36 | } 37 | } 38 | 39 | message Result { 40 | bool result = 1; 41 | } 42 | -------------------------------------------------------------------------------- /qlua/rpc/SetLabelParams.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.SetLabelParams; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | 12 | string chart_tag = 1; 13 | int32 label_id = 2; 14 | map label_params = 3; 15 | } 16 | 17 | message Result { 18 | bool result = 1; 19 | } 20 | -------------------------------------------------------------------------------- /qlua/rpc/SetSelectedRow.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.SetSelectedRow; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | 12 | int32 table_id = 1; 13 | oneof row { 14 | bool null_row = 2; 15 | uint32 value_row = 3; 16 | } 17 | 18 | } 19 | 20 | message Result { 21 | int32 result = 1; 22 | } 23 | -------------------------------------------------------------------------------- /qlua/rpc/SetTableNotificationCallback.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.SetTableNotificationCallback; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | 12 | int32 t_id = 1; 13 | string f_cb_def = 2; // формат функции (см. документацию по QLua): FUNCTION (NUMBER t_id, NUMBER msg, NUMBER par1, NUMBER par2) 14 | } 15 | 16 | message Result { 17 | int32 result = 1; 18 | } 19 | -------------------------------------------------------------------------------- /qlua/rpc/SetWindowCaption.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.SetWindowCaption; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | 12 | int32 t_id = 1; 13 | string str = 2; 14 | } 15 | 16 | message Result { 17 | bool result = 1; 18 | } 19 | -------------------------------------------------------------------------------- /qlua/rpc/SetWindowPos.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.SetWindowPos; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | 12 | int32 t_id = 1; 13 | int32 x = 2; 14 | int32 y = 3; 15 | int32 dx = 4; 16 | int32 dy = 5; 17 | } 18 | 19 | message Result { 20 | bool result = 1; 21 | } 22 | -------------------------------------------------------------------------------- /qlua/rpc/Subscribe_Level_II_Quotes.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.Subscribe_Level_II_Quotes; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | 12 | string class_code = 1; 13 | string sec_code = 2; 14 | } 15 | 16 | message Result { 17 | bool result = 1; 18 | } 19 | -------------------------------------------------------------------------------- /qlua/rpc/Unsubscribe_Level_II_Quotes.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.Unsubscribe_Level_II_Quotes; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | 12 | string class_code = 1; 13 | string sec_code = 2; 14 | } 15 | 16 | message Result { 17 | bool result = 1; 18 | } 19 | -------------------------------------------------------------------------------- /qlua/rpc/bit/band.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.bit.band; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc.bit"; 9 | 10 | message Args { 11 | 12 | sint64 x1 = 1; 13 | sint64 x2 = 2; 14 | repeated sint64 xi = 3; 15 | } 16 | 17 | message Result { 18 | sint64 result = 1; 19 | } 20 | -------------------------------------------------------------------------------- /qlua/rpc/bit/bnot.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.bit.bnot; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc.bit"; 9 | 10 | message Args { 11 | sint64 x = 1; 12 | } 13 | 14 | message Result { 15 | sint64 result = 1; 16 | } 17 | -------------------------------------------------------------------------------- /qlua/rpc/bit/bor.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.bit.bor; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc.bit"; 9 | 10 | message Args { 11 | 12 | sint64 x1 = 1; 13 | sint64 x2 = 2; 14 | repeated sint64 xi = 3; 15 | } 16 | 17 | message Result { 18 | sint64 result = 1; 19 | } 20 | -------------------------------------------------------------------------------- /qlua/rpc/bit/btest.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.bit.test; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc.bit"; 9 | 10 | message Args { 11 | 12 | sint64 x = 1; 13 | sint64 n = 2; 14 | } 15 | 16 | message Result { 17 | bool result = 1; 18 | } -------------------------------------------------------------------------------- /qlua/rpc/bit/bxor.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.bit.bxor; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc.bit"; 9 | 10 | message Args { 11 | 12 | sint64 x1 = 1; 13 | sint64 x2 = 2; 14 | repeated sint64 xi = 3; 15 | } 16 | 17 | message Result { 18 | sint64 result = 1; 19 | } 20 | -------------------------------------------------------------------------------- /qlua/rpc/bit/tohex.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.bit.tohex; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc.bit"; 9 | 10 | message Args { 11 | 12 | sint64 x = 1; 13 | oneof n { 14 | bool null_n = 2; 15 | uint32 value_n = 3; 16 | } 17 | 18 | } 19 | 20 | message Result { 21 | string result = 1; 22 | } 23 | -------------------------------------------------------------------------------- /qlua/rpc/datasource/C.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.datasource.C; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc.datasource"; 9 | 10 | message Args { 11 | 12 | string datasource_uuid = 1; 13 | int32 candle_index = 2; 14 | } 15 | 16 | message Result { 17 | string value = 1; // use of string instead of double for a safe money representation 18 | } 19 | -------------------------------------------------------------------------------- /qlua/rpc/datasource/Close.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.datasource.Close; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc.datasource"; 9 | 10 | message Args { 11 | string datasource_uuid = 1; 12 | } 13 | 14 | message Result { 15 | bool result = 1; 16 | } 17 | -------------------------------------------------------------------------------- /qlua/rpc/datasource/CreateDataSource.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.datasource.CreateDataSource; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc.datasource"; 9 | 10 | enum Interval { 11 | 12 | UNDEFINED = 0; 13 | INTERVAL_TICK = 1; 14 | INTERVAL_M1 = 2; 15 | INTERVAL_M2 = 3; 16 | INTERVAL_M3 = 4; 17 | INTERVAL_M4 = 5; 18 | INTERVAL_M5 = 6; 19 | INTERVAL_M6 = 7; 20 | INTERVAL_M10 = 8; 21 | INTERVAL_M15 = 9; 22 | INTERVAL_M20 = 10; 23 | INTERVAL_M30 = 11; 24 | INTERVAL_H1 = 12; 25 | INTERVAL_H2 = 13; 26 | INTERVAL_H4 = 14; 27 | INTERVAL_D1 = 15; 28 | INTERVAL_W1 = 16; 29 | INTERVAL_MN1 = 17; 30 | } 31 | 32 | message Args { 33 | 34 | string class_code = 1; 35 | string sec_code = 2; 36 | Interval interval = 3; 37 | string param = 4; 38 | } 39 | 40 | message Result { 41 | 42 | oneof result { 43 | string datasource_uuid = 1; 44 | string error_desc = 2; 45 | } 46 | bool is_error = 3; 47 | 48 | } 49 | -------------------------------------------------------------------------------- /qlua/rpc/datasource/H.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.datasource.H; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc.datasource"; 9 | 10 | message Args { 11 | 12 | string datasource_uuid = 1; 13 | int32 candle_index = 2; 14 | } 15 | 16 | message Result { 17 | string value = 1; // use of string instead of double for a safe money representation 18 | } 19 | -------------------------------------------------------------------------------- /qlua/rpc/datasource/L.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.datasource.L; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc.datasource"; 9 | 10 | message Args { 11 | 12 | string datasource_uuid = 1; 13 | int32 candle_index = 2; 14 | } 15 | 16 | message Result { 17 | string value = 1; // use of string instead of double for a safe money representation 18 | } 19 | -------------------------------------------------------------------------------- /qlua/rpc/datasource/O.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.datasource.O; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc.datasource"; 9 | 10 | message Args { 11 | 12 | string datasource_uuid = 1; 13 | int32 candle_index = 2; 14 | } 15 | 16 | message Result { 17 | string value = 1; // use of string instead of double for a safe money representation 18 | } 19 | -------------------------------------------------------------------------------- /qlua/rpc/datasource/SetEmptyCallback.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.datasource.SetEmptyCallback; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc.datasource"; 9 | 10 | message Args { 11 | string datasource_uuid = 1; 12 | } 13 | 14 | message Result { 15 | bool result = 1; 16 | } 17 | -------------------------------------------------------------------------------- /qlua/rpc/datasource/SetUpdateCallback.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.datasource.SetUpdateCallback; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc.datasource"; 9 | 10 | message Args { 11 | 12 | string datasource_uuid = 1; 13 | string f_cb_def = 2; // NB: формат функции: "function (NUMBER index, TABLE datasource) function_body end" 14 | bool watching_O = 3; 15 | bool watching_H = 4; 16 | bool watching_L = 5; 17 | bool watching_C = 6; 18 | bool watching_V = 7; 19 | bool watching_T = 8; 20 | bool watching_Size = 9; 21 | } 22 | 23 | message Result { 24 | bool result = 1; 25 | } 26 | -------------------------------------------------------------------------------- /qlua/rpc/datasource/Size.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.datasource.Size; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc.datasource"; 9 | 10 | message Args { 11 | string datasource_uuid = 1; 12 | } 13 | 14 | message Result { 15 | int32 value = 1; 16 | } 17 | -------------------------------------------------------------------------------- /qlua/rpc/datasource/T.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.datasource.T; 6 | 7 | import "qlua/rpc/qlua_structures.proto"; 8 | 9 | option optimize_for = SPEED; 10 | option java_package = "qlua.rpc.datasource"; 11 | 12 | message Args { 13 | 14 | string datasource_uuid = 1; 15 | int32 candle_index = 2; 16 | } 17 | 18 | message Result { 19 | qlua.structs.DataSourceTime time = 1; 20 | } 21 | -------------------------------------------------------------------------------- /qlua/rpc/datasource/V.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.datasource.V; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc.datasource"; 9 | 10 | message Args { 11 | 12 | string datasource_uuid = 1; 13 | int32 candle_index = 2; 14 | } 15 | 16 | message Result { 17 | string value = 1; // use of string instead of double for a safe quantity representation 18 | } 19 | -------------------------------------------------------------------------------- /qlua/rpc/getBuySellInfo.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.getBuySellInfo; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message BuySellInfo { 11 | 12 | string is_margin_sec = 1; 13 | string is_asset_sec = 2; 14 | string balance = 3; 15 | string can_buy = 4; 16 | string can_sell = 5; 17 | string position_valuation = 6; 18 | string value = 7; 19 | string open_value = 8; 20 | string lim_long = 9; 21 | string long_coef = 10; 22 | string lim_short = 11; 23 | string short_coef = 12; 24 | string value_coef = 13; 25 | string open_value_coef = 14; 26 | string share = 15; 27 | string short_wa_price = 16; 28 | string long_wa_price = 17; 29 | string profit_loss = 18; 30 | string spread_hc = 19; 31 | string can_buy_own = 20; 32 | string can_sell_own = 21; 33 | } 34 | 35 | message Args { 36 | 37 | string firm_id = 1; 38 | string client_code = 2; 39 | string class_code = 3; 40 | string sec_code = 4; 41 | string price = 5; 42 | } 43 | 44 | message Result { 45 | BuySellInfo buy_sell_info = 1; 46 | } 47 | -------------------------------------------------------------------------------- /qlua/rpc/getBuySellInfoEx.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.getBuySellInfoEx; 6 | 7 | import "qlua/rpc/getBuySellInfo.proto"; 8 | 9 | option optimize_for = SPEED; 10 | option java_package = "qlua.rpc"; 11 | 12 | message BuySellInfoEx { 13 | 14 | qlua.rpc.getBuySellInfo.BuySellInfo buy_sell_info = 1; 15 | string limit_kind = 2; // NUMBER in QLUA 16 | string d_long = 3; 17 | string d_min_long = 4; 18 | string d_short = 5; 19 | string d_min_short = 6; 20 | string client_type = 7; 21 | string is_long_allowed = 8; 22 | string is_short_allowed = 9; 23 | } 24 | 25 | message Args { 26 | 27 | string firm_id = 1; 28 | string client_code = 2; 29 | string class_code = 3; 30 | string sec_code = 4; 31 | string price = 5; 32 | } 33 | 34 | message Result { 35 | BuySellInfoEx buy_sell_info_ex = 1; 36 | } 37 | -------------------------------------------------------------------------------- /qlua/rpc/getCandlesByIndex.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.getCandlesByIndex; 6 | 7 | import "qlua/rpc/qlua_structures.proto"; 8 | 9 | option optimize_for = SPEED; 10 | option java_package = "qlua.rpc"; 11 | 12 | message Args { 13 | 14 | string tag = 1; 15 | int32 line = 2; 16 | int32 first_candle = 3; 17 | int32 count = 4; 18 | } 19 | 20 | message Result { 21 | 22 | repeated qlua.structs.CandleEntry t = 1; 23 | int32 n = 2; 24 | string l = 3; 25 | } 26 | -------------------------------------------------------------------------------- /qlua/rpc/getClassInfo.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.getClassInfo; 6 | 7 | import "qlua/rpc/qlua_structures.proto"; 8 | 9 | option optimize_for = SPEED; 10 | option java_package = "qlua.rpc"; 11 | 12 | message Args { 13 | string class_code = 1; 14 | } 15 | 16 | message Result { 17 | qlua.structs.Klass class_info = 1; 18 | } 19 | -------------------------------------------------------------------------------- /qlua/rpc/getClassSecurities.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.getClassSecurities; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | string class_code = 1; 12 | } 13 | 14 | message Result { 15 | string class_securities = 1; 16 | } 17 | -------------------------------------------------------------------------------- /qlua/rpc/getClassesList.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.getClassesList; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Result { 11 | string classes_list = 1; 12 | } 13 | -------------------------------------------------------------------------------- /qlua/rpc/getDepo.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.getDepo; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Depo { 11 | 12 | string depo_limit_locked_buy_value = 1; 13 | string depo_current_balance = 2; 14 | string depo_limit_locked_buy = 3; 15 | string depo_limit_locked = 4; 16 | string depo_limit_available = 5; 17 | string depo_current_limit = 6; 18 | string depo_open_balance = 7; 19 | string depo_open_limit = 8; 20 | } 21 | 22 | message Args { 23 | 24 | string client_code = 1; // Код клиента 25 | string firmid = 2; // Фирма 26 | string sec_code = 3; // Код бумаги 27 | string trdaccid = 4; // Счет депо 28 | } 29 | 30 | message Result { 31 | Depo depo = 1; 32 | } 33 | -------------------------------------------------------------------------------- /qlua/rpc/getDepoEx.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.getDepoEx; 6 | 7 | import "qlua/rpc/qlua_structures.proto"; 8 | 9 | option optimize_for = SPEED; 10 | option java_package = "qlua.rpc"; 11 | 12 | message Args { 13 | 14 | string firmid = 1; // Фирма 15 | string client_code = 2; // Код клиента 16 | string sec_code = 3; // Код бумаги 17 | string trdaccid = 4; // Счет депо 18 | int32 limit_kind = 5; // Вид лимита (Как задать лимит "Tx"? Ответ: видимо, никак -- это недоработка в API qlua) 19 | } 20 | 21 | message Result { 22 | qlua.structs.DepoLimit depo_ex = 1; 23 | } 24 | -------------------------------------------------------------------------------- /qlua/rpc/getFuturesHolding.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.getFuturesHolding; 6 | 7 | import "qlua/rpc/qlua_structures.proto"; 8 | 9 | option optimize_for = SPEED; 10 | option java_package = "qlua.rpc"; 11 | 12 | message Args { 13 | 14 | string firmid = 1; 15 | string trdaccid = 2; 16 | string sec_code = 3; 17 | int32 type = 4; 18 | } 19 | 20 | message Result { 21 | qlua.structs.FuturesClientHolding futures_holding = 1; 22 | } 23 | -------------------------------------------------------------------------------- /qlua/rpc/getFuturesLimit.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.getFuturesLimit; 6 | 7 | import "qlua/rpc/qlua_structures.proto"; 8 | 9 | option optimize_for = SPEED; 10 | option java_package = "qlua.rpc"; 11 | 12 | message Args { 13 | 14 | string firmid = 1; 15 | string trdaccid = 2; 16 | int32 limit_type = 3; 17 | string currcode = 4; 18 | } 19 | 20 | message Result { 21 | qlua.structs.FuturesLimit futures_limit = 1; 22 | } 23 | -------------------------------------------------------------------------------- /qlua/rpc/getInfoParam.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.getInfoParam; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | 12 | // FIXME: make as enum 13 | // Хотел сделать enum-ом, чтобы меньше слать по wire, но в используемой Lua-реализации 14 | // protobuf'a нет адекватного способа вернуть строковое имя enum'а, поэтому говнокод, который 15 | // надо будет для этого написать, скорее всего нивелирует какой-либо перфомансный 16 | // профит от enum'ов в данном случае. К тому же, при добавлении новых видов paramName 17 | // при использовании строк ничего не надо будет перекомпилировать. 18 | string param_name = 1; 19 | } 20 | 21 | message Result { 22 | string info_param = 1; 23 | } 24 | -------------------------------------------------------------------------------- /qlua/rpc/getItem.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.getItem; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | 12 | string table_name = 1; 13 | int32 index = 2; 14 | } 15 | 16 | message Result { 17 | 18 | bool null_table_row = 1; 19 | map table_row = 2; 20 | } 21 | -------------------------------------------------------------------------------- /qlua/rpc/getLinesCount.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.getLinesCount; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | string tag = 1; 12 | } 13 | 14 | message Result { 15 | int32 lines_count = 1; 16 | } 17 | -------------------------------------------------------------------------------- /qlua/rpc/getMoney.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.getMoney; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Money { 11 | 12 | string money_open_limit = 1; // NUMBER in QLUA 13 | string money_limit_locked_nonmarginal_value = 2; // NUMBER in QLUA 14 | string money_limit_locked = 3; // NUMBER in QLUA 15 | string money_open_balance = 4; // NUMBER in QLUA 16 | string money_current_limit = 5; // NUMBER in QLUA 17 | string money_current_balance = 6; // NUMBER in QLUA 18 | string money_limit_available = 7; // NUMBER in QLUA 19 | } 20 | 21 | message Args { 22 | 23 | string client_code = 1; // Код клиента 24 | string firmid = 2; // Фирма 25 | string tag = 3; // Группа 26 | string currcode = 4; // Валюта 27 | } 28 | 29 | message Result { 30 | Money money = 1; 31 | } 32 | -------------------------------------------------------------------------------- /qlua/rpc/getMoneyEx.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.getMoneyEx; 6 | 7 | import "qlua/rpc/qlua_structures.proto"; 8 | 9 | option optimize_for = SPEED; 10 | option java_package = "qlua.rpc"; 11 | 12 | message Args { 13 | 14 | string firmid = 1; // Фирма 15 | string client_code = 2; // Код клиента 16 | string tag = 3; // Группа 17 | string currcode = 4; // Валюта 18 | int32 limit_kind = 5; // Вид лимита (Как задать лимит "Tx"? Ответ: видимо, никак -- это недоработка в API qlua) 19 | } 20 | 21 | message Result { 22 | qlua.structs.MoneyLimit money_ex = 1; 23 | } 24 | -------------------------------------------------------------------------------- /qlua/rpc/getNumCandles.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.getNumCandles; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | string tag = 1; 12 | } 13 | 14 | message Result { 15 | int32 num_candles = 1; 16 | } 17 | -------------------------------------------------------------------------------- /qlua/rpc/getNumberOf.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.getNumberOf; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | string table_name = 1; 12 | } 13 | 14 | message Result { 15 | int32 result = 1; 16 | } 17 | -------------------------------------------------------------------------------- /qlua/rpc/getOrderByNumber.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.getOrderByNumber; 6 | 7 | import "qlua/rpc/qlua_structures.proto"; 8 | 9 | option optimize_for = SPEED; 10 | option java_package = "qlua.rpc"; 11 | 12 | message Args { 13 | 14 | string class_code = 1; 15 | int64 order_id = 2; 16 | } 17 | 18 | message Result { 19 | 20 | qlua.structs.Order order = 1; 21 | oneof indx { 22 | bool null_indx = 2; 23 | int32 value_indx = 3; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /qlua/rpc/getParamEx.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.getParamEx; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message ParamEx { 11 | 12 | string param_type = 1; 13 | string param_value = 2; 14 | string param_image = 3; 15 | string result = 4; 16 | } 17 | 18 | message Args { 19 | 20 | string class_code = 1; 21 | string sec_code = 2; 22 | string param_name = 3; // возможные значения для этого параметра можно найти тут: https://quikluacsharp.ru/quik-qlua/poluchenie-dannyh-iz-tablits-quik-v-qlua-lua/ 23 | } 24 | 25 | message Result { 26 | ParamEx param_ex = 1; 27 | } 28 | -------------------------------------------------------------------------------- /qlua/rpc/getParamEx2.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.getParamEx2; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message ParamEx2 { 11 | 12 | string param_type = 1; 13 | string param_value = 2; 14 | string param_image = 3; 15 | string result = 4; 16 | } 17 | 18 | message Args { 19 | 20 | string class_code = 1; 21 | string sec_code = 2; 22 | string param_name = 3; // возможные значения для этого параметра можно найти тут: https://quikluacsharp.ru/quik-qlua/poluchenie-dannyh-iz-tablits-quik-v-qlua-lua/ 23 | } 24 | 25 | message Result { 26 | ParamEx2 param_ex = 1; 27 | } -------------------------------------------------------------------------------- /qlua/rpc/getPortfolioInfo.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.getPortfolioInfo; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message PortfolioInfo { 11 | 12 | string is_leverage = 1; 13 | string in_assets = 2; 14 | string leverage = 3; 15 | string open_limit = 4; 16 | string val_short = 5; 17 | string val_long = 6; 18 | string val_long_margin = 7; 19 | string val_long_asset = 8; 20 | string assets = 9; 21 | string cur_leverage = 10; 22 | string margin = 11; 23 | string lim_all = 12; 24 | string av_lim_all = 13; 25 | string locked_buy = 14; 26 | string locked_buy_margin = 15; 27 | string locked_buy_asset = 16; 28 | string locked_sell = 17; 29 | string locked_value_coef = 18; 30 | string in_all_assets = 19; 31 | string all_assets = 20; 32 | string profit_loss = 21; 33 | string rate_change = 22; 34 | string lim_buy = 23; 35 | string lim_sell = 24; 36 | string lim_non_margin = 25; 37 | string lim_buy_asset = 26; 38 | string val_short_net = 27; 39 | string val_long_net = 28; 40 | string total_money_bal = 29; 41 | string total_locked_money = 30; 42 | string haircuts = 31; 43 | string assets_without_hc = 32; 44 | string status_coef = 33; 45 | string varmargin = 34; 46 | string go_for_positions = 35; 47 | string go_for_orders = 36; 48 | string rate_futures = 37; 49 | string is_qual_client = 38; 50 | string is_futures = 39; 51 | string curr_tag = 40; 52 | } 53 | 54 | message Args { 55 | 56 | string firm_id = 1; 57 | string client_code = 2; 58 | } 59 | 60 | message Result { 61 | PortfolioInfo portfolio_info = 1; 62 | } 63 | -------------------------------------------------------------------------------- /qlua/rpc/getPortfolioInfoEx.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.getPortfolioInfoEx; 6 | 7 | import "qlua/rpc/getPortfolioInfo.proto"; 8 | 9 | option optimize_for = SPEED; 10 | option java_package = "qlua.rpc"; 11 | 12 | message PortfolioInfoEx { 13 | 14 | qlua.rpc.getPortfolioInfo.PortfolioInfo portfolio_info = 1; 15 | string init_margin = 2; 16 | string min_margin = 3; 17 | string corrected_margin = 4; 18 | string client_type = 5; 19 | string portfolio_value = 6; 20 | string start_limit_open_pos = 7; 21 | string total_limit_open_pos = 8; 22 | string limit_open_pos = 9; 23 | string used_lim_open_pos = 10; 24 | string acc_var_margin = 11; 25 | string cl_var_margin = 12; 26 | string opt_liquid_cost = 13; 27 | string fut_asset = 14; 28 | string fut_total_asset = 15; 29 | string fut_debt = 16; 30 | string fut_rate_asset = 17; 31 | string fut_rate_asset_open = 18; 32 | string fut_rate_go = 19; 33 | string planed_rate_go = 20; 34 | string cash_leverage = 21; 35 | string fut_position_type = 22; 36 | string fut_accured_int = 23; 37 | } 38 | 39 | message Args { 40 | 41 | string firm_id = 1; 42 | string client_code = 2; 43 | int32 limit_kind = 3; 44 | } 45 | 46 | message Result { 47 | PortfolioInfoEx portfolio_info_ex = 1; 48 | } 49 | -------------------------------------------------------------------------------- /qlua/rpc/getQuoteLevel2.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.getQuoteLevel2; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message QuoteEntry { 11 | 12 | string price = 1; 13 | string quantity = 2; 14 | } 15 | 16 | message Args { 17 | 18 | string class_code = 1; 19 | string sec_code = 2; 20 | } 21 | 22 | message Result { 23 | 24 | string bid_count = 1; 25 | string offer_count = 2; 26 | repeated QuoteEntry bids = 3; 27 | repeated QuoteEntry offers = 4; 28 | } 29 | -------------------------------------------------------------------------------- /qlua/rpc/getScriptPath.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.getScriptPath; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Result { 11 | string script_path = 1; 12 | } 13 | -------------------------------------------------------------------------------- /qlua/rpc/getSecurityInfo.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.getSecurityInfo; 6 | 7 | import "qlua/rpc/qlua_structures.proto"; 8 | 9 | option optimize_for = SPEED; 10 | option java_package = "qlua.rpc"; 11 | 12 | message Args { 13 | 14 | string class_code = 1; 15 | string sec_code = 2; 16 | } 17 | 18 | message Result { 19 | qlua.structs.Security security_info = 1; 20 | } 21 | -------------------------------------------------------------------------------- /qlua/rpc/getTradeDate.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.getTradeDate; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message TradeDate { 11 | 12 | string date = 1; 13 | uint32 year = 2; 14 | uint32 month = 3; 15 | uint32 day = 4; 16 | } 17 | 18 | message Result { 19 | TradeDate trade_date = 1; 20 | } 21 | -------------------------------------------------------------------------------- /qlua/rpc/getWorkingFolder.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.getWorkingFolder; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Result { 11 | string working_folder = 1; 12 | } 13 | -------------------------------------------------------------------------------- /qlua/rpc/isConnected.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.isConnected; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Result { 11 | int32 is_connected = 1; 12 | } 13 | -------------------------------------------------------------------------------- /qlua/rpc/message.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.message; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | enum IconType { 11 | 12 | UNDEFINED = 0; 13 | INFO = 1; 14 | WARNING = 2; 15 | ERROR = 3; 16 | } 17 | 18 | message Args { 19 | 20 | string message = 1; 21 | IconType icon_type = 2; 22 | } 23 | 24 | message Result { 25 | 26 | oneof message_result { 27 | bool null_result = 1; 28 | int32 value_result = 2; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /qlua/rpc/os/sysdate.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.os.sysdate; 6 | 7 | import "qlua/rpc/qlua_structures.proto"; 8 | 9 | option optimize_for = SPEED; 10 | option java_package = "qlua.rpc.os"; 11 | 12 | message Result { 13 | qlua.structs.DateTimeEntry result = 1; 14 | } 15 | -------------------------------------------------------------------------------- /qlua/rpc/qlua_events.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.events; 6 | 7 | enum EventType { 8 | 9 | EVENT_TYPE_UNKNOWN = 0; 10 | PUBLISHER_ONLINE = 1; // no data attached 11 | ON_STOP = 2; 12 | ON_CLOSE = 3; // no data attached 13 | ON_CONNECTED = 4; 14 | ON_DISCONNECTED = 5; // no data attached 15 | ON_FIRM = 6; 16 | ON_ALL_TRADE = 7; 17 | ON_TRADE = 8; 18 | ON_ORDER = 9; 19 | ON_ACCOUNT_BALANCE = 10; 20 | ON_FUTURES_LIMIT_CHANGE = 11; 21 | ON_FUTURES_LIMIT_DELETE = 12; 22 | ON_FUTURES_CLIENT_HOLDING = 13; 23 | ON_MONEY_LIMIT = 14; 24 | ON_MONEY_LIMIT_DELETE = 15; 25 | ON_DEPO_LIMIT = 16; 26 | ON_DEPO_LIMIT_DELETE = 17; 27 | ON_ACCOUNT_POSITION = 18; 28 | ON_NEG_DEAL = 19; 29 | ON_NEG_TRADE = 20; 30 | ON_STOP_ORDER = 21; 31 | ON_TRANS_REPLY = 22; 32 | ON_PARAM = 23; 33 | ON_QUOTE = 24; 34 | ON_CLEAN_UP = 25; // no data attached 35 | ON_DATA_SOURCE_UPDATE = 26; 36 | } 37 | -------------------------------------------------------------------------------- /qlua/rpc/qlua_types.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.types; 6 | 7 | message TableEntry { 8 | 9 | string k = 1; 10 | string v = 2; 11 | } 12 | -------------------------------------------------------------------------------- /qlua/rpc/sendTransaction.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.sendTransaction; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | map transaction = 1; 12 | } 13 | 14 | message Result { 15 | string result = 1; 16 | } 17 | -------------------------------------------------------------------------------- /qlua/rpc/sleep.proto: -------------------------------------------------------------------------------- 1 | // version: 1.0 2 | 3 | syntax = "proto3"; 4 | 5 | package qlua.rpc.sleep; 6 | 7 | option optimize_for = SPEED; 8 | option java_package = "qlua.rpc"; 9 | 10 | message Args { 11 | uint64 time = 1; 12 | } 13 | 14 | message Result { 15 | 16 | oneof result { 17 | bool null_result = 1; 18 | int32 value_result = 2; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /quik_redist/lua53.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Enfernuz/quik-lua-rpc/2fb4c8fa65e196b0085a625655e4f13cb83dd68d/quik_redist/lua53.dll -------------------------------------------------------------------------------- /quik_redist/qlua.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Enfernuz/quik-lua-rpc/2fb4c8fa65e196b0085a625655e4f13cb83dd68d/quik_redist/qlua.dll -------------------------------------------------------------------------------- /redist.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Enfernuz/quik-lua-rpc/2fb4c8fa65e196b0085a625655e4f13cb83dd68d/redist.zip -------------------------------------------------------------------------------- /test/json/DeleteRow/request.json: -------------------------------------------------------------------------------- 1 | { 2 | "method": "DeleteRow", 3 | "args": { 4 | "t_id": 1, 5 | "key": 2 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/json/DeleteRow/result.json: -------------------------------------------------------------------------------- 1 | { 2 | "result": { 3 | "result": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/json/json_request_response_serde.test.lua: -------------------------------------------------------------------------------- 1 | require("busted.runner")() 2 | 3 | local io = require("io") 4 | local json = require("utils/json") 5 | 6 | local ctx_path = "test/json/" 7 | 8 | local readFile = function (file_path) 9 | local f = assert(io.open(ctx_path..file_path, "r")) 10 | local content = f:read("*all") 11 | f:close() 12 | return content 13 | end 14 | 15 | describe("JSON args deserializer / result serializer", function () 16 | 17 | local sut = require("impl/json_request_response_serde") 18 | 19 | describe("WHEN given DeleteRow", function () 20 | 21 | local method_name = "DeleteRow" 22 | 23 | describe("Args as a JSON string", function () 24 | local req_json = readFile(method_name.."/request.json") 25 | it("SHOULD return the correct method name and args table", function() 26 | local actual_method_name, actual_args = sut:deserialize_request(req_json) 27 | assert.are.equal(actual_method_name, method_name) 28 | assert.are.same(actual_args, {t_id = 1, key = 2}) 29 | end) 30 | end) 31 | 32 | describe("Result table", function () 33 | local expected_json = readFile(method_name.."/result.json") 34 | it("SHOULD serialize it into JSON and return the correct string", function() 35 | local actual_json = sut:serialize_response({method = method_name, proc_result = true}) 36 | assert.are.same(json.decode(actual_json), json.decode(expected_json)) 37 | end) 38 | end) 39 | end) 40 | end) 41 | -------------------------------------------------------------------------------- /utils/config_parser.lua: -------------------------------------------------------------------------------- 1 | package.path = "../?.lua;" .. package.path 2 | 3 | local json = require("utils.json") 4 | 5 | local parser = {} 6 | 7 | function parser.parse(filepath) 8 | 9 | local cfg_file, err = io.open(filepath) 10 | if err then 11 | error( string.format("Не удалось открыть файл конфигурации. Подробности: <%s>.", err) ) 12 | end 13 | 14 | local content = cfg_file:read("*all") 15 | cfg_file:close() 16 | 17 | local config = json.decode(content) 18 | 19 | -- fill in lacking sections 20 | if not config.auth then 21 | config.auth = {mechanism = "NULL", plain = {}, curve = {server = {}, clients = {}}} 22 | else 23 | 24 | local auth_mechanism = config.auth.mechanism 25 | if not auth_mechanism then 26 | error("Не указан механизм аутентификации (секция auth.mechanism). Доступные механизмы: 'NULL', 'PLAIN', 'CURVE'.") 27 | else 28 | if auth_mechanism ~= "NULL" or auth_mechanism ~= "PLAIN" or auth_mechanism ~= "CURVE" then 29 | error(string.format("Указан неподдерживаемый механизм аутентификации '%s' (секция auth.mechanism). Доступные механизмы: 'NULL', 'PLAIN', 'CURVE'."), auth_mechanism) 30 | end 31 | end 32 | 33 | if not config.auth.plain then config.auth.plain = {} end 34 | if not config.auth.curve then 35 | config.auth.curve = {server = {}, clients = {}} 36 | else 37 | if not config.auth.curve.server then config.auth.curve.server = {} end 38 | if not config.auth.curve.clients then config.auth.curve.clients = {} end 39 | end 40 | end 41 | 42 | return config 43 | end 44 | 45 | return parser 46 | 47 | --------------------------------------------------------------------------------