When using the p123api (rank_update() in Python) to update the api ranking system, the ranking system ends up with “NAs Negative” no matter what I set “rankingMethod” to. The function is sensitive to the value of the “rankingMethod” parameter in that it gives an error if I supply a value other than 2 or 4, it just gives “NAs Negative” for both 2 and 4.
Thanks for letting us know. I created a bug report for this issue.
@test_user can you tell me how you verified that? If I look at APIRankingSystem, it shows Neutral, which is what I set it to in the API.
I am updating it with something like this, where rankingMethod= 4
try:
client = p123api.Client(api_id=apiId, api_key=apiKey)
rsFile = rsFilePath + RankFile
f = open(rsFile, "r")
nodes = f.read()
data = {
"type": "stock",
"rankingMethod": rankingMethod,
"nodes": nodes
}
dict = client.rank_update(data)
If true, this is depressing news.
Tony
Hi Tony,
In my tests, the rank_update endpoint is unable to change the ranking method setting of the ApiRankingSystem ranking system. Regardless of which setting I used in the rank_update endpoint script, it keeps the current rankingMethod setting in the ApiRankingSystem ranking system. I tried changing the setting to both negative and neutral using the website then changing it with the rank_update endpoint and it didnt get changed.
Other endpoints like rank_perf have their own rankingMethod parameter which will override the ApiRankingSystem ranking system setting, so hopefully that reduces the impact of this issue.
Thanks @danp. So you are saying that Rank_Update() will not override the APIRankingSystem default? The default setting within the RS will always be used.
Tony
Yes, I tried it several times and Rank_Update never changed the current setting for rankingMethod in the APIRankingSystem.
Just to be clear, I’m not sure ‘default’ is the right term. When a new ranking system is created in the site, the ‘default’ is negative. I am saying that whatever the current setting that appears when you look at your APIRankingSystem on the website cannot currently be changed using Rank_Update.
Thanks! I’m seeing the same behavior, this makes it easier to live with. It’d still be nice to have it fixed though. I don’t think the rolling screener has a NA-parameter to adjust, and now I’m going to have to check the “NA status” of the ApiRankingSystem regularly to make sure everything is ok.