Your app can charge its own fee on the orders it places for a member who connected their STX account. The fee is on top of the STX trade fee. STX collects it on each fill and pays what your app earns out to you, so you need no billing or wallet of your own.
App fees are for apps in the US. An app in Ontario reads public market data only and does not place orders, so it never charges one.
Set the rates on an order
Section titled “Set the rates on an order”Send two rates on the order as percentage strings with at most two decimal places ("1" is 1%):
| Field | Charged on |
|---|---|
app_fee_maker_pct |
the order’s fills that provide liquidity |
app_fee_taker_pct |
the order’s fills that take liquidity |
Leave a rate out, or send null or "0", and that side pays nothing. A number instead of a string is a 400. Both rates must be within the cap STX publishes for app fees, currently 5%. An order over the cap is refused with a 422, as is an order carrying a rate on an exchange where app fees are not on (App fees are not accepted).
{ "market_id": "e00651a3-10cb-4bc1-9e1f-c5ea1796c83b", "action": "buy", "order_type": "limit", "price": "0.58", "quantity": "40", "app_fee_maker_pct": null, "app_fee_taker_pct": "1"}The rates are fixed when the order is accepted. An order resting on the book keeps them until it fills or is cancelled.
What a fill pays
Section titled “What a fill pays”Each fill pays its side’s rate on what the member risks on it:
- a buy risks quantity × price;
- a sell risks quantity × (max price − price).
With a $1.00 max price, the order above fills 40 contracts at $0.58 as a taker. It risks $23.20, and 1% of that is $0.232, so the app fee is $0.24. A sell of 40 at $0.58 at the same rate risks $16.80 and pays $0.17.
- An order’s fills are summed and rounded up to the cent once, so small fills do not each round up. An order that fills at a nonzero rate pays at least $0.01, as the STX trade fee does.
- Each side pays only the rate on its own order. A side with no app rate pays nothing.
- STX reserves the most the order can still pay from the member’s available balance, as it does for its own fee.
- When STX cancels a trade or voids its market, the app fee on it is refunded with the STX fee. When STX reprices a trade, the fill is charged again at its new price, so the app fee can go up or down. The order’s total is always exact.
What the member sees
Section titled “What the member sees”Members see every app fee they pay, with the app that charged it, separate from the STX fee:
- Orders show
app_fee_maker_pct,app_fee_taker_pct,app_client_idandapp_name, on REST, GraphQL and theorders:channel. - Fills show the rate that applied as
app_fee_pct, the fee asapp_fee, and the app.total_feeincludes the app fee. - Positions show
total_app_feesbesidetotal_fees, which includes them. - Fee statements (
GET /api/v1/portfolio/fees) list each charge as anapp_feerow and each refund as anapp_fee_refundrow, with the fill’smarket_id, its ownfee_idand the app.
{ "type": "app_fee", "amount": "-0.2400", "market_id": "e00651a3-10cb-4bc1-9e1f-c5ea1796c83b", "fee_id": "9e8d7c6b-5a4f-5e3d-8c2b-1a0f9e8d7c6b", "app_client_id": "stxapp_client_3kTq9Wm2", "app_name": "Acme Trader"}Orders and fills belong to the member’s account, not to your app. A token with the history scope sees all of them, including those another app placed and the fees it charged.

