SRL Archive - Snippets

Tip.It JSON and Script Tools


Clarity

2014-09-21 16:08:12

Tip.It Scripting Resources

Obviously using Tip.It's resources not as they were intended… ;)

JSON Feeds

Tip.It provides the following JSON feeds, suitable for many creative purposes and far faster than entire webpage retrievals (as used in the current getItemPrice). Additionally, Jagex's provided feeds have request limits that are quickly used up when making any sort of script. Tip.It has no such limits.

http://www.tip.it/runescape/json/…

Available Feeds:
  • ge_search:
  • - term Example: (http://www.tip.it/runescape/json/ge_search?term=Bandos)
  • adv_log:
  • - rsn - set_cookie (boolean)
  • live_changes:
  • - small (boolean)
  • ge_list_multi:
  • - term (comma-separated list of IDs)
  • quest_search:
  • - term
  • shop_search:
  • - term
  • page_search:
  • - term
  • main_search:
  • - area (all, bestiary, items, quests, shops) - term
  • ge_single_item:
  • - item (GE_ID)
  • bestiary_search:
  • - term
  • npcs_search:
  • - term
  • calculator_data:
  • - skill - action
  • item_alch_list:
  • items_search:
  • - term - slow
  • items:
  • - term
  • monsters:
  • - term
  • quests:
  • - term
  • high_score_graph_data:
  • - period (day, week, month)
  • hiscore_user:
  • - rsn - old_stats (boolean)
  • time_info:
  • ge_alch_profit:

Example:
getPage('http://www.tip.it/runescape/json/ge_single_item?item=7158');
returns
{"ge_id":"7158","name":"Dragon 2h sword","mark_price":"376,000","daily_gp_change":"-8,249","daily_pct_change":"-2","_30_day_change":"-54.0","_90_day_change":"-65.0","_180_day_change":"-65.0"}

@CynicRus has provided a JSON parsing library here: https://villavu.com/forum/showthread.php?t=106336

If there is enough interest, I might create/modify an include with functions specialized for the Tip.It feeds.

Proper analysis of the GE price fluctuations could potentially lead to an auto-merchanting script.

Alch and Shop Selling Profit Calculators
For those less interested in JSON, the following calculator was released that checks every single item in the game to determine the most profitable options for alching. Other sites' similar tools look up manually specified items.

http://www.tip.it/runescape/pages/view/profitCalculator.htm

This, of course, creates the possibility for an auto-profiting high-alching or shop-selling goldfarming script.

Also, if anyone has a suggestion for a new JSON feed for Tip.It to offer, or any tool for that matter, please post here.
I am keeping this discussion to members+ because I'd rather not publicize my now-obvious connection to this site. Tip.It has complete deniability in this and will not ever be connected directly to this thread.

Enjoy :) -Clarity

Ian

2014-09-21 16:25:08

As for alching, I find that list like that are less helpful in an automation situation because knowing good items is more than the profit. A script might not know that a certain item will not reliably buy at the ge price, so it would require a lot of trial and error.

the JSON things look pretty cool though. Definitely a lot of useful stuff there. :)

Clarity

2014-09-21 21:09:32

From: BMWxi
As for alching, I find that list like that are less helpful in an automation situation because knowing good items is more than the profit. A script might not know that a certain item will not reliably buy at the ge price, so it would require a lot of trial and error.

the JSON things look pretty cool though. Definitely a lot of useful stuff there. :)

Yeah, I'm more interested in making an auto merchanter that calculates ideal times to buy and sell items based on their trends in price. Sits at the GE flipping for profit.

3Garrett3

2014-09-21 22:27:08

From: Clarity
Yeah, I'm more interested in making an auto merchanter that calculates ideal times to buy and sell items based on their trends in price. Sits at the GE flipping for profit.


