Everything you need to make your first authenticated API request
Overview
The LTP API lets you programmatically access your account data, execute trades on RapidX, and manage transfers and withdrawals. This guide covers everything you need to make your first authenticated request.
Prerequisites
You need an LTP API Key before making any requests. Keys are created in Personal Center → 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 and API Management documentation.
Base URL
LTP provides two public endpoint tiers. Both are open to all API users — no whitelist required.
| 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 |
Compared to HA, AZ4 reduces mean API network round-trip time (RTT) by ~48% and p90 RTT by ~25%.
Recommended setup: use AZ4 as your primary connection and HA as failover. This gives you the lowest latency in normal conditions while staying resilient to single-AZ disruptions.
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.
Error Handling
All responses use a standard envelope. A code of 200 or 200000 indicates success — any other value is an error:
{
"code": 400009,
"message": "Missing required parameter — refer to the API documentation",
"data": {}
}
For the full list of error codes, see Error Codes.
