API Documentation
REST API reference for Gemini Pro
http://localhost:3000Authentication
Most endpoints require authentication via a valid session cookie obtained by logging in via /api/auth/[...nextauth]. Unauthenticated requests return a 401 redirect.
/api/user/balancesAuth RequiredGet Balances
Fetch all asset balances for the authenticated user.
Response
{
"balances": [
{ "asset": "USDT", "free": 10000.00, "locked": 0 },
{ "asset": "BTC", "free": 0.5, "locked": 0 }
],
"totalUsd": 43600.00
}/api/depositAuth RequiredRecord Deposit
Record a new deposit. Requires admin confirmation to credit balance.
Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| asset | string | Yes | Asset symbol (BTC, ETH, USDT, etc.) |
| amount | number | Yes | Deposit amount |
| txid | string | No | Transaction ID from wallet |
| description | string | No | Optional note |
Request Body
{
"asset": "USDT",
"amount": 1000,
"txid": "0xabc...",
"description": "Test deposit"
}Response
{
"message": "Deposit recorded successfully. Awaiting confirmation.",
"deposit": {
"id": "uuid",
"asset": "USDT",
"amount": 1000,
"status": "pending"
}
}/api/withdrawalAuth RequiredCreate Withdrawal
Request a withdrawal. Funds are locked and await admin confirmation.
Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| asset | string | Yes | Asset to withdraw |
| amount | number | Yes | Amount to withdraw |
| address | string | Yes | Destination wallet address |
Request Body
{
"asset": "BTC",
"amount": 0.1,
"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
}Response
{
"message": "Withdrawal request submitted successfully.",
"withdrawal": {
"id": "uuid",
"asset": "BTC",
"amount": 0.1,
"fee": 0.0005,
"status": "pending"
}
}/api/transactionsAuth RequiredTransaction History
Fetch paginated transaction history with optional filters.
Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| type | string | No | Filter by type: deposit, withdrawal, trade |
| asset | string | No | Filter by asset symbol |
| limit | number | No | Results per page (max 100) |
| offset | number | No | Pagination offset |
Response
{
"transactions": [
{
"id": "uuid",
"type": "deposit",
"asset": "USDT",
"amount": 10000,
"status": "completed",
"createdAt": "2026-07-21T..."
}
],
"pagination": {
"total": 42,
"limit": 50,
"hasMore": false
}
}/api/auth/registerPublicRegister
Create a new user account.
Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| name | string | Yes | Full name |
| string | Yes | Email address | |
| password | string | Yes | Password (min 8 characters) |
Request Body
{
"name": "John Doe",
"email": "john@example.com",
"password": "securePassword123"
}Response
{
"message": "Account created successfully",
"user": { "id": "uuid", "name": "John Doe", "email": "john@example.com" }
}/api/auth/kycAuth RequiredSubmit KYC
Submit KYC verification information and optional document.
Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| fullName | string | Yes | Full legal name |
| document | file | No | Selfie or ID image |
Request Body
FormData:
fullName: "John Doe"
document: [file]Response
{
"message": "KYC submitted successfully",
"status": "pending",
"kycName": "John Doe"
}/api/user/profileAuth RequiredGet Profile
Get the authenticated user's profile, balances, and recent transactions.
Response
{
"user": {
"id": "uuid",
"name": "John Doe",
"email": "john@example.com",
"kycStatus": "verified",
"role": "user"
},
"balances": [...],
"transactions": [...]
}