# Aptos Network Documentation

## Aptos RPC plans and rate limits

- **Free plan:** 20 responses per second, up to 100,000 responses a day.
- **Plans:** $49/mo, $299/mo, $999/mo with 25M, 150M, and 500M included responses. Overages billed at $5/$3/$2 per million responses respectively.
- **Paid rate limits:** 100 to 5,000 responses per second (bursts from 500 to 10,000), no daily limit.
- **Billing:** 1 response = 1 API credit on every shared plan, over HTTPS or WebSocket (WSS) where Aptos supports it.

Details: [Pricing](https://www.dwellir.com/docs/getting-started/pricing) · [Rate limits](https://www.dwellir.com/docs/getting-started/rate-limits) · [Authentication](https://www.dwellir.com/docs/getting-started/authentication) · [Archive nodes](https://www.dwellir.com/docs/getting-started/archive-nodes)

## Why Build on Aptos

- 160K+ TPS via Block-STM parallel execution
- Sub-second finality (\~250 ms blocks) with AptosBFT v4
- Resource-oriented Move language with formal verification
- Native sponsored and multi-agent transactions
- Object model for powerful composition
- Evolving token standards (Fungible Asset and Digital Asset)

## Quick Start

cURL
TypeScript SDK (@aptos-labs/ts-sdk)
Python SDK (aptos-sdk)
Rust SDK

```bash
curl -X GET https://api-aptos-mainnet.n.dwellir.com/YOUR_API_KEY/v1 \
  -H "Accept: application/json"
```

```ts
import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";

const config = new AptosConfig({
  network: Network.MAINNET,
  fullnode: "https://api-aptos-mainnet.n.dwellir.com/YOUR_API_KEY/v1",
});
const aptos = new Aptos(config);

const info = await aptos.getLedgerInfo();
console.log(info.chain_id, info.ledger_version);
```

```python
from aptos_sdk.client import RestClient

client = RestClient("https://api-aptos-mainnet.n.dwellir.com/YOUR_API_KEY/v1")
info = client.get_ledger_info()
print(info["chain_id"], info["ledger_version"])  # 1 APT = 100,000,000 Octas
```

```rust
use aptos_sdk::rest_client::Client;

let client = Client::new("https://api-aptos-mainnet.n.dwellir.com/YOUR_API_KEY/v1".parse()?);
let info = client.get_ledger_information().await?;
println!("{} {}", info.inner().chain_id, info.inner().ledger_version);
```

## Network Information

| Parameter    | Value       | Details                   |
| ------------ | ----------- | ------------------------- |
| Chain ID     | 1           | Mainnet                   |
| Native Token | APT         | 1 APT = 100,000,000 Octas |
| Consensus    | AptosBFT v4 | \~250 ms blocks           |
| Execution    | Block-STM   | Parallel transactions     |

## REST API Reference

- Base path: `/v1`
- Auth: Add your key in the URL path: `https://api-aptos-mainnet.n.dwellir.com/YOUR_API_KEY/v1`
- JSON responses, snake\_case fields, bcs-encoded payloads for transactions

## GraphQL API Reference

- Indexer GraphQL endpoint: `https://api-aptos-mainnet.n.dwellir.com/YOUR_API_KEY/v1/graphql`
- Advanced queries for transactions, tokens, ANS, aggregations
- For a continuous transaction feed, use the gRPC Transaction Stream rather than polling GraphQL

See the GraphQL section for examples and schema notes.

## Transaction Stream Service

- Standard `aptos.indexer.v1.RawData/GetTransactions` server-streaming gRPC, using the upstream Aptos protobufs
- Server-side filtering with `BooleanTransactionFilter`, applied before delivery and before metering
- Live tail or replay from a stored ledger version, on the same RPC
- Authenticated with your existing dashboard key via `x-api-key` gRPC metadata
- Early access. Email `support@dwellir.com`, or see the [Transaction Stream Overview](https://www.dwellir.com/docs/aptos/streaming/overview)

## Move Development

- Entry functions (transactions) vs view functions (read-only)
- Modules, resources, and abilities (key, store, drop, copy)
- Testing with Move unit tests and Move Prover

## Object Model

- Globally addressable objects enable safe composition
- Reference types: `ConstructorRef`, `MutatorRef`, `DeleteRef`
- Ownership hierarchies and type-safe conversions

## Token Standards

- Legacy: `0x1::coin`, `0x3::token`
- Current: Fungible Asset (FA) and Digital Asset (DA)
- Migration patterns and compatibility tips

## Unique Aptos Features

- Sponsored transactions (fee payer)
- Multi-agent transactions (multiple signers)
- Key rotation (proven/unproven)
- Aggregator V2 counters
- Orderless transactions

## Code Examples

Find end-to-end examples for transfers, NFTs, module publish, and token ops in the respective sections.

## Performance Optimization

- Parallel-friendly design patterns (minimize write conflicts)
- Gas optimization via simulation and views
- Aggregators for scalable counters
- Batching reads and writes when appropriate

## Troubleshooting

- Common REST errors, transaction failures, module verification
- Gas estimation pitfalls and how to resolve them

## Resources & Tools

- Official SDKs (TS, Python, Rust)
- Explorers, faucets, testing tools, community links
