ALLEX API Reference

The ALLEX REST API provides programmatic access to the exchange. Retrieve market data, manage orders, check balances, and automate trading strategies.

// Base URL
https://allex.online/v2

// WebSocket
wss://allex.online/stream

// Interactive Explorer
https://allex.online/api-explorer

Authentication

Public endpoints (market data, tickers, orderbooks) require no authentication. Private endpoints require one of two authentication methods:

Bearer Token

Obtained via POST /v2/login. Include in the Authorization header:

Authorization: Bearer eyJhbGciOiJIUzI1NiIs...

HMAC API Key

For programmatic access. Create via the Developer Portal. Sign requests with HMAC-SHA256:

// Required headers
api-key: your-api-key
api-signature: HMAC-SHA256(secret, method + path + expires + body)
api-expires: unix-timestamp

// Node.js example
const crypto = require('crypto');
const expires = Math.floor(Date.now() / 1000) + 60;
const signature = crypto
.createHmac('sha256', API_SECRET)
.update('GET' + '/v2/user/balance' + expires)
.digest('hex');

Token Permissions

PermissionAccess
can_readRead balances, orders, trades, deposit/withdrawal history
can_tradeCreate and cancel orders
can_withdrawRequest withdrawals (use with caution)
GET/v2/health
Public

Returns the health status of the exchange server.

Response

{ "name": "hollaex-kit", "version": "2.17.4", "host": "allex.online", "basePath": "/v2", "status": true }
GET/v2/constants
Public

Returns exchange constants including all supported coins, trading pairs, and configuration. This is the primary bootstrap endpoint for client apps.

Response

{
  "coins": {
    "btc": { "symbol": "btc", "fullname": "Bitcoin", "active": true, "allow_deposit": true, "allow_withdrawal": true, ... },
    "eth": { ... }
  },
  "pairs": {
    "btc-usdt": { "name": "btc-usdt", "pair_base": "btc", "pair_2": "usdt", "active": true, ... }
  },
  "config": { ... }
}
GET/v2/kit
Public

Returns exchange UI and branding configuration.

GET/v2/tiers
Public

Returns trading fee tiers and their requirements.

GET/v2/ticker
Public

Returns ticker data (open, high, low, close, volume) for a trading pair. Data interval is the most recent period.

Query Parameters

NameTypeDescription
symbolstringTrading pair symbol, e.g. btc-usdt

Response

{
  "btc-usdt": {
    "time": "2026-03-28T12:00:00.000Z",
    "open": 69500,
    "high": 70200,
    "low": 68800,
    "close": 69031,
    "volume": 6589.42,
    "last": 69031
  }
}
GET/v2/ticker/all
Public

Returns ticker data for all active trading pairs.

Response

{
  "btc-usdt": { "open": 69500, "high": 70200, "low": 68800, "close": 69031, "volume": 6589.42 },
  "eth-usdt": { "open": 2150, "high": 2180, "low": 2050, "close": 2070.98, "volume": 154321.5 },
  ...
}
GET/v2/orderbook
Public

Returns the top 10 bids and asks for a trading pair.

Query Parameters

NameTypeDescription
symbolstringTrading pair symbol, e.g. btc-usdt

Response

{
  "btc-usdt": {
    "bids": [[69000, 0.5], [68990, 1.2], ...],
    "asks": [[69050, 0.3], [69060, 0.8], ...],
    "timestamp": "2026-03-28T12:00:00.000Z"
  }
}
GET/v2/trades
Public

Returns the most recent public trades for a trading pair.

Query Parameters

NameTypeDescription
symbolstringTrading pair symbol, e.g. btc-usdt

Response

{
  "btc-usdt": [
    { "size": 0.05, "price": 69031, "side": "buy", "timestamp": "2026-03-28T12:00:05.000Z" },
    { "size": 0.12, "price": 69028, "side": "sell", "timestamp": "2026-03-28T12:00:03.000Z" },
    ...
  ]
}
GET/v2/trades/history
Public

Returns trade history with pagination and filtering.

Query Parameters

NameTypeDescription
symbolstringTrading pair symbol
sidestringFilter by side: buy or sell
limitintegerNumber of results (default: 50, max: 100)
pageintegerPage number (default: 1)
order_bystringField to sort by
orderstringSort direction: asc or desc
start_datedate-timeStart date filter (ISO 8601)
end_datedate-timeEnd date filter (ISO 8601)
GET/v2/chart
Public

Returns OHLCV (Open, High, Low, Close, Volume) candlestick data for charting.

Query Parameters

NameTypeDescription
symbol*stringTrading pair symbol
resolution*stringCandle interval: 1, 5, 15, 60, 360, D, W
from*stringStart timestamp (Unix seconds)
to*stringEnd timestamp (Unix seconds)

