# 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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
