-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathgetQuoteLevel.lua
More file actions
40 lines (23 loc) · 872 Bytes
/
getQuoteLevel.lua
File metadata and controls
40 lines (23 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
function main()
quotelvl = getQuoteLevel2("TQBR", "SBER")
if quotelvl then
if quotelvl.offer then
offer = tonumber(quotelvl.offer[1].price)
quant = tonumber(quotelvl.offer[1].quantity)
message("Ëó÷øàÿ öåíà ïðåäëîæåíèÿ : "..offer)
message("Êîëè÷åñòâî ïðè äàííîé öåíå : "..quant)
message("Êîëè÷åñòâî êîòèðîâîê îôôåðîâ : "..quotelvl.offer_count)
else
message("Íåò äàííûõ ïî ïðåäëîæåíèÿì")
end
if quotelvl.bid then
bid = tonumber(quotelvl.bid[tonumber(quotelvl.bid_count)].price)
quant = tonumber(quotelvl.bid[tonumber(quotelvl.bid_count)].quantity)
message("Ëó÷øàÿ öåíà ñïðîñà : "..bid)
message("Êîëè÷åñòâî ïðè äàííîé öåíå : "..quant)
message("Êîëè÷åñòâî êîòèðîâîê ñïðîñà : "..quotelvl.bid_count)
else
message("Íåò äàííûõ ïî ñïðîñó")
end
end
end