Get Started
Overview
The LTP API lets you programmatically access your account data, execute trades on RapidX, and manage transfers and withdrawals — over REST or WebSocket. This guide covers everything you need to make your first authenticated REST request. For streaming market data and real-time account updates, see Market Data and User Data Streams.
Prerequisites
You need an LTP API Key before making any requests. Keys are created in Account → API Management in the LTP client. Each key has one or more permissions:
| Permission | What it allows |
|---|---|
| Read | View balances, positions, and order history |
| Transfer | Move assets between accounts |
| Withdraw | Withdraw assets to an external address |
| Trade (RapidX) | Place and manage orders on RapidX |
For a full explanation of account types and API scope, refer to the Accounts System and API Management documentation.
Base URL
LTP provides two public endpoint tiers. Both are open to all API users — no IP allowlisting is required to use either tier.
| Tier | REST | WebSocket | Routing |
|---|---|---|---|
| AZ4 | https://api-az4.liquiditytech.com | wss://wss-az4.liquiditytech.com | Routes to the primary AZ (apne1-az4) for lower latency |
| HA | https://api.liquiditytech.com | wss://wss.liquiditytech.com | Multi-AZ routing for high availability |
Recommended setup: use HA. It routes across multiple availability zones, so a single-AZ disruption does not take your connection down.
AZ4 pins traffic to the primary AZ and can cut round-trip time for clients running in or near ap-northeast-1 — roughly 48% lower mean RTT and 25% lower p90 under those conditions. Clients outside that region generally see no improvement, so only switch to AZ4 if you have measured a real gain from where your client runs.
Authentication
All requests must be signed using HMAC-SHA256. See Authentication for the full signing algorithm and code examples in Python, C++, and Java.
Your First API Call
Make a GET /api/v1/trading/account request to verify your key is working and view your trading account overview.
GET https://api.liquiditytech.com/api/v1/trading/account
This endpoint takes no query parameters. Set the required headers as described in the Authentication guide, then send the request. A successful response looks like:
{
"code": 200000,
"message": "Success",
"data": [
{
"portfolioId": "1000000000000001",
"exchangeType": "BINANCE",
"equity": "10000.000000000000000000",
"maintainMargin": "120.500000000000000000",
"positionValue": "2400.000000000000000000",
"uniMMR": "82.987654321000000000",
"riskRatio": "0.0120",
"accountStatus": "NORMAL",
"marginValue": "9800.000000000000000000",
"frozenMargin": "500.000000000000000000",
"perpMargin": "500.000000000000000000",
"debtMargin": "0",
"openLossMargin": "1.200000000000000000",
"validMargin": "9798.800000000000000000",
"availableMargin": "9298.800000000000000000",
"upnl": "200.000000000000000000",
"positionMode": "NET"
},
{
"portfolioId": "1000000000000001",
"exchangeType": "OKX",
"equity": "5000.000000000000000000",
"maintainMargin": "0",
"positionValue": "0",
"uniMMR": "999999",
"riskRatio": "0.0000",
"accountStatus": "NORMAL",
"marginValue": "0",
"frozenMargin": "0",
"perpMargin": "0",
"debtMargin": "0",
"openLossMargin": "0",
"validMargin": "0",
"availableMargin": "0",
"upnl": "0",
"positionMode": "NET"
}
]
}If you see "code": 200000, your API key and signature are working correctly.
uniMMRis the unified maintenance margin ratio. When a Portfolio has no maintenance margin requirement — no open positions — the field returns the sentinel value999999instead of a computed ratio, as in the second entry above. Do not feed it into risk calculations as a real number.
Error Handling
All responses use a standard envelope. A code of 200 or 200000 indicates success — any other value is an error. Which of the two you get depends on the endpoint, so check for both rather than hard-coding one:
{
"code": 400009,
"message": "Missing required parameter — refer to the API documentation",
"data": {}
}For the full list of error codes, see Error Codes.
Rate Limits
Rate limits are set per endpoint — check the endpoint's page in the API Reference for its specific limit. Exceeding a limit returns a too-many-requests error rather than your data.
Updated 11 days ago
