# Intear docs > Developer docs for Intear on NEAR: the DEX Aggregator for the best swap routes, the Intear DEX contract, the Plach AMM, and the Intear API for token prices, charts, trades and balances. Which product to use: - [DEX Aggregator](https://docs.intear.tech/dex-aggregator.md): To swap tokens from an app, bot or wallet: one request returns the best route across NEAR DEXs, as transactions to sign and send in order. The aggregator is at `https://router.intear.tech`, with live quotes at `wss://router.intear.tech/route/subscribe`, on NEAR mainnet only. - [Intear DEX](https://docs.intear.tech/intear-dex.md): To call the engine contract directly: inner balances, swaps, operations, referral fees, and calls to the DEXs that run inside it. Intear DEX is the `dex.intear.near` contract. - [Plach](https://docs.intear.tech/plach.md): To swap through chosen Plach pools, add liquidity, or create public, private and launch pools. Plach is the DEX `slimedragon.near/xyk` on the Intear DEX contract, `dex.intear.near`, and every call goes to that contract. - [Intear API](https://docs.intear.tech/api.md): For prices, token data, charts, trades, transfers, balances and holders of NEAR fungible tokens, over HTTP or live over one WebSocket. The Intear API is at `https://api.intea.rs` and `wss://api.intea.rs/ws`, with no API key. Before writing code: - Amounts are integer strings in a token's smallest unit: 1 NEAR is `1000000000000000000000000` yoctoNEAR. In the Intear API, tokens are named by their contract's account ID, like `usdt.tether-token.near`. The DEX Aggregator, Intear DEX and Plach prefix it, like `nep141:usdt.tether-token.near`, and name native NEAR `near`. - `https://api.intea.rs/schema` describes every method, field and limit of the Intear API, for checking a client against or generating types from. - Every page is also Markdown: at its URL with `.md` in place of the trailing slash, like https://docs.intear.tech/api/reference/tokens.md for https://docs.intear.tech/api/reference/tokens/, or at its URL itself for a request with `Accept: text/markdown`. The links below go to the Markdown, and https://docs.intear.tech/llms-full.txt has every page in one file. - Code samples are tested in CI against the live services. In the Markdown, each part of a file links the whole file. ## DEX Aggregator - [All DEX Aggregator pages](https://docs.intear.tech/dex-aggregator/llms-full.txt): every page below in one file - [DEX Aggregator](https://docs.intear.tech/dex-aggregator.md): Find the best swap route across NEAR DEXs and get it back as ready-to-sign transactions, with simple frontend fee management. - [Quickstart](https://docs.intear.tech/dex-aggregator/quickstart.md): Get a swap quote from the Intear DEX Aggregator and execute it on NEAR in a few minutes, with JavaScript or Rust. - [Playground](https://docs.intear.tech/dex-aggregator/playground.md): Build a DEX Aggregator /route request in your browser, and see live quotes from every supported DEX on NEAR. - [Executing a route](https://docs.intear.tech/dex-aggregator/guides/executing-routes.md): How to turn a quote's execution instructions into signed NEAR transactions. - [Tokens and locations](https://docs.intear.tech/dex-aggregator/guides/tokens.md): How to name tokens, and how the aggregator moves them between wallets and DEX balances. - [Exact input and exact output](https://docs.intear.tech/dex-aggregator/guides/amounts.md): Quote by the amount you pay or by the amount you receive. - [Slippage](https://docs.intear.tech/dex-aggregator/guides/slippage.md): How to set slippage for DEX Aggregator swaps: a fixed tolerance, or automatic slippage based on how volatile the tokens are. - [Live quotes](https://docs.intear.tech/dex-aggregator/guides/live-quotes.md): Stream quotes over a WebSocket that update whenever pools change. - [App fees](https://docs.intear.tech/dex-aggregator/guides/referral-fees.md): Charge your own fee on the swaps you route, and track the volume you bring. - [GET /route](https://docs.intear.tech/dex-aggregator/reference/route.md): GET /route of the Intear DEX Aggregator: every query parameter, the response, and how quotes from NEAR DEXs are ranked. - [GET /route/outcome](https://docs.intear.tech/dex-aggregator/reference/outcome.md): GET /route/outcome of the Intear DEX Aggregator: what a route's transactions spent and received, why a swap failed, and what's left to move. - [Quote object](https://docs.intear.tech/dex-aggregator/reference/quote.md): Every field of a quote returned by /route and /route/subscribe. - [WebSocket /route/subscribe](https://docs.intear.tech/dex-aggregator/reference/subscribe.md): The WebSocket protocol of /route/subscribe: live DEX Aggregator quotes that update whenever NEAR pools change. - [DEXs](https://docs.intear.tech/dex-aggregator/reference/dexs.md): Every DEX the aggregator routes through, and what each one supports. - [Errors](https://docs.intear.tech/dex-aggregator/reference/errors.md): DEX Aggregator errors: the HTTP status and message of an invalid /route request, what causes each one, and the rate limits. ## Intear DEX - [All Intear DEX pages](https://docs.intear.tech/intear-dex/llms-full.txt): every page below in one file - [Intear DEX](https://docs.intear.tech/intear-dex.md): Intear DEX is a NEAR smart contract that runs many DEXs inside one contract: inner balances, swaps, and calls to DEXs, all without cross-contract calls. - [Quickstart](https://docs.intear.tech/intear-dex/quickstart.md): Use Intear DEX call by call with near CLI: pay for storage, register assets, deposit NEAR, swap it for USDt, and withdraw the USDt to your wallet. - [Inner balances](https://docs.intear.tech/intear-dex/guides/inner-balances.md): How Intear DEX holds assets for users and DEXs: registering assets, depositing NEAR, tokens, NFTs and multi tokens, transferring and withdrawing. - [Swaps](https://docs.intear.tech/intear-dex/guides/swaps.md): Swapping on Intear DEX: swap_simple, exact input and exact output, constraints, simulating a swap, and chaining swaps through several pools or DEXs. - [Referral fees](https://docs.intear.tech/intear-dex/guides/referral-fees.md): Charge your own fee on the swaps your app sends to Intear DEX: referral_fees on swap_simple, execute_operations and deposits, who gets paid, and in what. - [Operations](https://docs.intear.tech/intear-dex/guides/operations.md): Run several steps in one call on Intear DEX: execute_operations on your inner balance, or operations in the msg of a token deposit to deposit, swap and withdraw in one transaction. - [Storage](https://docs.intear.tech/intear-dex/guides/storage.md): How Intear DEX charges for storage: storage balances of accounts and DEXs, what uses them, and how to deposit and withdraw NEAR for storage. - [DEXs on the engine](https://docs.intear.tech/intear-dex/guides/dexes.md): How DEXs run inside Intear DEX: DEX IDs, deployment, calling a DEX with dex_call and dex_view, and what a DEX can see and do. - [Methods](https://docs.intear.tech/intear-dex/reference/methods.md): Every method of the Intear DEX engine contract (dex.intear.near): arguments, attached deposit, return values, and who can call it. - [Types](https://docs.intear.tech/intear-dex/reference/types.md): JSON formats of Intear DEX arguments: AssetId, DexId, AccountOrDexId, amounts, Operation, DepositMessage, ReferralFees and StorageBalance. - [Events](https://docs.intear.tech/intear-dex/reference/events.md): Events that the Intear DEX engine logs in the inteardex standard: swaps, deposits, withdrawals, balance updates, DEX deployments, and the compressed events of DEXs. - [Errors](https://docs.intear.tech/intear-dex/reference/errors.md): Intear DEX engine errors: the panic messages of failed calls, what causes each one, and how to fix it. ## Plach - [All Plach pages](https://docs.intear.tech/plach/llms-full.txt): every page below in one file - [Plach](https://docs.intear.tech/plach.md): Plach is the AMM on Intear DEX: constant-product pools of NEAR, NEP-141 and NEP-245 tokens, with split and multi-pool routes, liquidity shares, launch pools and pool fees. - [Swaps](https://docs.intear.tech/plach/guides/swaps.md): Swapping on Plach: the Borsh swap message with its routes and fee discount, single-pool, multi-pool and split routes, and how prices are computed. - [Liquidity](https://docs.intear.tech/plach/guides/liquidity.md): Providing liquidity on Plach: registering for shares, adding and removing liquidity in public pools, and liquidity of private pools. - [Pools](https://docs.intear.tech/plach/guides/pools.md): Plach pools: public, private and launch pools, creating a pool, editing fees and locking a private pool, pool versions, and reading pools. - [Fees](https://docs.intear.tech/plach/guides/fees.md): Plach fees: fee configurations of pools, fixed and scheduled fees, the protocol fee, collecting and withdrawing fees, community fees of launch pools, and signed fee discounts. - [Methods](https://docs.intear.tech/plach/reference/methods.md): Every method of Plach on Intear DEX: the dex_call methods with their Borsh arguments, attached assets and who can call them, and the dex_view methods. - [Types](https://docs.intear.tech/plach/reference/types.md): Borsh types of Plach: swap routes, pool types, fee configurations and pool views, with the index of every enum variant. - [Events](https://docs.intear.tech/plach/reference/events.md): Events of Plach: swaps, pool updates and liquidity changes, logged in Borsh inside the dex_events_borsh event of Intear DEX, and the older JSON events. - [Errors](https://docs.intear.tech/plach/reference/errors.md): Plach errors: the messages of failed swaps, liquidity changes, pool creation and fee calls, what causes each one, and how to fix it. ## Intear API - [All Intear API pages](https://docs.intear.tech/api/llms-full.txt): every page below in one file - [Intear API](https://docs.intear.tech/api.md): Prices, token data, charts, trades, transfers and balances for NEAR fungible tokens, live over one WebSocket. - [Quickstart](https://docs.intear.tech/api/quickstart.md): Fetch tokens over HTTP, then keep a live token list over the WebSocket. - [Playground](https://docs.intear.tech/api/playground.md): Send requests to the Intear API WebSocket and watch replies and pushes live. - [Connecting](https://docs.intear.tech/api/guides/connecting.md): How messages, subscriptions, updates and reconnects work on the WebSocket. - [Live token lists](https://docs.intear.tech/api/guides/live-token-lists.md): Follow tokens with tokens.subscribe, with thresholds, intervals, top lists and resuming. - [Keeping every token](https://docs.intear.tech/api/guides/syncing-tokens.md): Keep a backend's copy of every token current by polling with since. - [History, then live](https://docs.intear.tech/api/guides/history-then-live.md): Show past trades or transfers and keep the list live, without missing or repeating an event. - [Charts](https://docs.intear.tech/api/guides/charts.md): Price candles in USD or NEAR, fetched once or kept live. - [Balances and holders](https://docs.intear.tech/api/guides/balances-and-holders.md): An account's token balances, and a token's largest holders, fetched once or kept live. - [Using HTTP](https://docs.intear.tech/api/guides/http.md): Call the methods that answer once over plain HTTP, and how params go in a URL. - [Token fields](https://docs.intear.tech/api/reference/token-fields.md): Every field a token has, what it means, and what it can be filtered, sorted and thresholded by. - [Tokens](https://docs.intear.tech/api/reference/tokens.md): tokens.get, tokens.search, tokens.subscribe and tokens.update. - [Trades](https://docs.intear.tech/api/reference/trades.md): trades.query and trades.subscribe, and the fields of a trade. - [Transfers](https://docs.intear.tech/api/reference/transfers.md): transfers.query and transfers.subscribe, and the fields of a transfer and a transaction. - [Candles](https://docs.intear.tech/api/reference/candles.md): Intear API candles.get and candles.subscribe: price candles of NEAR tokens in USD or NEAR, from 1 second to 1 week, fetched or live. - [Prices at a time](https://docs.intear.tech/api/reference/prices.md): prices.at, a token's price at a point in the past. - [Balances](https://docs.intear.tech/api/reference/balances.md): Intear API balances.get and balances.subscribe: an account's token, NEAR and Rhea balances, fetched once or followed live. - [Holders](https://docs.intear.tech/api/reference/holders.md): Intear API holders.get and holders.subscribe: a NEAR token's holders, largest balance first, paged or followed live. - [Positions](https://docs.intear.tech/api/reference/positions.md): Intear API positions.get: an account's positions in tokens from its swaps, open and closed, with what each cost and made. - [Traders](https://docs.intear.tech/api/reference/traders.md): Intear API traders.get: a token's top traders by profit over the last day, week, month or all time. - [Accounts](https://docs.intear.tech/api/reference/accounts.md): Intear API accounts.search: NEAR accounts by prefix, the most recently active first. And the accounts a public key can sign for, by key or ML-DSA-65 key handle. - [Messages](https://docs.intear.tech/api/reference/messages.md): Every message on the WebSocket, and the unsubscribe and schema methods. - [Errors](https://docs.intear.tech/api/reference/errors.md): Error codes of the Intear API, what each one means, and the HTTP status it comes with. - [Limits and credits](https://docs.intear.tech/api/reference/limits.md): Limits per connection and request, and what messages cost in credits. ## Agent skills One skill per product. To install one, save it as `/SKILL.md` in the agent's skills folder, like `~/.claude/skills/` for Claude Code. - [intear-dex-aggregator](https://docs.intear.tech/skills/intear-dex-aggregator/SKILL.md): DEX Aggregator for agents: where it runs, what to read first and the rules to follow - [intear-dex](https://docs.intear.tech/skills/intear-dex/SKILL.md): Intear DEX for agents: where it runs, what to read first and the rules to follow - [intear-plach](https://docs.intear.tech/skills/intear-plach/SKILL.md): Plach for agents: where it runs, what to read first and the rules to follow - [intear-api](https://docs.intear.tech/skills/intear-api/SKILL.md): Intear API for agents: where it runs, what to read first and the rules to follow