forked from morefinances/qlua
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetQuoteLevel2.lua
More file actions
45 lines (26 loc) · 802 Bytes
/
getQuoteLevel2.lua
File metadata and controls
45 lines (26 loc) · 802 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
41
42
43
44
45
function main()
quotelvl = getQuoteLevel2("TQBR", "SBER")
if quotelvl then
if quotelvl.offer then
message("Ïðåäëîæåíèå:")
for i = quotelvl.offer_count, 1, -1 do
offer = tonumber(quotelvl.offer[i].price)
quant = tonumber(quotelvl.offer[i].quantity)
message(i.." : "..offer.." ð. /"..quant.." øò.")
end
else
message("Íåò äàííûõ ïî ïðåäëîæåíèÿì")
end
message(string.rep("-",10)) -- ðàçäåëèòåëü
if quotelvl.bid then
message("Ñïðîñ:")
for i = quotelvl.bid_count, 1, -1 do
bid = tonumber(quotelvl.bid[i].price)
quant = tonumber(quotelvl.bid[i].quantity)
message(i.." : "..bid.." ð. /"..quant.." øò.")
end
else
message("Íåò äàííûõ ïî ñïðîñó")
end
end
end