πAPI
The RayBot API provides programmatic access to wallet management . This documentation covers all public-facing endpoints, authentication, rate limits, and usage examples.
π Base URL
All requests are made to:
https://webapi.raybot.app
π Authentication
Getting an API Key
You can obtain an API key directly in the RayBot Telegram Bot by sending the command:
/api
Required Parameters
All requests to
/publicapi
must include two parameters:
api_user
: β Your API user id
token
: β Your API key
Data Format
Parameters can be passed in the query string.
GET /publicapi/wallets?api_user=your_user_id&token=your_api_key
Rate Limits
Public API endpoints (/publicapi
): β 5 requests per 10 seconds
Bot numbers
With each request, you need to specify a Telegram bot number. Use the table below to find the correct bot:
π Endpoints
Add Wallets
Endpoint: POST /publicapi/wallets/add
Add multiple wallets to a user's bot configuration.
Parameters:
Query Parameters:
api_user
(string, required): Your API user ID
token
(string, required): API authentication token
Request Body:
{
"user_id": "string",
"bot": 1,
"wallets": [
{
"wallet_address": "string",
"wallet_name": "string (optional)"
},
{
"wallet_address": "string",
"wallet_name": "string (optional)"
},
...
]
}
Validation Rules:
Maximum 10 wallets per request
wallet_address
must be alphanumeric
bot
must be integer between 0-32
wallets
array must contain 1-10 items
Response:
{
"status": "ok" | "error",
"wallets": [
{
"address": "string",
"type": "solana" | "evm",
"status": "active" | "limit" | "user_pause",
"wallet_name": "string",
"bot": 1
}
]
}
Status Codes
201
: Wallets added successfully
400
: Invalid request data
401
: Invalid authentication
403
: User not authorized
429
: Rate limit exceeded
Delete Wallets
Endpoint: POST /publicapi/wallets/delete
Parameters:
Query Parameters:
api_user
(string, required): Your API user ID
token
(string, required): API authentication token
Request Body:
{
"wallets": ["wallet_address_1", "wallet_address_2"],
"user_id": "string",
"bot": 1
}
Validation Rules:
wallets
must be a non-empty arrayEach wallet address must be valid Solana, EVM, or TRON address
bot
must be integer between 0-32
Response:
{
"status": "ok",
"deletedCount": 2
}
Status Codes:
200
: Wallets deleted successfully
400
: Invalid wallet addresses
401
: Invalid authentication
404
: No wallets found
429
: Rate limit exceeded
Get Wallets (paginated)
Endpoint: POST /publicapi/wallets/show
Retrieve all wallets for the authenticated user, with optional filtering and pagination.
Parameters:
Query Parameters:
api_user
(string, required): Your API user ID
token
(string, required): API authentication token
Request Body:
{
"page": 1,
"limit": 50,
"bot": 1,
"user_id": "string"
}
Validation Rules:
page
must be an integer (default: 1, min: 1)
limit
(page size) must be an integer (default: 50, min: 1, max: 200)
bot
must be integer between 0-32
Response:
{
"status": "ok",
"wallets": [
{
"address": "string",
"type": "solana" | "evm",
"status": "active" | "user_pause" | "limit",
"wallet_name": "string",
"bot": 1,
"user_id": "string"
}
],
"page": 1,
"limit": 50,
"total": 123,
"totalPages": 3,
"nextPage": 2,
"prevPage": null
}
Status Codes:
200
: Success
401
: Invalid authentication
429
: Rate limit exceeded
400
: Validation error (missing/invalid params)
Update Wallet Settings
Endpoint: POST /publicapi/wallets/settings
Update tx filter settings for a specific wallet that belongs to the authenticated admin (API user).
Parameters:
Query Parameters:
api_user
(string, required): Your API user ID
token
(string, required): API authentication token
Request Body:
{
"bot": 1,
"user_id": "string",
"wallet_address": "string",
"settings": {
"[boolean_key]": true | false,
"[numeric_key": 123.456
}
}
Validation Rules:
bot
must be integer between 0-32
wallet_address
must be a valid Solana / EVM / Tron address
settings
must be an object
Supported settings
Keys
Response:
{
"status": "ok",
"wallet": {
"address": "string",
"type": "solana" | "evm",
"status": "active" | "user_pause" | "limit",
"wallet_name": "string",
"bot": 1,
"user_id": "string",
"tx_filter": { // Full post-update filter map for this wallet
"...": "[current settings after update]"
}
},
"updated": 5 // Number of individual fields changed in this request
}
Status Codes:
200
: Success
400
: Validation error (missing/invalid params)
401
: Invalid authentication
429
: Rate limit exceeded
π§ SDKs and Examples
JavaScript/Node.js Example
const axios = require('axios');
const apiClient = axios.create({
baseURL: 'https://webapi.raybot.app',
timeout: 30000,
});
// Add wallets
async function addWallets(userId, token, wallets, bot = 1) {
try {
const response = await apiClient.post(
`/publicapi/wallets/add?api_user=${userId}&token=${token}`,
{
user_id: userId,
bot: bot,
wallets: wallets
}
);
return response.data;
} catch (error) {
console.error('Error adding wallets:', error.response?.data || error.message);
throw error;
}
}
// Usage examples
const wallets = [
{ wallet_address: 'ABC123...', wallet_name: 'My Wallet 1' },
{ wallet_address: 'DEF456...', wallet_name: 'My Wallet 2' }
];
addWallets('api_user_id', 'your_api_token', wallets)
.then(result => console.log('Wallets added:', result))
.catch(error => console.error('Failed to add wallets:', error));
Python Example
import requests
import json
class RayBotAPI:
def __init__(self, base_url, user_id, token):
self.base_url = base_url
self.user_id = user_id
self.token = token
def add_wallets(self, wallets, bot=1):
url = f"{self.base_url}/publicapi/wallets/add"
params = {"api_user": self.user_id, "token": self.token}
data = {
"user_id": self.user_id,
"bot": bot,
"wallets": wallets
}
response = requests.post(url, params=params, json=data)
response.raise_for_status()
return response.json()
# Usage
api = RayBotAPI("https://webapi.raybot.app", "api_user_id", "your_token")
wallets = [
{"wallet_address": "ABC123...", "wallet_name": "My Wallet 1"}
]
try:
result = api.add_wallets(wallets)
print(f"Added {len(result['wallets'])} wallets")
except requests.exceptions.HTTPError as e:
print(f"Error: {e.response.json()}")
Last updated