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

# Introduction

> [!NOTE]
>
> Mainnet currently supports Spot DEX only. Perpetuals, Oracle, Margin Trading, Lending, and Vaults are **Testnet-Only**. Use Testnet endpoints and assets for those products.

Ault DEX API provides public indexed reads for Spot, Perpetuals, Vaults, Lending, Margin Trading, and Oracle prices. REST reads need no API key or signature. WebSocket reads support Spot subscriptions and Testnet-Only Perpetual subscriptions.

Placing or canceling orders, moving collateral, borrowing, and operating a vault are signed **chain transactions**, not HTTP write endpoints. Use [Trading Actions](https://docs.aultblockchain.com/dex-api/trading/open-account.md) and the [SDK support table](https://docs.aultblockchain.com/developer-guide/ault-sdk.md#trading-support) for the appropriate transaction route.

## Base URLs

| Environment | REST base URL | Spot WebSocket |
| - | - | - |
| Mainnet | `https://am-api.cloud.aultblockchain.xyz` | `wss://am-api.cloud.aultblockchain.xyz/ws` |
| Testnet | `https://test-dex-api.cloud.aultblockchain.xyz` | `wss://test-dex-api.cloud.aultblockchain.xyz/ws` |

Spot REST and `/ws` are available on Mainnet and Testnet. The other product REST routes in this reference and the Perpetual WebSocket at `wss://test-dex-api.cloud.aultblockchain.xyz/ws/perp` are **Testnet-Only**. Select one network consistently across API reads, wallet and chain transactions.

Examples use `$API_URL` for the selected REST base URL and `$OWNER` for your wallet address:

```bash theme={null}
export API_URL="https://test-dex-api.cloud.aultblockchain.xyz"
export OWNER="YOUR_WALLET_ADDRESS"
curl -fsS -H 'User-Agent: ault-mm-example/1.0' "$API_URL/api/v1/perp/markets"
```

## Choose the product interface

| Task | REST reference | WebSocket |
| - | - | - |
| Spot markets, books, orders and balances | [Spot REST](https://docs.aultblockchain.com/dex-api/rest/markets-and-currencies.md) | `/ws`, [Spot subscriptions](https://docs.aultblockchain.com/dex-api/websocket/subscriptions.md) |
| Perp markets, accounts, orders, funding and closeouts | [Market data](https://docs.aultblockchain.com/dex-api/rest/perpetual-markets.md), [accounts](https://docs.aultblockchain.com/dex-api/rest/perpetual-accounts.md) | `/ws/perp`, [Perpetual Subscriptions](https://docs.aultblockchain.com/dex-api/websocket/perpetuals.md) (Testnet-Only) |
| Lending pools, rates, positions and liquidations | [Pools & Assets](https://docs.aultblockchain.com/dex-api/rest/lending-markets.md), [Positions & Risk](https://docs.aultblockchain.com/dex-api/rest/lending-accounts.md) | No product-specific channel |
| Leveraged Spot accounts and activity | [Margin Trading](https://docs.aultblockchain.com/dex-api/rest/margin.md) | No Margin-specific channel |
| Vault directory, depositor claims and redemptions | [Vaults](https://docs.aultblockchain.com/dex-api/rest/vaults.md) | No Vault-specific channel |
| Oracle feeds and source observation times | [Oracle Prices](https://docs.aultblockchain.com/dex-api/rest/oracle.md) | No Oracle-specific channel |

## Identifiers and numeric fields

Spot routes use `BASE/QUOTE` symbols. Percent-encode `/` in a path, for example `AULT%2FUSDC`. Perp REST routes use bare hex `marketId` values. A display symbol, chain denom, market ID and oracle feed ID are not interchangeable.

Most financial fields are decimal strings. Parse with arbitrary-precision decimal arithmetic, not `parseFloat`. **Units are endpoint specific**: Lending/Margin assets, Vault shares and book quantities can be raw units, while Spot/Perp trades use normalized human amounts. Read each endpoint's unit notes. A decimal string alone does not tell you its unit. Null means unavailable, not zero.

Most timestamps are Unix milliseconds. Duration fields explicitly named in microseconds use that duration unit. Spot book `nonce` is a block height, not a transaction nonce; Perp REST books do not carry it.

Wallet-owner paths accept `ault1...` bech32 or `0x...` 20-byte addresses. Endpoints for derived Margin accounts can accept 32-byte bech32 account addresses. Use returned account IDs unchanged; do not shorten a derived account to a wallet address. See [address conversion](https://docs.aultblockchain.com/dex-api/trading/open-account.md#converting-between-forms).

Paged feeds use opaque header cursors. Start with [Pagination](https://docs.aultblockchain.com/dex-api/getting-started/pagination.md) before collecting history. [Errors](https://docs.aultblockchain.com/dex-api/getting-started/errors.md) distinguishes malformed requests, unavailable data and unknown transaction outcomes.

## User Agent

Set a descriptive `User-Agent` in non-browser clients. Hosted edge failures can be plain text or HTML rather than the application's JSON error envelope. Browsers normally supply the header automatically.

## Data Freshness

```http theme={null}
GET /api/v1/status
```

Returns `{last_indexed_height, last_indexed_at}`; the time is an RFC3339 string. Compare indexed
height and product observation times with the selected chain before quoting. A successful request
does not prove that every product price or account view is current. WebSocket connection
liveness uses [ping/pong](https://docs.aultblockchain.com/dex-api/websocket/heartbeats.md) and is separate from data freshness.

For a quoting restart, timeout or emergency cancellation, follow [Trading Operations](https://docs.aultblockchain.com/dex-api/advanced/trading-operations.md). A REST response is neither a signed-action acknowledgement nor proof of a fill.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.