☰
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
14.1K
All Categories
0
Incidents
157
Node JS client
41
Go client
795
.Net API client
385
Kite Publisher
537
.Net / VBA / Excel (3rd party)
463
Algorithms and Strategies
1K
Java client
1.1K
API clients
407
PHP client
4.1K
Python client
349
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.4K
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.