Getting Started
Account setup, API keys, and your first trade on Liquidity.io
This guide takes you from account creation to your first executed trade. It covers KYC, API key provisioning, sandbox access, authentication, rate limits, and SDK quick starts across all supported languages.
Account Setup
1. Create an Account
Register at exchange.liquidity.io. You need:
- Valid email address
- Phone number (for 2FA)
- Government-issued photo ID (for KYC)
2. Complete KYC
Identity verification is handled through our Simplici integration. The process takes 5-10 minutes for most applicants.
Individual accounts:
- Navigate to Settings > Identity Verification
- Upload government-issued photo ID (passport, driver's license, or national ID)
- Complete the selfie verification step
- Verification completes in under 2 minutes for most submissions
Institutional accounts (KYB):
- Contact institutional@liquidity.io with your legal entity name
- Provide: certificate of incorporation, beneficial ownership documentation, authorized signers
- KYB review typically completes within 1-2 business days
3. Accreditation (if trading private securities)
Private securities (Reg D 506b/506c, pre-IPO) require accreditation verification:
| Regulation | Verification Type | Method |
|---|---|---|
| Reg D 506b | Self-certification | Attestation form in-app |
| Reg D 506c | Third-party verification | Income/asset verification via Simplici |
Public equities, crypto, fixed income, commodities, and forex do not require accreditation.
4. Fund Your Account
Fiat deposits:
| Method | Processing Time | Minimum | Maximum |
|---|---|---|---|
| ACH transfer | 1-3 business days | $10 | $250,000/day |
| Wire transfer | Same business day | $1,000 | No limit |
| Plaid instant | Instant | $10 | $10,000/day |
Crypto deposits:
Deposit BTC, ETH, USDC, or other supported assets to your Liquidity.io custody wallet. Deposit addresses are generated in the dashboard under Wallet > Deposit.
API Key Provisioning
Create an API Key
- Navigate to Settings > API Keys
- Click "Create New Key"
- Select permissions:
read-- Market data, account balances, order historytrade-- Place and cancel orderstransfer-- Deposits and withdrawals (use with caution)
- (Optional) Set IP allowlist
- (Optional) Set position and daily loss limits
- Copy both the API key and API secret. The secret is shown only once.
Key Security
- Store keys in environment variables or a secrets manager
- Never commit keys to source control
- Use separate keys for development (sandbox) and production
- Rotate keys quarterly
- Revoke immediately if compromised -- all open orders from that key are cancelled automatically
Environments
| Environment | Base URL | Purpose |
|---|---|---|
| Production | https://api.liquidity.io/v1 | Live trading with real funds |
| Staging | https://api.stage.liquidity.io/v1 | Pre-release testing |
| Sandbox | https://api.next.liquidity.io/v1 | Development and integration testing |
The sandbox environment provides:
- Full API compatibility with production
- Test funds pre-loaded on account creation
- Simulated order matching
- No real money at risk
- Same authentication flow as production
Use the sandbox for all development and integration testing before going live.
Authentication
All API requests require HMAC-SHA256 signed authentication.
Request Signing
Every request includes three headers:
| Header | Value |
|---|---|
X-API-KEY | Your API key |
X-TIMESTAMP | Current Unix timestamp in milliseconds |
X-SIGNATURE | HMAC-SHA256 of the request payload |
Signature Computation
signature = HMAC-SHA256(
key: api_secret,
message: timestamp + method + path + body
)TypeScript Example
import crypto from 'node:crypto';
function signRequest(
apiSecret: string,
method: string,
path: string,
body: string = ''
): { timestamp: string; signature: string } {
const timestamp = String(Date.now());
const message = timestamp + method.toUpperCase() + path + body;
const signature = crypto
.createHmac('sha256', apiSecret)
.update(message)
.digest('hex');
return { timestamp, signature };
}
// Usage
const { timestamp, signature } = signRequest(
process.env.LIQUIDITYIO_API_SECRET!,
'GET',
'/v1/ticker/BTC-USD'
);
const response = await fetch('https://api.liquidity.io/v1/ticker/BTC-USD', {
headers: {
'X-API-KEY': process.env.LIQUIDITYIO_API_KEY!,
'X-TIMESTAMP': timestamp,
'X-SIGNATURE': signature,
},
});curl Example
#!/bin/bash
API_KEY="your-api-key"
API_SECRET="your-api-secret"
BASE_URL="https://api.liquidity.io/v1"
TIMESTAMP=$(date +%s%3N)
METHOD="GET"
PATH="/v1/ticker/BTC-USD"
BODY=""
SIGNATURE=$(echo -n "${TIMESTAMP}${METHOD}${PATH}${BODY}" \
| openssl dgst -sha256 -hmac "${API_SECRET}" -hex | awk '{print $2}')
curl -H "X-API-KEY: ${API_KEY}" \
-H "X-TIMESTAMP: ${TIMESTAMP}" \
-H "X-SIGNATURE: ${SIGNATURE}" \
"${BASE_URL}/ticker/BTC-USD"IAM OIDC Flow (Web Applications)
For web applications, use the Liquidity IAM OIDC flow instead of API keys:
- Redirect to
https://iam.next.liquidity.io/oauth/authorize?client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT&response_type=code&scope=trading - User authenticates and grants permissions
- Exchange the authorization code for an access token at
https://iam.next.liquidity.io/oauth/token - Include the access token as
Authorization: Bearer <token>in API requests - Tokens expire after 1 hour. Use the refresh token to obtain new access tokens.
Rate Limits
| Endpoint Category | Limit | Window |
|---|---|---|
| Market data (quotes, orderbook) | 120 requests | per minute |
| Account data (balances, orders) | 60 requests | per minute |
| Order placement | 30 requests | per minute |
| Order cancellation | 60 requests | per minute |
| WebSocket connections | 5 concurrent | per API key |
Rate limit headers are included in every response:
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 118
X-RateLimit-Reset: 1742400060When a rate limit is exceeded, the API returns 429 Too Many Requests with a Retry-After header.
Institutional Tier
For higher limits, contact institutional@liquidity.io. Institutional accounts receive:
- 600 market data requests/minute
- 120 order placements/minute
- 20 concurrent WebSocket connections
- Dedicated order matching priority
SDKs
TypeScript
npm install @liquidityio/tradingimport { Client, Config, NativeVenueConfig } from '@liquidityio/trading';
const config = new Config()
.withNative('liquidity', NativeVenueConfig.liquidDex('https://api.liquidity.io/v1'))
.withVenuePriority(['liquidity']);
const client = new Client(config);
await client.connect();
const order = await client.buy('AAPL', 10);
console.log(`Filled at ${order.average_price}`);
await client.disconnect();Python
pip install lx-tradingimport asyncio
from decimal import Decimal
from lx_trading import Client, Config
from lx_trading.config import NativeVenueConfig
async def main():
config = Config()
config.with_native("liquidity", NativeVenueConfig.liquid_dex("https://api.liquidity.io/v1"))
client = Client(config)
await client.connect()
order = await client.buy("AAPL", Decimal("10"))
print(f"Filled at {order.average_price}")
await client.disconnect()
asyncio.run(main())Go
go get github.com/liquidityio/dex/sdk/gopackage main
import (
"fmt"
"log"
lxdex "github.com/liquidityio/dex/sdk/go"
)
func main() {
client := lxdex.NewClient(lxdex.Config{
APIURL: "https://api.liquidity.io/v1",
APIKey: "your-api-key",
APISecret: "your-api-secret",
})
order, err := client.PlaceOrder("AAPL", "buy", "market", 0, 10)
if err != nil {
log.Fatal(err)
}
fmt.Printf("Filled at %v\n", order.AveragePrice)
}Rust
[dependencies]
liquidityio-trading = "0.1"use liquidityio_trading::{Client, Config, NativeVenueConfig};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let config = Config::new()
.with_native("liquidity", NativeVenueConfig::liquid_dex("https://api.liquidity.io/v1"))
.with_api_key("your-api-key");
let client = Client::new(config);
client.connect().await?;
let order = client.buy("AAPL", 10.0).await?;
println!("Filled at {}", order.average_price);
Ok(())
}C++
#include <liquidityio/trading.h>
#include <iostream>
int main() {
auto config = lx::Config()
.withNative("liquidity", lx::NativeVenueConfig::liquidDex("https://api.liquidity.io/v1"))
.withApiKey("your-api-key");
auto client = lx::Client(config);
client.connect();
auto order = client.buy("AAPL", 10);
std::cout << "Filled at " << order.averagePrice << std::endl;
return 0;
}Quick Start: First Trade in 5 Minutes
Step 1: Get Your API Key (1 minute)
Log into exchange.liquidity.io, go to Settings > API Keys, create a key with read + trade permissions.
Step 2: Set Environment Variables (30 seconds)
export LIQUIDITYIO_API_KEY="your-api-key"
export LIQUIDITYIO_API_SECRET="your-api-secret"
export LIQUIDITYIO_API_URL="https://api.next.liquidity.io/v1" # sandboxStep 3: Install the SDK (30 seconds)
npm install @liquidityio/tradingStep 4: Run Your First Trade (1 minute)
Create first-trade.ts:
import { DEX } from '@liquidityio/trading';
const dex = await DEX({
rpcUrl: process.env.LIQUIDITYIO_API_URL!,
apiKey: process.env.LIQUIDITYIO_API_KEY!,
});
// Check the price
const ticker = await dex.ticker('BTC-USD');
console.log(`BTC-USD: bid=${ticker.bid} ask=${ticker.ask}`);
// Place a small market buy (sandbox)
const order = await dex.buy('BTC-USD', '0.001');
console.log(`Order ${order.orderId}: ${order.status}`);
console.log(`Filled ${order.filledQuantity} at ${order.averagePrice}`);Run it:
npx tsx first-trade.tsStep 5: Try with curl (1 minute)
# Get BTC-USD quote
TIMESTAMP=$(date +%s%3N)
SIGNATURE=$(echo -n "${TIMESTAMP}GET/v1/ticker/BTC-USD" \
| openssl dgst -sha256 -hmac "$LIQUIDITYIO_API_SECRET" -hex | awk '{print $2}')
curl -s -H "X-API-KEY: $LIQUIDITYIO_API_KEY" \
-H "X-TIMESTAMP: $TIMESTAMP" \
-H "X-SIGNATURE: $SIGNATURE" \
"$LIQUIDITYIO_API_URL/ticker/BTC-USD" | jq .Expected output:
{
"symbol": "BTC-USD",
"bid": "84248.00",
"ask": "84252.00",
"last": "84250.00",
"volume24h": "1234.56",
"timestamp": 1742400000000
}Next Steps
| Topic | Link |
|---|---|
| Full API reference | API Reference |
| Order types and lifecycle | Trading |
| Order management | Orders |
| Real-time data via WebSocket | WebSocket |
| SDK reference | SDK |
| AI-assisted trading | Agentic Trading |
| MCP server setup | Model Context Protocol |
| Trading skills library | Skills |
| Regulatory compliance | Compliance |
Support
| Channel | Contact |
|---|---|
| Technical support | support@liquidity.io |
| Institutional onboarding | institutional@liquidity.io |
| API status | status.liquidity.io |
| Documentation issues | github.com/liquidityio/docs/issues |