order_tag such as enum:STRATEGY_DCA during order placement. Use this guide when your DEX, strategy backend, vault, bot flow, campaign, or broker-specific UX needs fee rules that differ by order category.
This guide explains the integration flow and links to the API reference pages. It intentionally does not duplicate the full API specs.
Integration Flow
Create order enums
Builder admins create one or more order enums with a
default_fee_rate and optional pair_overrides.Use POST /v1/broker/order_enum.Expose active enums to your DEX
Your DEX or backend fetches active enums with
broker_id so it can decide which enum to apply and disclose the extra fee to users.Use GET /v1/public/broker/order_enums.Apply the enum during order placement
Set
order_tag to enum:<UPPERCASE_ID> on supported order creation requests, for example enum:STRATEGY_DCA.Use POST /v1/order, POST /v1/batch-order, or POST /v1/algo/order.Reconcile order and trade results
Read
order_tag on orders for attribution and use trade-level fee fields for reporting and reconciliation.Use the order and trade APIs listed below.Public DEX Integration
Use GET/v1/public/broker/order_enums from your DEX or backend service to discover available order enums for a builder.
The public list endpoint is unauthenticated and takes broker_id as a query parameter:
symbol, enum_id, and include_archived.
Fee Disclosure
The order enum fee is charged in addition to the user’s existing trading fee:pair_overrides includes the order symbol, use that symbol-specific enum fee rate. Otherwise, use default_fee_rate. Display the enum fee separately from the standard trading fee so users understand both components before placing an order.
Applying Order Enums to Orders
Setorder_tag on supported order creation APIs:
| API | Integration note |
|---|---|
POST /v1/order | Set order_tag on the order request body. |
POST /v1/batch-order | Set order_tag on each order object inside orders that should use the enum. |
POST /v1/algo/order | Set order_tag on the algo order request body. |
order_tag supports two formats:
| Format | Example | Behavior |
|---|---|---|
| Referral code | REFERRAL2026 | Plain string. Overrides the referral relationship. |
| Order enum | enum:STRATEGY_DCA | Adds the configured order enum fee on top of existing fees and preserves referral. |
order_tag is immutable after order placement. To change the enum on an open order, cancel the order and place a new one with the intended order_tag.
Returned Order and Trade Data
Use order APIs for attribution and UI display:| API | Relevant data |
|---|---|
GET /v1/order/{order_id} | Returns order_tag on the order. |
GET /v1/client/order/{client_order_id} | Returns order_tag on the order. |
GET /v1/orders | Returns order_tag on each order row. |
| API | Relevant data |
|---|---|
GET /v1/trades | Returns fee, order_enum_fee, and order_enum_fee_rate on trade rows. |
GET /v1/trade/{trade_id} | Returns fee, order_enum_fee, and order_enum_fee_rate. |
GET /v1/order/{order_id}/trades | Returns order trades with enum fee fields. |
GET /v1/algo/order/{order_id}/trades | Returns algo order trades with enum fee fields. |
fee includes both the standard trading fee and the order enum fee:
Admin Operations
Admin endpoints require standard Orderly signed request headers and should only be called from secured builder admin tooling or backend services.| Action | API reference |
|---|---|
| Create enum | POST /v1/broker/order_enum |
| Update enum | PUT /v1/broker/order_enum/{enum_id} |
| List enums with usage stats | GET /v1/broker/order_enums |
| Get single enum with usage stats | GET /v1/broker/order_enum/{enum_id} |
| Archive enum | POST /v1/broker/order_enum/archive |
| Unarchive enum | POST /v1/broker/order_enum/unarchive |
Data Model Notes
| Field | Description |
|---|---|
enum_id | Unique uppercase enum ID, for example STRATEGY_DCA. |
status | active or archived. |
default_fee_rate | Default fee rate applied when no symbol override exists. |
pair_overrides | Optional map of symbol to fee rate. |
created_time | Creation timestamp in milliseconds. |
updated_time | Last update timestamp in milliseconds. |
total_orders, total_volume, and total_fees_collected.
Implementation Notes
- Treat
enum_idas immutable. If the classification semantics change, create a new enum rather than reusing a misleading ID. - Use uppercase alphanumeric characters and underscores only, with a maximum
enum_idlength of 31 characters. - The full
order_tagvalue must fit within 36 characters, including theenum:prefix. - Archived enums should not be used for new orders.
- Do not expose admin endpoints, account credentials, or signing keys in the DEX frontend.
- Cache public enum responses briefly to avoid rate limit pressure, but refresh when admin configuration changes need to be reflected quickly.
- Fee configuration is evaluated at execution time, so updates can affect later fills of existing open orders.