GuidesTrading
Fees
Which market fields hold the trading fee, how the fee is taken from a trade, and where to see what you paid.
Takers pay a fee on each matched trade, and makers pay nothing. The fee formula, the fee schedule and the fee discount are explained in Predict fees and limits in the product docs. This page covers what you need when you trade through the API.
Placing and removing orders costs nothing. On-chain actions, such as cancelling an order or redeeming a position, cost only the BNB gas of their transaction. Converting positions in a negative-risk market can carry a fee of its own (see Manage positions).
The market's fee fields
| Field on the market | Meaning |
|---|---|
feeRateBps | The taker fee rate, in basis points (100 bps is 1%). |
makerFeeBps | The maker fee rate. It is always 0. |
Read both from Get market by ID or from the market objects inside Get categories. Rates can differ between markets, so read feeRateBps from each market you trade.
The taker is the order that matches against resting orders. A resting limit order that gets filled is the maker, and it pays no fee.
How the fee is taken
The exchange contract takes the fee on-chain, from what the taker receives:
- Buy: you receive fewer shares. The fee's value is converted to shares at the trade's price.
- Sell: you receive less USDT.
The feeRateBps you sign
Every order carries a feeRateBps field, which you sign with the rest of the order. It is the most you agree to pay, not the rate you are charged.
- Set it to the market's
feeRateBps. It must be at least the market's rate less your referral discount, if you have one. A lower rate is rejected withcreate_order_fee_rate_too_low. - When you place the order, Predict records its rate: the market's
feeRateBpsless your referral discount. - You are charged the lower of the market's current rate and the rate recorded for the order. Signing a rate above the recorded one doesn't change what you pay.
- The exchange contract caps the signed rate at 1000 bps (10%). An order signed above that fails the exchange's check with
create_order_contract_fee_too_high.
On-chain, the exchange first charges the signed rate. The fee module then refunds the difference to you in the same transaction, so you never pay more than the charged rate.
// sign the market's own rate, read from GET /v1/markets/{id}.
const order = orderBuilder.buildOrder("LIMIT", {
side: Side.BUY,
tokenId: market.outcomes[0].onChainId,
makerAmount,
takerAmount,
feeRateBps: market.feeRateBps,
});See Place orders for the full order flow.
See the fees you paid
Get order match events returns each match with a fee object on the taker and on every maker:
| Field | Meaning |
|---|---|
fee.amount | The fee, in wei. |
fee.type | SHARES for a fee taken in outcome tokens (buys), COLLATERAL for a fee taken in USDT (sells). |
Maker rebates and referral fees
Part of a taker's fee can be paid out to the makers of the orders it filled, and to whoever referred the taker. Both come out of the taker fee, so the taker never pays more. The product docs explain both programs in Maker rebates and Invites, which also covers the referral discount.
Two endpoints list what your wallet has earned. Both need your API key and a JWT (see Authentication).
| Endpoint | Lists |
|---|---|
GET /v1/maker-rebates | Rebates earned as a maker. |
GET /v1/referral-fees | Fees earned from the trades of wallets you referred. |
Query parameters, the same for both:
| Parameter | Meaning |
|---|---|
fee_in_collateral | Required. true lists amounts paid in USDT, false lists amounts paid in outcome tokens. |
first | Page size. Default 50, maximum 150. |
after | The cursor from the previous page. |
occurred_after, occurred_before | Unix timestamps in milliseconds. Both bounds are exclusive. Send them again with every page. |
Each row has transactionHash, createdAt, takerFeeTokenId (0 when the amount is USDT), amount in wei, marketQuestion, marketOutcomeName and price. Results are newest first.