API Documentation
Complete reference for the Nitrade API. All endpoints require authentication unless otherwise noted.
Quick Start Guide
Create an Application
Go to the Applications page and create a new application to get your API key.
Create ApplicationGet Your API Key
Copy your API key from the application dashboard. Keep it secure and never share it publicly.
View ApplicationsMake Your First Request
Use your API key to make authenticated requests to our API endpoints.
View ExamplesStart Building
Explore the API documentation and start integrating tournament features into your application.
Read DocsAuthentication
API Keys
Include your API key in the Authorization header:
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.nitrade.pro/v1/tournamentOAuth 2.0
For user-specific endpoints, use OAuth 2.0:
// Get access token
const token = await fetch('https://api.nitrade.pro/v1/auth/token', {
method: 'POST',
body: JSON.stringify({
grant_type: 'authorization_code',
code: 'AUTHORIZATION_CODE'
})
});API Endpoints
/v1/tournamentGet all tournaments
/v1/tournament/:idGet tournament by ID
/v1/tournamentCreate a new tournament
/v1/gameGet all games
/v1/game/search/:searchTextSearch games
Code Examples
JavaScript/TypeScript
// Fetch tournaments
const tournaments = await fetch('https://api.nitrade.pro/v1/tournament', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}).then(res => res.json());
// Create tournament
const newTournament = await fetch('https://api.nitrade.pro/v1/tournament', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'My Tournament',
gameId: 'lol',
startDate: '2024-12-31T00:00:00Z'
})
}).then(res => res.json());Python
import requests
# Fetch tournaments
headers = {'Authorization': 'Bearer YOUR_API_KEY'}
response = requests.get('https://api.nitrade.pro/v1/tournament', headers=headers)
tournaments = response.json()
# Create tournament
data = {
'name': 'My Tournament',
'gameId': 'lol',
'startDate': '2024-12-31T00:00:00Z'
}
response = requests.post('https://api.nitrade.pro/v1/tournament',
headers=headers, json=data)
tournament = response.json()Go
package main
import (
"bytes"
"encoding/json"
"net/http"
)
// Fetch tournaments
func getTournaments() ([]Tournament, error) {
req, _ := http.NewRequest("GET", "https://api.nitrade.pro/v1/tournament", nil)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
return nil, err
}
defer resp.Body.Close()
var tournaments []Tournament
json.NewDecoder(resp.Body).Decode(&tournaments)
return tournaments, nil
}Rate Limiting
API requests are rate-limited to ensure fair usage. Free tier: 100 requests per minute. Enterprise plans have higher limits. Rate limit headers are included in all responses.
Need Help?
Have questions or need assistance? Our developer support team is here to help.
Contact Support