> For the complete documentation index, see [llms.txt](https://docs.reallayer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.reallayer.com/ecosystem/real-tools.md).

# Real Tools

### Overview

Real Tools is a unified collection of SDKs, client libraries, and developer utilities designed to accelerate building on Real’s decentralized products, Real Market and Real Exchange. The toolkit abstracts complex on-chain interactions, compliance-aware workflows, and trading primitives into simple, composable modules, enabling developers to ship secure, production-ready applications faster across web, backend, and smart contract environments.

***

### Purpose

* Simplify integration with Real Market and Real Exchange
* Standardize access to trading, asset, and account primitives
* Reduce time-to-market for decentralized financial applications
* Enforce consistent security and compliance patterns
* Enable extensibility across multiple frameworks and chains

***

### Key Features

* Modular SDK architecture (pick only what you need)
* Typed clients for assets, markets, orders, and positions
* Wallet-agnostic signing and account abstraction support
* Read/write helpers for spot and perpetual markets
* Event indexing and state synchronization utilities
* Production-grade error handling and retries

***

### Installation

#### JavaScript / TypeScript

```bash
npm install @real/tools
# or
pnpm add @real/tools
```

#### Python

```bash
pip install real-tools
```

#### Rust (for indexers & infra)

```toml
real-tools = "0.x"
```

***

### Core Modules

* **Client Core:**  Connection management, RPC handling, retries, and environment configs.
* **Market Module:**  Asset discovery, pricing feeds, order books, and settlement helpers for Real Market.
* **Exchange Module:**  Spot and perpetual trading primitives: orders, positions, funding rates, and liquidations.
* **Accounts and Wallets:**  Wallet adapters, signing flows, session keys, and account abstraction.
* **Compliance Hooks:**  Optional policy checks, allowlists, and jurisdiction-aware flags.
* **Indexer Utilities:**  Event listeners, state snapshots, and historical data access.

***

### Quick Start

```ts
import { RealClient, Exchange } from "@real/tools";

const client = new RealClient({
  network: "mainnet",
  rpcUrl: process.env.REAL_RPC,
});

const exchange = new Exchange(client);

// Fetch markets
const markets = await exchange.getMarkets();

// Place a spot order
await exchange.placeOrder({
  market: "REAL-USD",
  side: "buy",
  size: 10,
  type: "limit",
  price: 1.25,
});
```

***

### Developer Utilities

* CLI for scaffolding projects and managing configs
* Local sandbox and forked-network testing helpers
* Mock providers for unit and integration tests
* Schema generators for typed APIs and contracts
* Logging, tracing, and metrics adapters

***

### Integrations

* **Frontends:**  React, Next.js, Vue
* **Wallets:**  MetaMask, WalletConnect, embedded wallets
* **Indexing:**  Subgraphs, custom Rust/Node indexers
* **Custody and Key Management (optional):**  MPC and HSM providers
* **Analytics and Monitoring:**  Prometheus-compatible metrics

***

### Example Applications

* Decentralized trading terminals (spot and perps)
* Asset issuance and marketplace frontends
* Portfolio dashboards and risk tools
* Automated trading bots and market makers
* Compliance-aware investment apps

***

### Next Steps

* Explore the Real Market and Real Exchange docs
* Review module-specific API references
* Run the local sandbox and sample apps
* Join the developer community and roadmap discussions
* Contribute SDK extensions or integrations


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.reallayer.com/ecosystem/real-tools.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
