๐ŸŽฎ TryApi

Complete documentation for the TrySMP API (TryApi)

API Status: Online

Version 1.0

๐Ÿ“‹ API Overview

TryApi provides real-time access to player data from the TrySMP server. Get player balances, statistics, and monitor bot status through simple HTTP requests.

๐Ÿฆ

Balance Checking

Get any player's current money balance

๐Ÿ“Š

Player Statistics

Access detailed player stats and metrics

๐Ÿค–

Bot Monitoring

Real-time bot status

๐Ÿš€ Base URL

https://tryapi.daimy.xyz/api/v1

๐Ÿ” Authentication

All API requests require authentication using the x-api-key header.

๐Ÿ”‘

API Key

TRYAPI_I4I5J34L5

Example Request Headers

GET /api/v1/bot/status
x-api-key: TRYAPI_I4I5J34L5
Content-Type: application/json

๐Ÿ› ๏ธ API Endpoints

GET

/bot/status

Get the current status and information about the ingame bot.

Response Example:

{
  "online": true,
  "username": "TryApi",
  "money": 32000,
  "gems": 42
}
GET

/status

Get the current status about the ingame bot.

Response Example:

{
  "online": true,
}
GET

/balance/{ign}

Get the current money balance for any player by their in-game name (IGN).

Parameters:

  • ign - Player's in-game name (2-17 characters)

Response Example:

{
  "ign": "daimyh",
  "success": true,
  "balance": 1000000,
  "formattedBalance": "1M"
}
GET

/stats/{ign}

Get comprehensive statistics for any player including money, gems, kills, deaths, playtime, and spawner rate.

Parameters:

  • ign - Player's in-game name (2-17 characters)

Response Example:

{
  "ign": "daimyh",
  "stats": {
    "money": "1.03M",
    "gems": "42 423",
    "playtime": "14d 7h",
    "spawnerRate": "9.08B ($/pm)",
    "kills": 147,
    "deaths": 23
  }
}
GET

/stats/{field}/{ign}

Get a specific statistic field for a player. More efficient when you only need one piece of data.

Parameters:

  • field - Stat field: money, gems, kills, deaths, playtime, spawner
  • ign - Player's in-game name (2-17 characters)

Response Example:

{
  "ign": "daimyh",
  "money": "1M"
}
GET

/online/{ign}

Checks if a player is currently online by using a silent gem command trick.

Parameters:

  • ign - Player's in-game name (2-17 characters)

Response Example:

{
  "ign": "daimyh",
  "online": true
}
GET

/server/status

Fetch current server performance including ping, TPS, and player count.

Response Example:

{
  "ping": 87,
  "tps": 19.8,
  "players": 14,
  "username": "TryApi"
}

๐Ÿ’ป Code Examples

๐ŸŸจ JavaScript (Fetch API)

const getPlayerBalance = async (ign) => {
  try {
    const response = await fetch(`https://tryapi.daimy.xyz/api/v1/balance/${ign}`, {
      headers: {
        'x-api-key': 'TRYAPI_I4I5J34L5',
        'Content-Type': 'application/json'
      }
    });
    
    const data = await response.json();
    console.log(`${data.ign} has $${data.formattedBalance}`);
    return data;
  } catch (error) {
    console.error('Error fetching balance:', error);
  }
};

getPlayerBalance('daimyh');

๐Ÿ Python (requests)

import requests

def get_player_stats(ign):
    url = f"https://tryapi.daimy.xyz/api/v1/stats/{ign}"
    headers = {
        'x-api-key': 'TRYAPI_I4I5J34L5',
        'Content-Type': 'application/json'
    }
    
    try:
        response = requests.get(url, headers=headers)
        response.raise_for_status()
        
        data = response.json()
        print(f"Stats for {data['ign']}:")
        for stat, value in data['stats'].items():
            print(f"  {stat}: {value}")
        
        return data
    except requests.RequestException as e:
        print(f"Error: {e}")

get_player_stats('daimyh')

๐ŸŒ cURL

curl -X GET "https://tryapi.daimy.xyz/api/v1/bot/status" \
     -H "x-api-key: TRYAPI_I4I5J34L5" \
     -H "Content-Type: application/json"

๐Ÿงช Live API Testing

Test the API endpoints directly from this documentation. Enter your API base URL and try different requests.

๐Ÿ”ง Configuration

๐Ÿš€ Quick Tests

๐Ÿ“‹ Response

API response will appear here...

โš ๏ธ Error Codes

Client Errors (4xx)

  • 400 Bad Request - Invalid IGN format
  • 401 Unauthorized - Missing or invalid API key
  • 404 Not Found - Player not found

Server Errors (5xx)

  • 500 Internal Server Error
  • 500 Request timed out
  • 503 Service Unavailable - Bot offline