> For the complete documentation index, see [llms.txt](https://docs.novamp.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.novamp.io/developers/integration-examples.md).

# Integration Examples

Copy-paste-correct examples that call the **Novamp Public Data API**: list tokens, read a single token per chain, discover and search, pull DEX-standard pairs, and get swap quotes. No API key, permissive CORS.

> **Base: `https://app.novamp.io/api` · read-only · no API key**

{% hint style="info" %}
All examples target the branded host, which proxies to the correct per-chain indexer. Every token payload carries `chainId` / `chain`, so multi-chain results are self-describing.
{% endhint %}

## Setup

No SDK or key required — just `fetch`. A tiny typed helper keeps the examples short:

```ts
const BASE = "https://app.novamp.io/api";

async function api<T>(path: string): Promise<T> {
  const res = await fetch(`${BASE}${path}`);
  if (!res.ok) throw new Error(`${res.status} ${res.statusText}`);
  return (await res.json()) as T;
}
```

## 1. List tokens

Fetch a cross-chain token feed, sorted by trailing-24h volume.

{% tabs %}
{% tab title="TypeScript" %}

```ts
const { tokens, count } = await api<{
  tokens: Array<{
    chain: string;
    chainId: number | string;
    tokenAddress: string;
    priceUsd: string | null;
    volume24hUsd: string | null;
  }>;
  count: number;
}>("/tokens?limit=25&sort=volume");

for (const t of tokens) {
  console.log(t.chain, t.tokenAddress, t.priceUsd);
}
```

{% endtab %}

{% tab title="cURL" %}

```bash
curl "https://app.novamp.io/api/tokens?limit=25&sort=volume"
```

{% endtab %}
{% endtabs %}

Supported sorts: `recent`, `mcap`, `volume`. Paginate with `?limit=` (max 500) and `?offset=`.

## 2. Read a single token (chain-scoped)

Single-token reads are chain-scoped: pass the `chainId` and address together.

{% tabs %}
{% tab title="TypeScript" %}

```ts
// Base (8453) token by address
const token = await api<{
  chain: string;
  chainId: number;
  tokenAddress: string;
  pairAddress: string;
  marketCapUsd: string | null;
  liquidityUsd: string | null;
}>("/tokens/8453/0x1111111111111111111111111111111111111111");

console.log(token.chain, token.marketCapUsd);
```

{% endtab %}

{% tab title="cURL" %}

```bash
curl "https://app.novamp.io/api/tokens/8453/0x1111111111111111111111111111111111111111"
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
A `chainId`/address pair that doesn't match the indexer serving it returns `404`. Use the correct chain ID: `4663` robinhood, `8453` base, `56` bnb, `1` ethereum. See [Errors & Rate Limits](/developers/errors.md).
{% endhint %}

## 3. Discovery & search

Aggregated, cross-chain feeds for building a terminal home screen.

{% tabs %}
{% tab title="TypeScript" %}

```ts
// Live activity across chains
const pulse = await api("/discovery/pulse?networks=base,bnb,ethereum");

// Lifecycle board: fresh / graduating / graduated
const trenches = await api("/trenches");

// Cross-chain search over names, tickers, addresses
const results = await api(`/search?q=${encodeURIComponent("robin")}`);
```

{% endtab %}

{% tab title="cURL" %}

```bash
curl "https://app.novamp.io/api/discovery/pulse?networks=base,bnb,ethereum"
curl "https://app.novamp.io/api/trenches"
curl "https://app.novamp.io/api/search?q=robin"
```

{% endtab %}
{% endtabs %}

## 4. Per-chain market data & quotes

Pull market data for one token, then get a swap quote for it.

{% tabs %}
{% tab title="TypeScript" %}

```ts
// Low-level market data for a token on a chain
const market = await api("/data/market/token/base/0x1111111111111111111111111111111111111111");

// Uniswap / PancakeSwap on-chain quote
const quote = await api(
  "/uniswap/quote?chain=base&sell=0xEEeeeE...&buy=0x1111...&amount=1000000000000000000",
);
```

{% endtab %}

{% tab title="cURL" %}

```bash
curl "https://app.novamp.io/api/data/market/token/base/0x1111111111111111111111111111111111111111"
curl "https://app.novamp.io/api/uniswap/quote?chain=base&sell=0xEEeeeE...&buy=0x1111...&amount=1000000000000000000"
```

{% endtab %}
{% endtabs %}

## 5. DEX adapter (GeckoTerminal / Dexscreener)

The on-host adapter implements the GeckoTerminal / CoinGecko on-chain DEX standard and the Dexscreener Adapter spec. Reports `dexKey: "novamp"`.

{% tabs %}
{% tab title="TypeScript" %}

```ts
const DEX = "https://app.novamp.io/api/dex";

const latest = await (await fetch(`${DEX}/latest-block`)).json();
const events = await (
  await fetch(`${DEX}/events?fromBlock=${latest.block.blockNumber - 100}&toBlock=${latest.block.blockNumber}`)
).json();
```

{% endtab %}

{% tab title="cURL" %}

```bash
curl "https://app.novamp.io/api/dex/latest-block"
curl "https://app.novamp.io/api/dex/events?fromBlock=1000000&toBlock=1000100"
```

{% endtab %}
{% endtabs %}

## 6. Check name/ticker availability

Novamp exposes a cross-chain on-chain availability view for a `Name + Ticker`.

{% tabs %}
{% tab title="TypeScript" %}

```ts
const availability = await api<{
  available: boolean;
  canLaunch: boolean;
  symbolHash: string;
  nameHash: string;
}>(`/ticker/availability?symbol=ROBIN&name=${encodeURIComponent("Green Robin")}&creator=0x00...a1`);
```

{% endtab %}

{% tab title="cURL" %}

```bash
curl "https://app.novamp.io/api/ticker/availability?symbol=ROBIN&name=Green%20Robin&creator=0x00...a1"
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
This is Novamp's on-chain availability view. Copycat-proof identity checks and signed, cross-launchpad launch decisions are powered by AntiVamp — see [Identity Protection](/developers/identity-protection.md).
{% endhint %}

## Continue exploring

* [🧑‍💻 Developer Overview](/developers/overview.md)
* [🌐 Environments](/developers/environments.md)
* [❌ Errors & Rate Limits](/developers/errors.md)
* [📡 Public Data API](/developers/public-api.md)
* [🛡️ Identity Protection](/developers/identity-protection.md)


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.novamp.io/developers/integration-examples.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
