EverythingRS - Free Market/Trade API Tutorial

Join Our Support Discord If you need more help or for some reason cannot understand the tutorial please join our support Discord. We're always available to help!

Getting Started

Registration and secret key

  • After adding the everything-rs.jar into your project the next step is to create an account, once the account is created you must register onto the toplist as we use the toplist data in many of our api's.
  • Now go to your dashboard and you should see your secret key

Your market subdomain!

  • Go to your main panel at https://everythingrs.com/account . You should now see your voting URL in the "Your API Pages" section
  • (OPTIONAL) If you wish to embed the script on your website you can add the code below directly onto your website. Change "yoursubdomain" to the one that was provided to you

Making the Market/Trade api work with your server

  • This part is for PI and Ruse but can easily be changed to work with any server. If you have a request for a specific server let me know and I can add it to the tutorial.
  • For Other Servers - The script is compatible with any base, if you however need help adding it to a specific one, leave a link to the base and I'll add it to the tutorial.
In TradeAndDuel.java under
public void giveItems() {
Look for
for (GameItem item : o.getTradeAndDuel().offeredItems) {
Above that put this and remember to also edit the secret_key to your API secret key.
com.everythingrs.marketplace.Trade trade = new com.everythingrs.marketplace.Trade();
trade.setUsername(o.getUsername());
trade.setTradeWith(c.getUsername());
for (GameItem item: o.getTradeAndDuel().offeredItems) {
    if (item.id > 0) {
        String itemName = ItemDefinitions.getDefinitions()[item.id].getitemName();
        trade.push(new com.everythingrs.marketplace.Item(item.id, item.amount, itemName));
    }
}
trade.update("secret_key");
Go to Trading.java
public void giveItems() {
Look for
for (Item item: player.getTrading().offeredItems) {
    PlayerLogs.log(player.getUsername(), "Gave item in trade to " + player2.getUsername() + ". Id: " + item.getId() + ", amount: " + item.getAmount());
}
for (Item item: player2.getTrading().offeredItems) {
    PlayerLogs.log(player.getUsername(), "Receiving item from trade with " + player2.getUsername() + " Id: " + item.getId() + ", amount: " + item.getAmount());
}
And add
com.everythingrs.marketplace.Trade trade = new com.everythingrs.marketplace.Trade();
trade.setUsername(player2.getUsername());
trade.setTradeWith(player.getUsername());
for (Item item: player2.getTrading().offeredItems) {
    if (item.getId() > 0) {
        String itemName = ItemDefinition.getDefinitions()[item.getId()].getName();
        trade.push(new com.everythingrs.marketplace.Item(item.getId(), item.getAmount(), itemName));
    }
}
trade.update("your_secret_key");

Fin

  • You are now finished adding the market onto your server! This will be extremely useful for players that are looking for price guides and want to check what items are currently going for, etc.