API Overview
Welcome to the SUDIGITAL API documentation. Our API provides a comprehensive set of endpoints for building modern applications.
Introduction
The SUDIGITAL API is built with modern technologies and follows REST principles. It features:
- OpenAPI 3.1 specification
- Interactive documentation with Scalar API Reference
- Type-safe validation with Zod schemas
- Azure PostgreSQL database integration
- UUID support for all resources
Base URL
- Development:
http://localhost:3001 - Production:
https://api.sudigital.com(coming soon)
API Sections
Core APIs
- Authentication - JWT-based authentication and authorization
- Users - User management and profile operations
Trading APIs
- Crypto Trading - Complete crypto trading infrastructure
- Asset Management - Cryptocurrency and token definitions
- Exchange Management - Trading platform configurations
- Market Management - Trading pair definitions
- Exchange Key Management - Secure API credential storage
- Bot Management - Automated trading bot configuration
- Transaction Tracking - Trade execution history and monitoring
Authentication
Currently, the API operates in development mode without authentication. Authentication endpoints will be added in future releases.
Planned Authentication
- JWT tokens for session management
- API keys for service-to-service communication
- OAuth 2.0 for third-party integrations
API Documentation
Interactive Documentation
Visit http://localhost:3001/docs for beautiful, interactive API documentation powered by Scalar API Reference.
Features:
- Real-time testing - Test endpoints directly from the browser
- Request/response examples - Complete examples for all endpoints
- Schema validation - Live validation of requests and responses
- Beautiful design - Purple theme matching SUDIGITAL branding
OpenAPI Specification
The complete OpenAPI 3.1 specification is available at http://localhost:3001/openapi.json.
LLM-friendly Documentation
A markdown version optimized for LLMs is available at http://localhost:3001/llms.txt.
Core Endpoints
Health Check
Check the API health status:
GET /api/healthResponse:
{
"status": "healthy",
"timestamp": "2025-08-17T10:30:00.000Z",
"version": "0.1.0"
}User Management
List Users
GET /api/usersGet User by ID
GET /api/users/{id}Create User
POST /api/users
Content-Type: application/json
{
"email": "user@example.com",
"firstName": "John",
"lastName": "Doe",
"password": "SecurePassword123!"
}Response Format
Success Responses
All successful responses follow a consistent format:
{
"data": {
// Response data
},
"meta": {
"timestamp": "2025-08-17T10:30:00.000Z",
"version": "0.1.0"
}
}Error Responses
Error responses include detailed information:
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid input data",
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
},
"meta": {
"timestamp": "2025-08-17T10:30:00.000Z",
"requestId": "req_123456789"
}
}HTTP Status Codes
The API uses standard HTTP status codes:
- 200 OK - Request successful
- 201 Created - Resource created successfully
- 400 Bad Request - Invalid request data
- 401 Unauthorized - Authentication required
- 403 Forbidden - Access denied
- 404 Not Found - Resource not found
- 409 Conflict - Resource already exists
- 422 Unprocessable Entity - Validation failed
- 500 Internal Server Error - Server error
Rate Limiting
(Coming Soon)
Rate limiting will be implemented with the following limits:
- 1000 requests per hour for authenticated users
- 100 requests per hour for unauthenticated requests
Data Types
UUIDs
All resource IDs use UUID v4 format:
123e4567-e89b-12d3-a456-426614174000Timestamps
All timestamps are in ISO 8601 format with UTC timezone:
2025-08-17T10:30:00.000ZPagination
(Coming Soon)
Paginated endpoints will support:
GET /api/users?page=1&limit=20&sort=createdAt&order=descWebhooks
(Coming Soon)
Webhook support for real-time notifications will include:
- User registration events
- Data update notifications
- System status changes
SDKs and Libraries
(Coming Soon)
Official SDKs will be available for:
- JavaScript/TypeScript - Browser and Node.js
- Python - For data science and backend applications
- Go - For high-performance services
Changelog
Version 0.1.0 (Current)
- ✅ Initial API release
- ✅ Health check endpoints
- ✅ User management placeholders
- ✅ OpenAPI 3.1 specification
- ✅ Scalar API Reference integration
- ✅ Azure PostgreSQL integration
Upcoming Features
- 🔄 JWT authentication
- 🔄 User CRUD operations
- 🔄 API key management
- 🔄 Rate limiting
- 🔄 Webhook system
Support
For API support:
- Documentation - Check this documentation first
- Interactive Testing - Use http://localhost:3001/docs
- GitHub Issues - Report bugs and request features
- Community - Join our developer community
Related Resources
- Authentication Guide - Learn about API authentication
- Users API - Detailed user management documentation
- Scalar Integration - API documentation features
- Quick Start - Get started quickly