Bayse Markets charges a trading fee on each executed trade. Fees are always included in quote responses so you can review the estimated total cost before placing an order.Documentation Index
Fetch the complete documentation index at: https://docs.bayse.markets/llms.txt
Use this file to discover all available pages before exploring further.
How fees are calculated
Fees use a variance-based formula that scales with price uncertainty: Where:- feeRate — the market’s configured fee rate (e.g. 0.10 for 10%).
- C — the number of shares (quantity).
- P — the execution price per share (between 0 and 1).
- 0.5 — the floor factor, ensuring the effective rate never drops below 50% of feeRate.
How the formula behaves
The termP × max(1 − P, 0.5) controls how the fee scales with price. When 1 − P ≥ 0.5 (i.e. P ≤ 0.50), the variance branch P × (1 − P) applies. Above P = 0.50 the floor branch P × 0.5 takes over, keeping fee behavior predictable at extreme prices.
| Price (P) | Multiplier P × max(1 − P, 0.5) | Fee as % of trade value (feeRate = 0.10) |
|---|---|---|
| 0.30 | 0.30 × 0.70 = 0.21 | 7.0% |
| 0.50 | 0.50 × 0.50 = 0.25 | 5.0% |
| 0.70 | 0.70 × 0.50 = 0.35 (floor begins) | 5.0% |
| 0.90 | 0.90 × 0.50 = 0.45 (floor) | 5.0% |
fee / (C × P), which simplifies to feeRate × max(1 − P, 0.5).
- Fees are highest when the price is near 0.50 (maximum uncertainty).
- Fees are lowest at extreme prices (high certainty), but the floor ensures the rate never drops below
feeRate × 0.5(5% at feeRate = 0.10).
Fees by market engine
AMM markets
On AMM markets, the fee is built into the execution price — it is not broken out as a separatefee field. The quote response shows:
amount— total you pay.costOfShares— same asamount(fee is embedded).price— effective per-share price, which already includes the fee.
price and currentMarketPrice reflects the fee and any price impact. Orders execute instantly at the quoted price.
CLOB markets
On CLOB markets, fees apply only to takers (orders that match against resting orders on the book). Makers — orders that add liquidity to the book — pay no fee.| Role | Fee |
|---|---|
| Taker | Variance-based fee at fill price |
| Maker | Free |
amount— total you pay.fee— deducted from shares, not from the amount.quantity— shares received after the fee.
amount— net proceeds after the fee is deducted.fee— deducted from proceeds, not from shares.quantity— shares you are selling.
Fees in quotes vs execution
Always get a quote before placing an order. The quote gives you:- The expected fee.
- The number of shares you will receive.
- The estimated total cost including the fee.