Response

[
  { "time": "2026-03-28T00:00:00Z", "open": 69500, "high": 70200, "low": 68800, "close": 69031, "volume": 1234.5 },
  { "time": "2026-03-28T01:00:00Z", "open": 69031, "high": 69300, "low": 68900, "close": 69100, "volume": 987.2 },
  ...
]
GET/v2/oracle/prices
Public

Convert asset prices using oracle price data. Useful for portfolio valuation.

Query Parameters

NameTypeDescription
assets*stringComma-separated asset list, e.g. btc,eth,sol
quotestringQuote currency (default: usdt)
amountnumberAmount to convert
POST/v2/signup
Public

Create a new user account. A verification email will be sent to the provided email address.

Body Parameters

NameTypeDescription
email*stringUser email address
password*stringAccount password (min 8 characters)
referralstringReferral code

Request Body

{
  "email": "[email protected]",
  "password": "securePassword123"
}

Response

{ "message": "Account created. Please verify your email." }
POST/v2/login
Public

Authenticate and receive a JWT token. If 2FA is enabled, the otp_code field is required.

Body Parameters

NameTypeDescription
email*stringUser email address
password*stringAccount password
otp_codestringOTP code (required if 2FA is enabled)

Request Body

{
  "email": "[email protected]",
  "password": "securePassword123",
  "otp_code": "123456"
}

Response

{ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }
GET/v2/verify-token
Requires auth

Check if the current authentication token is still valid.

Response

{ "message": "Token is valid" }
GET/v2/user
Requires auth (can_read)

Returns the authenticated user's profile, settings, and verification status.

Response

{
  "id": 1,
  "email": "[email protected]",
  "full_name": "John Doe",
  "verification_level": 2,
  "otp_enabled": true,
  "settings": { "language": "en", "interface": { "theme": "dark" } },
  "balance": {
    "btc_available": 0.5,
    "btc_balance": 0.52,
    "usdt_available": 10000,
    "usdt_balance": 10500
  },
  "created_at": "2026-01-15T10:30:00Z"
}
GET/v2/user/balance
Requires auth (can_read)

Returns all asset balances for the authenticated user, including available and total (with in-order) amounts.

Response

{
  "btc_available": 0.5,
  "btc_balance": 0.52,
  "eth_available": 5.0,
  "eth_balance": 5.0,
  "usdt_available": 10000,
  "usdt_balance": 10500
}
GET/v2/user/trades
Requires auth (can_read)

Returns the authenticated user's trade (fill) history with pagination.

Query Parameters

NameTypeDescription
symbolstringFilter by trading pair
limitintegerResults per page (default: 50, max: 100)
pageintegerPage number
order_bystringSort field
orderstringasc or desc
start_datedate-timeStart date (ISO 8601)
end_datedate-timeEnd date (ISO 8601)
formatstringSet to csv for CSV export

Response

{
  "count": 142,
  "data": [
    { "side": "buy", "symbol": "btc-usdt", "size": 0.01, "price": 69031, "fee": 0.69, "timestamp": "2026-03-28T12:00:00Z" },
    ...
  ]
}
GET/v2/user/create-address
Requires auth

Generate or retrieve a deposit address for the specified cryptocurrency. Each user gets a unique HD-derived address per coin.

Query Parameters

NameTypeDescription
crypto*stringCryptocurrency symbol (btc, eth, sol, trx, etc.)
networkstringBlockchain network (e.g. trx for TRC-20 tokens)

Response

{
  "message": "Address created",
  "address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
  "crypto": "btc",
  "network": "btc"
}
GET/v2/user/deposits
Requires auth (can_read)

Returns the authenticated user's deposit history with pagination and filters.

Query Parameters

NameTypeDescription
currencystringFilter by currency
statusbooleantrue = completed, false = pending
limitintegerResults per page (default: 50)
pageintegerPage number
start_datedate-timeStart date (ISO 8601)
end_datedate-timeEnd date (ISO 8601)
formatstringSet to csv for CSV export

Response

{
  "count": 15,
  "data": [
    { "id": 42, "currency": "btc", "amount": 0.1, "fee": 0, "status": true, "transaction_id": "abc123...", "created_at": "2026-03-20T10:00:00Z" },
    ...
  ]
}
POST/v2/user/request-withdrawal
Requires auth

Initiate a crypto withdrawal. A confirmation email will be sent. If 2FA is enabled, otp_code is required.

Body Parameters

NameTypeDescription
currency*stringCurrency to withdraw (btc, eth, etc.)
amount*numberAmount in native units
address*stringDestination wallet address
networkstringBlockchain network (e.g. trx for TRC-20)
otp_codestringOTP code (if 2FA enabled)