I've been interested in this too and toyed with the idea a little bit a few days ago. I wanted to look up techniques for knowing when best to buy and sell based on proven RL stock systems, but there wasn't anything really useful through my Google searches. Did you have any resources for these types of algorithms or were you thinking just a trial and error development until you start making money?

Clarity

2014-09-21 22:35:32

From: 3Garrett3
I've been interested in this too and toyed with the idea a little bit a few days ago. I wanted to look up techniques for knowing when best to buy and sell based on proven RL stock systems, but there wasn't anything really useful through my Google searches. Did you have any resources for these types of algorithms or were you thinking just a trial and error development until you start making money?

I have a lifetime subscription access to Merchz.com, which already does these calculations based on both automated and human-updated tables. A simple getPage() of that would allow for automated merchanting. Under item tables there are guidelines ("Strong Buy" to "Strong Sell") which a script could read.

Obviously, there are subtleties. For instance, the prices of items are all screwy now due to the upcoming announced bonus XP weekend. One has to take this account.
I don't have time right now but I'm reasonably into automated buying/selling. I know @The Mayor has a GE include mostly complete. My method is more of a program than a Simba script though. Going to finish my other projects before I get too far into this.

OT: other members, is there interest for a library of functions such as grandExchangeSearch(), bestiary/items/NPCSearch(), hiscoreLookup(), basically a function for every feed Tip.It offers?
If so, I will add this to my todo list.

Perhaps we can incorporate feeds from other sites to create a massive JSON library. The JSON lookups take mere milliseconds, compared to the incredibly long lookups of webpages.

Also, if anyone has a suggestion for a new JSON feed for Tip.It to offer, or any tool for that matter, please post here.
I am keeping this discussion to members+ because I'd rather not publicize my now-obvious connection to this site.

Ian

2014-09-21 23:11:55

If you do the massive JSON library thing I'd probably use it, and if you didn't I'd just make what I needed for my scripts. I probably wouldn't use most of it, but there'd definitely be some useful things in it.

Clarity

2014-09-21 23:13:12

From: BMWxi
If you do the massive JSON library thing I'd probably use it, and if you didn't I'd just make what I needed for my scripts. I probably wouldn't use most of it, but there'd definitely be some useful things in it.

Yeah, some of them are useless for our purposes. Others are quite powerful, however.

CynicRus

2014-09-21 23:22:03

Hey:) A time ago I was written the bestiary api script: https://villavu.com/forum/showthread.php?t=106359 , also Runescape have the Json API: http://services.runescape.com/m=rswiki/en/Bestiary_APIs , http://services.runescape.com/m=rswiki/en/Grand_Exchange_APIs. I think TIp.IT uses that API, for their own service. And in this case, it is better to use the provided API directly, without any 3dparty site:)

Clarity

2014-09-21 23:29:27

From: CynicRus
Hey:) A time ago I was written the bestiary api script: https://villavu.com/forum/showthread.php?t=106359 , also Runescape have the Json API: http://services.runescape.com/m=rswiki/en/Bestiary_APIs , http://services.runescape.com/m=rswiki/en/Grand_Exchange_APIs. I think TIp.IT uses that API, for their own service. And in this case, it is better to use the provided API directly, without any 3dparty site:)

The reason Tip.It created these feeds was that Jagex has a request limit that is unusually extreme, so that any practical use by someone else is always hindered, while Jagex grants special access to Tip.It/other fansites for their own feeds.

If this has since changed then yes, some of these feeds are redundant. However, making unique feeds like item profits is still on the table.

In part that is why I made this topic so people can post ideas for new, innovative feeds based on the basic data.

Still, amazing work Cynic! Really thankful for everything you make.

CynicRus

2014-09-21 23:32:00

But you do not need every time to contact with API. You can store the data in the sqlite database, and update obsolete records request to the RS API:)

PS: Ty!

Clarity

2014-09-21 23:33:49

Ah, that makes sense.
Well then this thread should focus on the latter, the more innovative and unique feeds! :)