> For the complete documentation index, see [llms.txt](https://docs.asterdexcorp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.asterdexcorp.com/program-and-rewards/aster-code.md). Agents can also search and read this documentation through its [MCP server](https://docs.asterdexcorp.com/~gitbook/mcp).

# Aster Code

### **What is Aster Code?**

Aster Code is a broker ecosystem that lets builders collect fees when users trade through their custom interfaces. Builders create their own trading UIs on top of Aster's infrastructure and earn a commission on every executed trade routed through their interface.

### **How Aster Code Works**

To become a builder and start earning fees:

1. **Create an account:** Register using your Web3 wallet address.
2. **Deposit the required amount:** Deposit a minimum of 100 $ASTER into your Aster perps account. The builder must maintain at least 100 $ASTER in their perps wallet throughout the process.
3. **Build your UI:** Create your own trading interface and connect it to Aster Code. You can find the API demo code in the [Aster Code API documentation](https://asterdex.github.io/aster-api-website/asterCode/integration-flow/).
4. **Invite users:** Users trade via your UI page. They must complete both Agent approval and Builder fee approval the first time they trade through your interface.

To view builder fee details: visit the [Aster Code](https://www.asterdex.com/en/aster-code) page and click Builder Center for an overview of your fees and to claim them.

### **Why Use Aster Code?**

* **Fee collection:** Builders reliably earn a builder fee on executed trades (ADL and liquidation orders do not count toward builder fees).
* **Transparent user consent:** Users explicitly approve both the broker (agent) and the maximum builder fee rate.
* **Automated rewards:** Once an order is filled and validated, builder fees are recorded automatically on a daily basis.
* **Simple integration:** The flow fits seamlessly into existing trading steps – users approve the builder and agent during the "Enable Trading" process.

### **API Documentation**

Full API documentation is available at: <https://asterdex.github.io/aster-api-website/asterCode/integration-flow/><br>

<br>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.asterdexcorp.com/program-and-rewards/aster-code.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
