☰
Login
Signup
Home
›
Python client
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Categories
Recent Discussions
Activity
Categories
13.8K
All Categories
0
Incidents
153
Node JS client
40
Go client
793
.Net API client
378
Kite Publisher
537
.Net / VBA / Excel (3rd party)
457
Algorithms and Strategies
993
Java client
1.1K
API clients
403
PHP client
4K
Python client
346
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
General
In this Discussion
August 2022
aryankejriwal4
August 2022
SRIJAN
Order of symbols is not preserved while fetching ltp
aryankejriwal4
August 2022
in
Python client
Order of symbols is not preserved while fetching ltp, is this random order ?
image.png
121.2K
SRIJAN
August 2022
edited August 2022
No, it's not random. The items in your given iterable are sorted by each character in the items present.
Numerically and alphabetically(numbers before alphabets).
Like-
'NFO:NIFTY2281117700CE'
'NFO:NIFTY2281117700PE'
'NFO:NIFTY2281817300PE',
'NFO:NIFTY22AUG17500CE'
'NFO:NIFTY22AUGFUT'
aryankejriwal4
August 2022
edited August 2022
ok
SRIJAN
August 2022
@aryankejriwal4
,
Yes,check my comment now.
SRIJAN
August 2022
edited August 2022
In your case,till the expiry part ,all characters are same for all items.
So,it was sorted according to the characters after the expiry .
Like ,37500 PE first,then 37900(CE before PE as C comes before P),and lastly 38300 CE.
Sign In
or
Register
to comment.
Numerically and alphabetically(numbers before alphabets).
Like-
'NFO:NIFTY2281117700CE'
'NFO:NIFTY2281117700PE'
'NFO:NIFTY2281817300PE',
'NFO:NIFTY22AUG17500CE'
'NFO:NIFTY22AUGFUT'
Yes,check my comment now.
So,it was sorted according to the characters after the expiry .
Like ,37500 PE first,then 37900(CE before PE as C comes before P),and lastly 38300 CE.