Skip to content
TORNLIFE More

API call for points value?

Started by Ballig [2965527] on in API Development.

5 replies · 330 views · thread synced · 4 days ago · View on torn.com
About this thread

Posts archived: 6 / 6 posts (100%) · the total is Torn's reply count + the opening post at the last fetch

Counted by TornLife from the archived posts.

Archived posts
6
Discussion span
→
People posting
4
Likes on archived posts
11
Authority score
52 / 100
Historical score
24 / 100
Story score
32 / 100
Engagement score
54 / 100
Ballig [2965527]

Is there an existing API call to get the daily average point value that you can see in the chart on the Points Market page? With a price floor we've never really needed it before, but if there isn't one I think we really need it now. I know you can see what is currently listed using the API, but that varies through the day and doesn't necessarily reflect what is selling. Guess what I'm hoping for is the current average points value in the same way you can get the current average market value of items.

Ballig [2965527]

Okay I found it! Bit hidden, for anyone else interested: https://api.torn.com/torn/?selections=stats

 

{
"stats": {
"timestamp": 1717113600,
"users_total": 1894994,
"users_male": 1623714,
"users_female": 260469,
"users_enby": 10811,
"users_marriedcouples": 70521,
"users_daily": 54606,
"total_users_logins": 383521477,
"total_users_playtime": 9986,
"job_army": 80222,
"job_grocer": 47401,
"job_medical": 6786,
"job_casino": 49783,
"job_education": 5723,
"job_law": 2375,
"job_company": 61344,
"job_none": 1641360,
"crimes": 2358228378,
"jailed": 44871718,
"money_onhand": 3225860180149,
"money_citybank": 84498408349121,
"items": 1514877388,
"events": 0,
"wars_ranked": 132,
"wars_territory": 9,
"wars_raid": 50,
"communication_events": 576154,
"communication_totalevents": 0,
"communication_messages": 6468,
"communication_totalmessages": 250601528,
"communication_chats": 0,
"communication_forumposts": 3723,
"communication_articles": 1,
"communication_articleviews": 5346,
"communication_articlereads": 1941,
"forums_posts": 3713,
"forums_threads": 162,
"forums_likes": 9457,
"forums_dislikes": 1237,
"crimes_today": 2095449,
"gym_trains": 410143,
"points_total": 228599752,
"points_market": 441977,
"points_averagecost": 42805,
"points_bought": 1526722,
"total_points_boughttotal": 2156572371,
"total_attacks_won": 303249195,
"total_attacks_lost": 35984875,
"total_attacks_stalemated": 4136179,
"total_attacks_runaway": 3771720,
"total_attacks_hits": 1412401022,
"total_attacks_misses": 1004629907,
"total_attacks_criticalhits": 207063202,
"total_attacks_roundsfired": 4969687362,
"total_attacks_stealthed": 164041331,
"total_attacks_moneymugged": 37469951293441,
"total_attacks_respectgained": 983820098,
"total_items_marketbought": 216232326,
"total_items_bazaarbought": 3936499884,
"total_items_auctionswon": 829184,
"total_items_sent": 16801004,
"total_trades": 9115477,
"total_items_bazaarincome": 476392930307395,
"total_items_cityfinds": 35068721,
"total_items_dumpfinds": 74284019,
"total_items_dumped": 254920267,
"total_jail_jailed": 44871718,
"total_jail_busted": 37783833,
"total_jail_busts": 8485424,
"total_jail_bailed": 4197765,
"total_jail_bailcosts": 838510363139,
"total_hospital_trips": 371395519,
"total_hospital_medicalitemsused": 333598347,
"total_hospital_revived": 13236850,
"total_mails_sent": 119533553,
"total_mails_sent_friends": 25270567,
"total_mails_sent_faction": 27645158,
"total_mails_sent_company": 8325625,
"total_mails_sent_spouse": 7433296,
"total_classifiedads_placed": 1148184,
"total_bounty_placed": 11847521,
"total_bounty_rewards": 2927346915447,
"total_travel_all": 72878728,
"total_travel_argentina": 6184706,
"total_travel_mexico": 7702925,
"total_travel_dubai": 6007613,
"total_travel_hawaii": 2918793,
"total_travel_japan": 2823715,
"total_travel_unitedkingdom": 9489262,
"total_travel_southafrica": 9272291,
"total_travel_switzerland": 8546982,
"total_travel_china": 6043208,
"total_travel_canada": 7088471,
"total_travel_caymanislands": 6798826,
"total_drugs_used": 94886850,
"total_drugs_overdosed": 2146662,
"total_drugs_cannabis": 4935250,
"total_drugs_ecstacy": 5693697,
"total_drugs_ketamine": 471047,
"total_drugs_lsd": 2583728,
"total_drugs_opium": 502997,
"total_drugs_shrooms": 462015,
"total_drugs_speed": 285007,
"total_drugs_pcp": 317621,
"total_drugs_xanax": 74479136,
"total_drugs_vicodin": 5089545,
"total_merits_bought": 761822,
"total_refills_bought": 33273993,
"total_company_trains": 54124791,
"total_statenhancers_used": 186654,
},
}
Omanpx [1906686]

The most accurate way would still be to take live listings and calculate it yourself. Not sure how often the value listed above updates.

Ballig [2965527]

It updates once a day, though it's a fair bit later than market item values. Market item values update over the 1 hour preceeding day change, it looks like the points value updates up to an hour after day change.

 

Calculating live listings varies too wildly based on time of day, and doesn't give any certainty to my customers about what I'm buying their plushies and flowers for. It also requires too many API calls, and isn't very reliable because it's only calculating the average of what's listed and not what's being sold.