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

# Overview

These pages are for people building on Surged: trading bots, portfolio trackers, alternative frontends, anything that wants to read the launchpad or trade against it without going through [surged.fun](https://surged.fun). If you only want to know how launches, fees and graduation work, the [Launchpad](/readme.md) half of these docs covers it without code.

## What you get

**A TypeScript package,** [**`@surged/sdk`**](/integration/sdk/installation.md)**.** The pricing formula, the calldata encoders and the generated ABIs. It is the same code the official frontend uses, and its tests compare it against what the contracts themselves compute, so a quote from this package matches what the chain will do.

**A public HTTP api.** Launches, trades, candles and rankings, already indexed and cached. No key, no sign-up. Reading the chain yourself for this would mean running an indexer.

**A realtime feed.** One websocket that pushes new blocks, new launches and every trade as it lands.

## The shape of a trade

Everything below reduces to the same three steps.

1. **Read the curve.** `GET /launches/{token}` returns its terms and its current state.
2. **Price the trade locally.** `previewBuy` and `previewSell` run the exact formula of the contract. No round trip, no `eth_call`, and you can chain quotes to simulate a sequence of trades.
3. **Send the calldata.** `encodeBuy` and `encodeSell` build it; you sign and send with viem, ethers or whatever you already use.

## Before you start

Two things about Arc catch people out, and both are covered in [Arc, in practice](/integration/arc.md):

* **USDC is the native coin and it has 18 decimals**, while the ERC-20 view of the same balance has 6. Every amount in these pages is in the 18-decimal units unless it says otherwise.
* **Gas is paid in USDC**, so a buy that spends the whole balance leaves nothing to pay for itself.

## Where things live

|           |                                                                        |
| --------- | ---------------------------------------------------------------------- |
| App       | [surged.fun](https://surged.fun)                                       |
| Package   | [`@surged/sdk`](https://www.npmjs.com/package/@surged/sdk) on npm, MIT |
| Api       | `https://api.surged.fun`                                               |
| Chain     | Arc mainnet, chain id `5042`                                           |
| Contracts | [Official addresses](/launchpad/addresses.md)                          |
| Explorer  | [explorer.arc.io](https://explorer.arc.io)                             |
| Support   | <info@surged.fun>                                                      |


---

# 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.surged.fun/integration/overview.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.
