Prerequisites

HTTP Client

curl, Postman, or your app’s fetch/axios client

API Access

Production URL or a local backend on port 8080

Base URL

EnvironmentURL
Productionhttps://api.rcoinx.com
Developmenthttp://localhost:8080

Step 1: Check API Health

curl https://api.rcoinx.com/health
A healthy response confirms the API is reachable.

Step 2: Register a User

curl -X POST https://api.rcoinx.com/api/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{
    "email": "dev@example.com",
    "password": "SecurePass123!",
    "username": "devuser"
  }'

Step 3: Log In and Get a Token

curl -X POST https://api.rcoinx.com/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "dev@example.com",
    "password": "SecurePass123!"
  }'
Save the access_token from the response.

Step 4: Call a Protected Endpoint

curl https://api.rcoinx.com/api/profile \
  -H "Authorization: Bearer <access_token>"

Client Examples

const login = await fetch('https://api.rcoinx.com/api/v1/auth/login', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    email: 'dev@example.com',
    password: 'SecurePass123!'
  })
});

const { data } = await login.json();
const token = data.access_token;

const profile = await fetch('https://api.rcoinx.com/api/profile', {
  headers: { Authorization: `Bearer ${token}` }
});

Response Format

Success:
{
  "code": 200,
  "message": "Success",
  "data": { }
}
Error:
{
  "code": 400,
  "message": "Validation failed",
  "error": "email is required"
}

Next Steps

Integration Guide

Full integration walkthrough

Authentication

Tokens, refresh, and sessions

WebSocket

Realtime market data

MFA

Multi-factor authentication

Local Development

To run the backend API locally for testing:
git clone https://github.com/rcoinx/backend.git
cd backend
cp config.env.example config.env
docker compose up -d
The API will be available at http://localhost:8080. Interactive docs: http://localhost:8080/swagger/index.html.

Need Help?