Welcome to RcoinX Backend

Welcome to the RcoinX Backend documentation! This comprehensive guide is designed for frontend developers who need to integrate with the RcoinX cryptocurrency exchange platform.

What is RcoinX?

RcoinX is a modern cryptocurrency exchange platform built with Go (Golang), providing secure, scalable, and high-performance APIs for trading, wallet management, and user authentication.

Documentation Overview

This documentation is organized to help you quickly find what you need:

Quick Start

Make your first API call in minutes

Integration Guide

Step-by-step integration walkthrough

User Management

Authentication, profile, MFA, and sessions

WebSocket API

Realtime market data streaming

Key Features

πŸ” Secure Authentication

  • JWT-based authentication
  • Multi-factor authentication (MFA)
  • WebAuthn/Passkey support
  • OAuth integration (Google, Telegram)
  • Session management

πŸ’Ό User Management

  • User registration and login
  • Profile management
  • KYC verification
  • Phone and email verification
  • Account security controls

πŸ’° Trading & Wallets

  • Spot trading
  • Asset management
  • Balance tracking
  • Transaction history
  • Wallet operations

πŸ“Š Real-time Data

  • WebSocket connections
  • Market data streaming
  • Order book updates
  • Price alerts

πŸ”’ Enterprise Security

  • Rate limiting
  • Audit logging
  • IP whitelisting
  • API key management
  • Action-based MFA

API Architecture

RcoinX Backend follows a modular architecture with clear separation of concerns:
/api
β”œβ”€β”€ /auth           # Authentication & user management
β”œβ”€β”€ /oauth          # OAuth providers
β”œβ”€β”€ /assets         # Asset management
β”œβ”€β”€ /balance        # Balance operations
β”œβ”€β”€ /spot           # Spot trading
β”œβ”€β”€ /wallet         # Wallet management
β”œβ”€β”€ /market         # Market data
└── /ws             # WebSocket endpoints

Base URL

All API requests should be made to: Production:
https://api.rcoinx.com
Development:
http://localhost:8080

Authentication

Most endpoints require authentication using JWT Bearer tokens:
Authorization: Bearer <access_token>
Learn more about authentication in the User Management API section.

Response Format

All API responses follow a consistent format: Success Response:
{
  "code": 200,
  "message": "Success message",
  "data": {
    // Response data
  }
}
Error Response:
{
  "code": 400,
  "message": "Error message",
  "error": "Detailed error description"
}

Rate Limiting

The API implements rate limiting to ensure fair usage and system stability:
  • Default Rate Limit: 100 requests per minute per IP
  • Authentication Endpoints: 10 requests per minute
  • MFA Verification: 5 attempts per minute
When rate limit is exceeded, you’ll receive a 429 Too Many Requests response.

Getting Started

1

Read the Quick Start Guide

Follow our Quick Start Guide to set up your development environment and make your first API call.
2

Implement Authentication

Start with User Management API to implement user authentication and profile management.
3

Explore Assets & Balances

Review Asset and Balance Features for wallet and trading data.
4

Add Realtime Data

Connect via the WebSocket API for live market updates.
RcoinX supports multiple authentication methods:
  • Email/password login
  • Phone/SMS OTP login
  • OAuth (Google, Telegram)
  • WebAuthn/Passkeys
See the Authentication Guide for details.
Multi-factor authentication adds an extra layer of security. RcoinX supports:
  • TOTP (Google Authenticator, Authy)
  • Email OTP
  • SMS OTP
See the MFA Guide for implementation details.
WebSocket connections provide real-time updates for market data, orders, and balances.See the WebSocket Overview and Channels Guide.
You can test the API using:
  • Postman or similar tools
  • cURL commands
  • Your application in development mode
Start with the Quickstart or run the backend locally (see Quickstart β†’ Local Development).

SDK Support

While we don’t currently provide official SDKs, the API follows RESTful conventions and works with any HTTP client:
// Using fetch API
const response = await fetch('https://api.rcoinx.com/api/profile', {
  headers: {
    'Authorization': `Bearer ${accessToken}`,
    'Content-Type': 'application/json'
  }
});

const data = await response.json();

Development Environment

Prerequisites

  • Modern web browser
  • Node.js 16+ (for frontend development)
  • HTTP client (Postman, Insomnia, etc.)
  • Code editor (VS Code recommended)

Local Development

For local development, you can run the backend API locally:
# Clone the repository
git clone https://github.com/rcoinx/backend

# Install dependencies
go mod download

# Run the server
go run cmd/main.go
The API will be available at http://localhost:8080

Support & Resources

Documentation

Community

Updates

  • Check the GitHub repository for updates
  • Follow our release notes for API changes
  • Subscribe to our developer newsletter

Next Steps

Ready to start building? Here’s what to do next:
  1. Read the Quickstart β€” Get your first API call working
  2. Follow the Integration Guide β€” End-to-end integration flow
  3. Explore User Management β€” Auth, MFA, and sessions
  4. Connect WebSocket β€” Realtime market data

Start Building

Jump into the Quick Start guide and make your first API call in minutes