Liquid

Start here

Quickstart

Get from zero to your first authenticated API request in under five minutes.

1. Create an Account

Link

Head to app.tryliquid.xyz and create an account. You can sign up with email or connect a wallet.

Liquid sign-up screen
Create your Liquid account at app.tryliquid.xyz

2. Deposit Funds

Link

Once your account is created, deposit funds. Liquid supports USDC deposits.

Deposit flow
Deposit funds into your Liquid account

3. Enable Trading

Link

Before you can place orders, click the Enable Trading button. This activates your account for live trading on Hyperliquid.

Enable trading button
Click Enable Trading to activate your account

4. Get API Credentials

Link

Navigate to app.tryliquid.xyz/account/api-keys to generate your API keys. You will receive two values:

ValueFormatDescription
API Keylq_...Identifies your application
API Secretsk_...Used to sign requests (never share this)
API keys management screen
Generate and manage API keys at app.tryliquid.xyz/account/api-keys
Keep your secret safe

Your API secret is shown only once at creation time. Store it in a secrets manager or environment variable — do not commit it to source control.

5. Install the SDK

Link

Install liquidtrading-python from PyPI. The SDK handles HMAC request signing, response parsing, and error mapping automatically.

pip
bash
pip install liquidtrading-python
uv
bash
uv add liquidtrading-python

6. Make Your First Request

Link
main.py
python
from liquidtrading import LiquidClient

client = LiquidClient(
    api_key="lq_...",
    api_secret="sk_...",
)

# Check connectivity
ticker = client.get_ticker("BTC-PERP")
print(f"BTC mark price: {ticker.mark_price}")

7. Read Market Data

Link
markets.py
python
# List all tradeable markets
markets = client.get_markets()
for m in markets:
    print(m["symbol"], m["max_leverage"])

# Get order book
book = client.get_orderbook("BTC-PERP", depth=5)
print(f"Best bid: {book.bids[0].price}")
print(f"Best ask: {book.asks[0].price}")

8. Check Account State

Link
account.py
python
account = client.get_account()
print(f"Equity: {account.equity}")
print(f"Available: {account.available_balance}")

positions = client.get_positions()
for pos in positions:
    print(f"{pos.symbol} {pos.side} {pos.size} @ {pos.entry_price}")

9. Place an Order

Link
trade.py
python
order = client.place_order(
    symbol="BTC-PERP",
    side="buy",
    type="market",
    size=100.0,       # $100 USD notional
    leverage=2,
    tp=72000.0,       # take-profit trigger
    sl=68000.0,       # stop-loss trigger
)

print(f"Order {order.order_id}: {order.status}")
Size is USD notional

The size parameter is always in USD. All markets on Liquid are perpetual futures. TP/SL are optional but recommended.

10. Connect the MCP Server (Optional)

Link

If you want AI agents to trade through Liquid, install the MCP server and connect it to your preferred client.

terminal
bash
pip install liquidtrading-mcp
global install (recommended)
bash
uv tool install liquidtrading-mcp
claude code
bash
claude mcp add liquid \
  -e LIQUID_API_KEY=lq_... \
  -e LIQUID_API_SECRET=sk_... \
  -- liquidtrading-mcp

See the MCP docs for Claude Desktop configuration, environment variables, and the full tool catalog.

Next Steps

Link
  • REST API Reference — full endpoint docs with request/response examples
  • Python SDK — complete method reference and error handling
  • MCP Server — tool catalog, safety guardrails, and prompt templates