Accounts
| Network | routr | wNEAR |
|---|---|---|
| mainnet | routr.near | wrap.near |
| testnet | routr-dev.testnet | wrap.testnet |
Source: github.com/routrdottrade/routr. Every build's hash is on the deployments list. Testnet runs the same code and has pools and trades today: build against it.
1. Find the pools
One pool per token, quote and platform. Its id is the key token|quote|platform_id, known before the pool exists. Two ways to list them:
- Events:
pool_created(pool_id, token, quote, platform_id, creator, fee_bps, virtual_quote) andpool_seeded(amount of token seeded). - Views:
get_pools(from, limit)(all platforms, 100 per call) orget_platform_pools(platform_id, from, limit);get_pool(pool_id)for one.
A pool's token side is seeded once and can never be withdrawn; there are no LP shares.
2. Price a pool
A routr pool is constant product with a virtual quote reserve added to the real one. The price of one token, in the quote:
price = (real_quote + virtual_quote) / real_token (each in whole units: raw / 10^decimals)
virtual_quote is fixed per pool (from pool_created). real_token and real_quote after every trade are in the swap event, so a price series needs nothing but events. Example from a live testnet pool: real_quote 0.99, virtual_quote 1,014.20, real_token 999,024,811.92 gives 1.0162e-6 NEAR per token. Market cap = price × total supply (ft_total_supply on the token). Liquidity is the real reserves only (real_quote plus real_token at the price); the virtual reserve is pricing, not money.
3. Read trades
Every trade logs NEP-297 JSON: EVENT_JSON:{"standard": "routr", "version": "1.0.0", "event": "swap", "data": [{...}]}. Index swap: pool_id, token, quote, trader (the end account: use it as the maker), recipient, side (buy or sell of the token), token_in, amount_in, token_out, amount_out, fee and its legs, builder, platform_id, hop, real_token, real_quote. Amounts are strings of raw units. A route through several pools logs one swap per leg with hop = [index, count]; a refused trade logs swap_rejected and moves nothing. Any block source works (we read neardata).
4. Or use a hosted index
fastr, the first launchpad on routr, runs a public, free index of every routr pool (all platforms) from its own indexer. No key; CORS open; please cache.
| Route | Returns |
|---|---|
/pools?from&limit&platform | every pool with real and virtual reserves, price, liquidity, volume |
/candles/{token}?tf=1m|5m|15m|1h|4h|1d&from&to | OHLCV bars in the quote |
/trades/{token}?limit&before | trades, newest first |
/launches?sort=new|hot|volume|mcap | tokens with market figures, holders, flags |
/holders/{token} | holders, with accounts funded by the same source grouped |
/screener/latest-block, /asset, /pair, /events | the DEX Screener / GeckoTerminal adapter format |
/route?token_in&token_out&amount_in&account&builder | a ready-to-sign swap |
Base URL https://fastr-mainnet.fly.dev/api/v1 (mainnet) and https://fastr-testnet.fly.dev/api/v1 (testnet); the full list is at /api/v1/, OpenAPI at /api/v1/openapi.json.
5. Route trades and earn
A swap is one ft_transfer_call of the input to routr with this message (wrap NEAR first; routr refunds the input if the trade cannot run):
{"Swap": {"pool_id": "<token|quote|platform>", "min_out": "<raw units>", "recipient": null, "builder": "<your account>"}}
Preview with quote_swap(pool_id, token_in, amount_in, builder, sender). Name your account as builder and earn part of the pool fee on every trade you route, paid by routr, with no extra charge to your user:
- Open tier: any account, after one
register_buildercall, earns the platform's open share (fastr: 10% of the fee after the protocol's part). It arrives with the build staged for 2026-10-10. - Partner tier: integrators a platform approves earn its higher
builder_bps(fastr: 15%). Ask the platform.
Each pool freezes its split when it is created. A token can also carry a sell tax of its own (fastr tokens: read quote_sell on the token); the routr quote does not include it.
Contact
Questions or a partner-tier request: @routr_near on X. Security: [email protected].