Request Body

{
  "currency": "btc",
  "amount": 0.05,
  "address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
  "otp_code": "123456"
}

Response

{ "message": "Withdrawal request submitted. Please check your email to confirm." }
GET/v2/user/withdrawal/fee
Requires auth

Returns the withdrawal fee for a specific cryptocurrency.

Query Parameters

NameTypeDescription
currency*stringCurrency symbol

Response

{ "fee": 0.0005 }
POST/v2/order
Requires auth (can_trade)

Place a new limit or market order. Returns the created order with status.

Body Parameters

NameTypeDescription
symbol*stringTrading pair, e.g. btc-usdt
side*stringOrder side: buy or sell
size*numberOrder quantity in base currency
type*stringOrder type: limit or market
pricenumberLimit price (required for limit orders)
stopnumberStop trigger price for stop orders
metaobject{ post_only: boolean, note: string }

Request Body

{
  "symbol": "btc-usdt",
  "side": "buy",
  "size": 0.001,
  "type": "limit",
  "price": 68000
}

Response

{
  "id": "6a8f3b2c-...",
  "side": "buy",
  "symbol": "btc-usdt",
  "type": "limit",
  "size": 0.001,
  "price": 68000,
  "filled": 0,
  "status": "new",
  "created_at": "2026-03-28T12:05:00Z"
}
GET/v2/order
Requires auth (can_read)

Retrieve a specific order by its ID.

Query Parameters

NameTypeDescription
order_id*stringOrder ID
DELETE/v2/order
Requires auth (can_trade)

Cancel an open order by its ID.

Query Parameters

NameTypeDescription
order_id*stringOrder ID to cancel

Response

{
  "id": "6a8f3b2c-...",
  "status": "canceled",
  "filled": 0,
  ...
}
GET/v2/orders
Requires auth (can_read)

List the authenticated user's orders with filtering and pagination.

Query Parameters

NameTypeDescription
symbolstringFilter by trading pair
sidestringFilter by side: buy or sell
statusstringFilter: new, pfilled, filled, canceled
openbooleantrue = open orders only
limitintegerResults per page (default: 50)
pageintegerPage number
order_bystringSort field
orderstringasc or desc
start_datedate-timeStart date (ISO 8601)
end_datedate-timeEnd date (ISO 8601)

Response

{
  "count": 3,
  "data": [
    { "id": "6a8f3b2c-...", "side": "buy", "symbol": "btc-usdt", "type": "limit", "price": 68000, "size": 0.001, "filled": 0, "status": "new" },
    ...
  ]
}
DELETE/v2/order/all
Requires auth (can_trade)

Cancel all open orders for a specific trading pair.

Query Parameters

NameTypeDescription
symbol*stringTrading pair symbol
GET/v2/quick-trade
Public

Get an instant conversion quote between two currencies. Returns a token to execute the trade.

Query Parameters

NameTypeDescription
spending_currency*stringCurrency you are spending
receiving_currency*stringCurrency you want to receive
spending_amountstringAmount of spending currency
receiving_amountstringAmount of receiving currency (alternative)
POST/v2/order/execute
Requires auth

Execute a quick trade using the token received from GET /quick-trade.

Body Parameters

NameTypeDescription
token*stringQuote token from GET /quick-trade
GET/v2/user/request-otp
Requires auth

Generate an OTP secret and QR code URI for enabling two-factor authentication.

Response

{ "secret": "JBSWY3DPEHPK3PXP" }
POST/v2/user/activate-otp
Requires auth

Activate two-factor authentication by verifying an OTP code from the authenticator app.

Body Parameters

NameTypeDescription
code*string6-digit OTP code from authenticator
GET/v2/user/tokens
Requires auth

List all active HMAC API keys for the authenticated user.

Response

[
  {
    "id": 1,
    "name": "Trading Bot",
    "apiKey": "ak_...",
    "active": true,
    "permissions": { "can_read": true, "can_trade": true, "can_withdraw": false },
    "created": "2026-03-01T10:00:00Z"
  }
]
POST/v2/user/token
Requires auth

Create a new HMAC API key. Requires OTP and email verification. The secret is only shown once.

Body Parameters

NameTypeDescription
name*stringLabel for the API key
otp_code*stringOTP verification code
email_code*stringEmail verification code
permissionsobject{ can_read, can_trade, can_withdraw }
whitelisted_ipsstring[]IP whitelist for this key

Response

{
  "id": 2,
  "name": "My Bot",
  "apiKey": "ak_abc123...",
  "secret": "sk_xyz789...",
  "permissions": { "can_read": true, "can_trade": true, "can_withdraw": false },
  "created": "2026-03-28T12:00:00Z"
}