For the complete documentation index, see llms.txt. This page is also available as Markdown.

Builder Codes

Builder Codes let an application that routes trades to Aevo (a builder) earn a fee on the orders it submits for its users. The user approves the builder once, with a maximum fee. After that, the builder attaches its builder_id and a fee rate to each order it places for that user.

  • The builder fee is separate from Aevo's trading fee. It is paid by the user in USDC and credited to the builder's fee account on every fill.

  • The builder chooses the rate per order, so it can vary by user, market or order type. It can never exceed what the user approved or Aevo's protocol cap.

  • Builder fees work on perpetual and option orders.

  • Builders get a dashboard and a reporting API for volume, fees, traders and fills, including a CSV export for reconciliation.

How it works

  1. Register a builder from your fee account. Aevo generates your builder_id. See Become a builder.

  2. Get user approval. Each user signs a one-time ApproveBuilder message that sets the maximum fee your builder may charge them. See User approval.

  3. Place orders with builder_id and builder_fee_rate. See Placing orders.

  4. Track and reconcile earnings with the dashboard or the reporting API. See Reporting API.

Endpoint map

Which endpoint to call at each step, and whose credentials to use.

  • Fee account: the builder's own Aevo account, which receives the fees.

  • User: the trader's account. Your app calls these with the user's API key, and signs orders with the user's signing key.

Step
Endpoint
Called with
Signature needed

Read protocol limits

No auth

—

Register your builder

Fee account API key

—

Rename your builder

Fee account API key

—

Show a builder's public profile

No auth

—

Onboard a new user (creates the account and a signing key)

No auth

User wallet (Register) and the new signing key (SignKey)

User approves your builder

POST /builder/approve from your app, or the approval link

No auth needed (send account), or the user API key

User wallet (ApproveBuilder)

Check whether a user approved you

Fee account API key

—

User lists their approvals

User API key

—

User revokes

User API key

—

Place or edit an order with a builder fee

POST /orders, POST /orders/{order_id}, POST /batch-orders, or websocket create_order / edit_order

User API key

User signing key (builder Order type)

Totals, daily series, comparison with the previous period

Fee account API key (read-only works)

—

Per-market breakdown

Fee account API key (read-only works)

—

Per-trader breakdown

Fee account API key (read-only works)

—

Individual fills, CSV export

Fee account API key (read-only works)

—

Fee units

Fee rates are decimal fractions with at most 6 decimals.

Rate
Basis points
API value
Signed EIP-712 value

0.01%

1 bps

"0.0001"

100

0.03%

3 bps

"0.0003"

300

0.05%

5 bps

"0.0005"

500

REST and websocket requests take the decimal string. EIP-712 signatures use the raw 6-decimal integer (the rate × 1,000,000).

Limits

Every builder fee must be at or below both of:

  • the user's approved maximum (max_fee_rate in their approval), and

  • Aevo's protocol cap for the instrument type:

Maximum builder fee

Perpetuals

5 bps (0.05%) of notional

Options

3 bps (0.03%) of index notional, and never more than 5% of the premium

The live values are published at GET /builder-config (max_fee_rate_perps = "0.0005", max_fee_rate_options = "0.0003", option_premium_cap = "0.05"). A user's approved maximum can't exceed 5 bps either.

An order above either limit is rejected when it is submitted. If a limit changes after an order is resting (the user revokes, the builder is suspended, or a cap is lowered), later fills of that order still execute, with a builder fee of 0.

Fee formulas

Perpetuals

Options. This has the same shape as Aevo's own option fee, so cheap options are protected:

Example: ETH index 2,700, 1 contract, builder rate 0.0003, option premium cap 0.05.

Premium
Index leg
Premium-cap leg
Builder fee

100

0.81

5.00

0.81

20

0.81

1.00

0.81

5

0.81

0.25

0.25

1

0.81

0.05

0.05

For a full comparison, including the crossover premium and how one approval interacts with the two caps, see Perpetuals vs Options Fees.

Environments

Mainnet
Testnet

REST

https://api.aevo.xyz

https://api-testnet.aevo.xyz

Websocket

wss://ws.aevo.xyz

wss://ws-testnet.aevo.xyz

App

https://app.aevo.xyz

https://testnet.aevo.xyz

Build and test on testnet first. The Python SDK supports registration, approvals, builder orders and reporting, and includes builder_example.py, a complete dry-run flow.

Last updated

Was this helpful?