Всех категорически приветствую!
У меня проблема: и в FFIN, и в VTB функции getDepoEx и getMoneyEx возвращают 'nil', в то время как getBuySellInfoEx (третья в скрипте ниже) возвращает адекватный результат...
Я связывался с Quik - поддержкой и той и другой ИК, они говорят, что помочь могут только здесь
.
Посоветуйте - куда смотреть...
Мне надо получить цену покупки бумаги (щас я ее рассчитываю "через одно место"), остаток денег в руб и в usd на счете...
Скрипт вот:
У меня проблема: и в FFIN, и в VTB функции getDepoEx и getMoneyEx возвращают 'nil', в то время как getBuySellInfoEx (третья в скрипте ниже) возвращает адекватный результат...
Я связывался с Quik - поддержкой и той и другой ИК, они говорят, что помочь могут только здесь

Посоветуйте - куда смотреть...
Мне надо получить цену покупки бумаги (щас я ее рассчитываю "через одно место"), остаток денег в руб и в usd на счете...
Скрипт вот:
Код |
---|
-- Это для FFIN firm_id = "MC0356400000"; client_code = "53xxx"; trdaccid = "BROKERSKIY"; class_code = "SPBRU"; sec_code = "FIPO"; tag = "EQTV"; currcode = "USD"; limit_kind = "2"; -- Это для VTB firm_id = "MC0003300000"; client_code = "10Txxx"; trdaccid = "VTBRM_CL"; class_code = "SPBXM"; sec_code = "OXY_SPB"; tag = "EQTV"; currcode = "USD"; limit_kind = "2"; ---------------------------------------------------- local result = getMoneyEx(firm_id, client_code, tag, currcode, limit_kind); if result == nil then message('getMoneyEx = nil'); else message( "getMoneyEx \n" .. "currcode: " .. tostring(result.currcode) .. "; \n" .. "tag: " .. tostring(result.tag) .. "; \n" .. "firmid: " .. tostring(result.firmid) .. "; \n" .. "client_code: " .. tostring(result.client_code) .. "; \n" .. "openbal: " .. tostring(result.openbal) .. "; \n" .. "openlimit: " .. tostring(result.openlimit) .. "; \n" .. "currentbal: " .. tostring(result.currentbal) .. "; \n" .. "currentlimit: " .. tostring(result.currentlimit) .. "; \n" .. "locked: " .. tostring(result.locked) .. "; \n" .. "locked_value_coef: " .. tostring(result.locked_value_coef) .. "; \n" .. "locked_margin_value: " .. tostring(result.locked_margin_value) .. "; \n" .. "leverage: " .. tostring(result.leverage) .. "; \n" .. "limit_kind: " .. tostring(result.limit_kind).. ";" ); end; local result = getDepoEx(firm_id, client_code, sec_code, trdaccid, limit_kind); if result == nil then message('getDepoEx = nil'); else message( "getDepoEx \n" .. "trdaccid: " .. tostring(result.trdaccid) .. "; \n" .. "firmid: " .. tostring(result.firmid) .. "; \n" .. "client_code: " .. tostring(result.client_code) .. "; \n" .. "currentbal: " .. tostring(result.currentbal) .. "; \n" .. "awg_position_price: " .. tostring(result.awg_position_price) .. ";" ); end; local result = getBuySellInfoEx(firm_id, client_code, class_code, sec_code, 0) if result == nil then message('getBuySellInfoEx = nil'); else message( "getBuySellInfoEx \n" .. "is_margin_sec = " .. tostring(result.is_margin_sec) .. "; \n" .. "is_asset_sec = " .. tostring(result.is_asset_sec) .. "; \n" .. "balance = " .. tostring(result.balance) .. "; \n" .. "can_buy = " .. tostring(result.can_buy) .. "; \n" .. "can_sell = " .. tostring(result.can_sell) .. "; \n" .. "position_valuation = " .. tostring(result.position_valuation) .. "; \n" .. "value = " .. tostring(result.value) .. "; \n" .. "open_value = " .. tostring(result.open_value) .. "; \n" .. "lim_long = " .. tostring(result.lim_long) .. "; \n" .. "long_coef = " .. tostring(result.long_coef) .. "; \n" .. "lim_short = " .. tostring(result.lim_short) .. "; \n" .. "short_coef = " .. tostring(result.short_coef) .. "; \n" .. "value_coef = " .. tostring(result.value_coef) .. "; \n" .. "open_value_coef = " .. tostring(result.open_value_coef) .. "; \n" .. "share = " .. tostring(result.share) .. "; \n" .. "short_wa_price = " .. tostring(result.short_wa_price) .. "; \n" .. "long_wa_price = " .. tostring(result.long_wa_price) .. "; \n" .. "profit_loss = " .. tostring(result.profit_loss) .. "; \n" .. "spread_hc = " .. tostring(result.spread_hc) .. "; \n" .. "can_buy_own = " .. tostring(result.can_buy_own) .. "; \n" .. "can_sell_own = " .. tostring(result.can_sell_own) .. ";" ); end; |