☰
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.2K
All Categories
0
Incidents
126
Node JS client
36
Go client
765
.Net API client
360
Kite Publisher
532
.Net / VBA / Excel (3rd party)
433
Algorithms and Strategies
964
Java client
1K
API clients
400
PHP client
3.8K
Python client
331
Mobile and Desktop apps
1.3K
Market data (WebSockets)
3.1K
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.