TL;DR
Crypto fees apply to each fill's traded notional, so use actual fractional quantities and entry and exit prices. The worked $9,500 BTC purchase paid $66.50 at a 0.7% rate, and its three displayed fills paid $132.79 in total. The full 2024 BTC trend test returned 56.61% with 28.77% drawdown, versus BTC hold's 119.27% return. Inspect turnover, idle cash and pricing fields before attributing the performance difference to fees alone.
Follow the fractional quantity and its fee

Show the table · 3 rows, 7 columns
Scroll sideways to compare all columns. Select a heading to sort.
| 2024-01-01T14:30:00.000Z | BTC-USD | Buy | 0.22279508898062086 | $42640.08 | $42640.08 | $66.50 |
| 2024-01-14T21:00:00.000Z | BTC-USD | Sell | 0.22123552335775648 | $42505.61 | $42505.61 | $65.83 |
| 2024-01-15T14:30:00.000Z | BTC-USD | Sell | 0.001559565622864384 | $42474.15 | $42474.15 | $0.46 |
No matching rows. Clear the filter to see all records.
The opening notional is 0.22279508898062086 BTC × $42640.08 = $9,500.00. At the declared 0.7% rate, its calculated fee rounds to $66.50, matching the recorded $66.50. The following sale fills together close 0.22279508898062086 BTC. All three displayed fees sum to $132.79.
The entry uses 95% of buying power, and fees are a separate cash flow. Read both exit fills rather than assuming the first sale closed every fractional unit. The full source retains the remaining orders and their timestamps.
Compare these fills with the full test's cost and outcome
Portfolio value (USD)
- BTC 50-day trend 2024-12-31, 21:00:00 UTC
- $15,660.69
- SPY buy and hold 2024-12-31, 21:00:00 UTC
- $12,530.29
- BTC buy and hold 2024-12-31, 21:00:00 UTC
- $21,926.92
BTC 50-day trend: 28.77% largest decline in plotted observations. 2024-03-13, 20:00:00 UTC ($14,803.09) to 2024-10-11, 13:30:00 UTC ($10,544.26).
- Strategy return
- 56.61%
- Maximum drawdown
- 28.77%
- SPY return
- 25.30%
- BTC return
- 119.27%
This saved algorithm completed a Day backtest from 2024-01-01 through 2024-12-31, with $10000.00 starting capital. The chart includes all 744 exported history points.
Compare the strategy with SPY and BTC buy and hold. Each benchmark invests the full $10000.00 starting balance over the same 2024 period. SPY follows its trading sessions; BTC includes weekends. This algorithm follows its own allocation and entry/exit rules, with 0.7% of traded notional charged on each fill. Explore cash and position values to see how capital was deployed.
Read the order's pricing fields
Each captured Filled order records submittedPrice, filledAtPrice, quantity, side and fees. Compare the prices with the signal timestamp and portfolio history. Query raw Order events when you want to inspect the full recorded fields.
Calculate the fee
These examples use 0.7% of traded notional per fill. A $1,000 purchase incurs $7; a later $1,200 sale incurs $8.40. Their combined fee is $15.40. Use the actual entry and exit notionals when exploring a completed trade. The saved totalFees includes the run's recorded trading fees.
Explore turnover
A faster signal can create more entries and exits. Compare the count and notional of Filled orders with the fee total, then explore whether those trades changed the curve. The spot calculator lets you vary the hypothetical fee rate for a single purchase and sale.
No comments yet.