Read-only endpoints for data aggregators (CoinGecko, CoinMarketCap, and others). Public market data only — pairs, tickers, order books and trades. No authentication required.
XLN_USDT. Prices and volumes are returned as strings. Timestamps are Unix time in milliseconds. All endpoints are GET and return application/json.List of all tradeable pairs.
[
{ "ticker_id": "XLN_USDT", "base": "XLN", "target": "USDT" },
{ "ticker_id": "ADA_XLN", "base": "ADA", "target": "XLN" }
]
24h ticker data for every pair.
[
{
"ticker_id": "XLN_USDT",
"base_currency": "XLN",
"target_currency": "USDT",
"last_price": "0.0025",
"base_volume": "1250.5",
"target_volume": "3.126",
"bid": "0.00249",
"ask": "0.00251",
"high": "0.0031",
"low": "0.0021"
}
]
| Parameter | Required | Description |
|---|---|---|
ticker_id | yes | Pair, e.g. XLN_USDT |
depth | no | Levels per side (default 100, max 500) |
{
"ticker_id": "XLN_USDT",
"timestamp": 1788300000000,
"bids": [ ["0.00249", "1200.0"], ["0.00248", "500.0"] ],
"asks": [ ["0.00251", "800.0"], ["0.00252", "300.0"] ]
}
| Parameter | Required | Description |
|---|---|---|
ticker_id | yes | Pair, e.g. XLN_USDT |
type | no | buy or sell (omit for both) |
limit | no | Max trades (default 200, max 1000) |
{
"buy": [
{ "trade_id": "…", "price": "0.0025", "base_volume": "50", "target_volume": "0.125", "trade_timestamp": 1788299990000, "type": "buy" }
],
"sell": [
{ "trade_id": "…", "price": "0.0024", "base_volume": "10", "target_volume": "0.024", "trade_timestamp": 1788299980000, "type": "sell" }
]
}
24h overview for every pair, keyed by pair.
{
"XLN_USDT": {
"trading_pairs": "XLN_USDT",
"base_currency": "XLN",
"quote_currency": "USDT",
"last_price": "0.0025",
"lowest_ask": "0.00251",
"highest_bid": "0.00249",
"base_volume": "1250.5",
"quote_volume": "3.126",
"price_change_percent_24h": "4.16",
"highest_price_24h": "0.0031",
"lowest_price_24h": "0.0021"
}
}
Currencies and their deposit/withdraw status, keyed by symbol.
{
"XLN": {
"name": "Lunarium Coin",
"can_withdraw": true,
"can_deposit": true,
"min_withdraw": "500",
"withdrawal_fee": "0.1",
"contract_address": null
}
}
{
"XLN_USDT": {
"base_currency": "XLN",
"quote_currency": "USDT",
"last_price": "0.0025",
"base_volume": "1250.5",
"quote_volume": "3.126",
"isFrozen": 0
}
}
{
"timestamp": 1788300000000,
"bids": [ ["0.00249", "1200.0"] ],
"asks": [ ["0.00251", "800.0"] ]
}
[
{ "trade_id": "…", "price": "0.0025", "base_volume": "50", "quote_volume": "0.125", "timestamp": 1788299990000, "type": "buy" }
]
Authenticated endpoints for placing/managing orders and reading balances. Require an API Key (Account → Security). Use permissions read + trade — never grant withdraw to a bot.
X-API-KEY: xln_... X-API-SECRET: <secret>Permissão de API insuficiente. IP outside the key's whitelist (if set) → IP não autorizado.Available and locked balance per currency.
[
{ "symbol": "XLN", "available": "517.99", "locked": "1067.05" },
{ "symbol": "USDT", "available": "12.30", "locked": "0.24" }
]
Your orders. Optional filters: symbol, status, limit.
| Field | Required | Notes |
|---|---|---|
symbol | yes | Pair with slash, e.g. XLN/USDT |
side | yes | BUY or SELL |
type | yes | LIMIT or STOP_LIMIT. There is no MARKET type — see the market-style note below. |
amount | yes | String, max 8 decimals, ≥ market minimum |
price | for LIMIT | String, max 8 decimals |
timeInForce | no | Only GTC |
stopPrice | for STOP_LIMIT | String > 0 |
POST /api/orders
{ "symbol": "XLN/USDT", "side": "BUY", "type": "LIMIT", "price": "0.0025", "amount": "100", "timeInForce": "GTC" }
-> 201 { "id": "…", "status": "OPEN", ... }
MARKET order type. To execute immediately against the book (like the site's "Market" tab), send a LIMIT order priced to cross: read the best price from /api/cg/orderbook?ticker_id=… and use the best ask for a BUY (e.g. ask × 1.005) or the best bid for a SELL (e.g. bid × 0.995). The small buffer ensures it crosses; it fills at the resting orders' prices. Any unfilled remainder rests in the book — cancel it if you want pure immediate execution.Cancel an open order by its id. No body.
import requests
BASE = "https://lunariumtrade.io/api"
AUTH = {"X-API-KEY": "xln_...", "X-API-SECRET": "..."}
# balances
print(requests.get(BASE+"/balances", headers=AUTH).json())
# place a LIMIT buy
o = requests.post(BASE+"/orders",
headers={**AUTH, "Content-Type": "application/json"},
json={"symbol":"XLN/USDT","side":"BUY","type":"LIMIT",
"price":"0.0025","amount":"100","timeInForce":"GTC"}).json()
# cancel
requests.post(BASE+"/orders/"+o["id"]+"/cancel", headers=AUTH)