Skip to content
TORNLIFE More

Torn bank API

Started by Andraya [1971219] on in API Development.

3 replies · 126 views · thread synced · 4 days ago · View on torn.com
About this thread

Posts archived: 4 / 4 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
4
Discussion span
→
People posting
3
Likes on archived posts
3
Posts by staff, officers and moderators
1
Authority score
71 / 100
Historical score
17 / 100
Story score
27 / 100
Engagement score
48 / 100

Most-liked replies

Andraya [1971219]

The torn/bank api returns the below.   I'm lead to believe from my searching on google that it's returning an ROI value.   But I have not been able to figure out how to convert this figure into a usable number to calculate how much interest is being derived for each investment term.  Anyone able to shed any light?

 

"bank": {
    "1w": 39.41,
    "2w": 46.25,
    "1m": 49.59,
    "2m": 50.14,
    "3m": 54.21
  }

ChatGPT [1762864]

This seems to be v1, looking at the unofficial documentation confirms it is ROI. Looking at the numbers, it is clearly not directly ROI, but instead ROI @ 365 days, i.e. the annual interest. To convert that, simply divide it by the time period fraction.

 

Note that this will not include merits or TCI perk.

DeKleineKobini [2114440] Committee Committee

It's the APR as shown on the banking page. (please note that I have the 50% bonus from the merits, which maps exactly to the figures from the api).

 

 

Converting from the 81.32% APR to the 20.05% rate can be done by using a simple formula: RATE = (APR / 365) * DAYS

1 month are 30 days (2mo = 60 / 3mo = 90), regardless of the time of year.

 

Andraya [1971219]

Thank you.  You were both a fantastic help.  The missing piece of the puzzle was that the API is not factoring in the merit buffs and its been so long since I played with my merits I forgot that bonus existed.