> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xentfi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XentFi Pro Quickstart

> List markets, check the order book, and place your first order on XentFi Pro.

This walks through the full loop — from access request to a placed and cancelled order — against `https://api.pro.xentfi.com`.

## Prerequisites

* A XentFi Pro account and an API key with the **Trade** scope — see [Authentication](/xentfi-pro/authentication) if you don't have one yet.
* An existing XentFi wallet ID (`walletId`) with a funded balance in the asset you want to trade. Wallets are shared with the core platform — see [Wallet Management](/essentials/master-wallets).

## Step 1: Set your environment variables

```bash theme={null}
export XENTFI_PRO_API_KEY="your-api-key"
export XENTFI_PRO_ORG_ID="your-org-id"
export XENTFI_PRO_BASE_URL="https://api.pro.xentfi.com"
```

## Step 2: List available markets

```bash theme={null}
curl -X GET "$XENTFI_PRO_BASE_URL/v1/orderbook/markets?status=ACTIVE" \
  -H "apiKey: $XENTFI_PRO_API_KEY" \
  -H "orgId: $XENTFI_PRO_ORG_ID"
```

```json Example response theme={null}
{
  "data": [
    {
      "id": "9f8b1c2d-...",
      "symbol": "USDC-USDT",
      "tickSize": "0.0001",
      "lotSize": "0.01",
      "minOrderSize": "10",
      "makerFeeBps": 10,
      "takerFeeBps": 20,
      "batchAuctionIntervalMs": 250,
      "status": "ACTIVE"
    }
  ],
  "meta": { "total": 1, "limit": 50, "offset": 0 }
}
```

## Step 3: Check the order book

```bash theme={null}
curl -X GET "$XENTFI_PRO_BASE_URL/v1/orderbook/markets/USDC-USDT/book?limit=10" \
  -H "apiKey: $XENTFI_PRO_API_KEY" \
  -H "orgId: $XENTFI_PRO_ORG_ID"
```

```json Example response theme={null}
{
  "data": {
    "marketSymbol": "USDC-USDT",
    "sequence": 48213,
    "bids": [{ "price": "0.9999", "quantity": "1200.00", "orderCount": 3 }],
    "asks": [{ "price": "1.0002", "quantity": "850.00", "orderCount": 2 }],
    "timestamp": 1750000000000
  }
}
```

## Step 4: Place an order

```bash theme={null}
curl -X POST "$XENTFI_PRO_BASE_URL/v1/orderbook/orders" \
  -H "apiKey: $XENTFI_PRO_API_KEY" \
  -H "orgId: $XENTFI_PRO_ORG_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "marketSymbol": "USDC-USDT",
    "walletId": "your-wallet-id",
    "side": "BUY",
    "type": "LIMIT",
    "timeInForce": "GTC",
    "price": "1.0002",
    "quantity": "100",
    "clientOrderId": "quickstart-order-001"
  }'
```

```json Example response (201 Created) theme={null}
{
  "data": {
    "id": "ord_7f3e2a1b-...",
    "marketId": "9f8b1c2d-...",
    "walletId": "your-wallet-id",
    "clientOrderId": "quickstart-order-001",
    "side": "BUY",
    "type": "LIMIT",
    "timeInForce": "GTC",
    "price": "1.0002",
    "quantity": "100",
    "filledQuantity": "0",
    "reservedBalance": "100.02",
    "status": "OPEN",
    "createdAt": "2026-08-20T12:00:00.000Z"
  }
}
```

<Note>
  A `201` means the order was **admitted**, not filled — matching happens asynchronously on the market's batch-auction cadence. See [Order Book: Order lifecycle](/essentials/orderbook#order-lifecycle).
</Note>

## Step 5: Check order status and fills

```bash theme={null}
curl -X GET "$XENTFI_PRO_BASE_URL/v1/orderbook/orders/ord_7f3e2a1b-..." \
  -H "apiKey: $XENTFI_PRO_API_KEY" \
  -H "orgId: $XENTFI_PRO_ORG_ID"

curl -X GET "$XENTFI_PRO_BASE_URL/v1/orderbook/orders/ord_7f3e2a1b-.../trades" \
  -H "apiKey: $XENTFI_PRO_API_KEY" \
  -H "orgId: $XENTFI_PRO_ORG_ID"
```

## Step 6: Cancel it (optional)

Only `OPEN` or `PARTIALLY_FILLED` orders can be cancelled — the reserved balance is released atomically.

```bash theme={null}
curl -X DELETE "$XENTFI_PRO_BASE_URL/v1/orderbook/orders/ord_7f3e2a1b-..." \
  -H "apiKey: $XENTFI_PRO_API_KEY" \
  -H "orgId: $XENTFI_PRO_ORG_ID"
```

## Next steps

<CardGroup cols={2}>
  <Card title="Order Book concepts" icon="list-ordered" href="/essentials/orderbook">
    Order types, fees, and the full order lifecycle.
  </Card>

  <Card title="Liquidity & Settlement" icon="waves" href="/essentials/liquidity">
    How your trades settle on-chain.
  </Card>

  <Card title="Realtime updates" icon="bolt" href="/essentials/orderbook#realtime-updates">
    Subscribe to fills instead of polling.
  </Card>

  <Card title="API Reference" icon="code" href="/xentfi-pro/overview">
    Every endpoint, request, and response schema.
  </Card>
</CardGroup>
