Most people compare investments by returns and ignore what it costs to get in and out. For a developer or a small trader, fees are a repeatable line item: they hit every order, they compound across a year, and they differ by asset class in ways that are easy to miss. This post walks through the fee types you will meet in stocks and ETFs, FX and crypto, using illustrative numbers you can plug into your own spreadsheet or script.

Fee types you will meet in stocks and ETFs

Stock and ETF costs usually come in a few layers:

  • Commission: a flat or per-share fee charged by the broker for executing an order. Some brokers now charge zero commission on listed shares, but that does not mean the trade is free.
  • Exchange and regulatory fees: small charges passed through on sales, set by the venue or regulator.
  • Spread: the gap between the best bid and best ask. You pay roughly half the spread on entry and half on exit.
  • Fund costs (ETFs): the expense ratio is deducted from the fund's assets over time, so you never see it as a separate charge on your statement.

A practical habit is to write each order's total cost as one formula: commission + spread cost + any per-order fees. Then you can compare brokers on the same basis rather than on headline "zero commission" claims.

FX conversion and spread, in plain numbers

FX costs are almost always embedded in the rate rather than shown as a fee. If you convert 1,000 EUR into USD, the provider quotes a buy and sell rate, and the difference from the mid-market rate is your cost.

Illustration (not a live quote), with a mid-market rate of 1.1000:

Provider Quoted rate Effective markup Cost on 1,000 EUR
Broker A 1.0945 0.50% about 5.00 EUR
Broker B (flat fee 4 EUR + 0.20% markup) 1.0978 0.20% + fee about 6.00 EUR

The point is not which provider wins; it is that a "no fee" card can still cost more than a visible fee once the markup is counted. Always convert the quote back to a percentage against mid-market.

A simple way to annualise small-ticket costs

Small per-trade costs look trivial until you repeat them. A reusable method:

  1. Measure the cost per trade as a percentage of notional value.
  2. Multiply by your expected monthly volume to get a monthly cost.
  3. Multiply by 12 for an annual figure.

In Python, this is a one-liner you can keep in a notebook:

def annual_cost(monthly_volume, fee_rate): return monthly_volume * fee_rate * 12 print(annual_cost(50_000, 0.0010)) # 600.0 per year at 0.10% 

Run it for each asset class with your own volume and you will see which costs dominate. For active traders, the percentage matters far more than the headline fixed fee.

Crypto trading fees, and how UNLOCK20 changes a Regular spot-taker bill

Crypto venues usually charge a maker fee (when your order adds liquidity to the book) and a taker fee (when it removes liquidity). Fee tiers depend on volume and account type.

OKX publishes its official global fee framework at https://www.okx.com/help/updates-to-global-fee-framework. Under the Regular spot tier, the maker fee is 0.08% and the taker fee is 0.10%. Taking a worked example with 50,000 USDT of monthly volume at the Regular spot-taker rate of 0.10%:

  • Without a discount: 50 USDT per month, 600 USDT per year.

This is where the referral comes in. If you open a new account using the referral code UNLOCK20 at https://okx.com/join/UNLOCK20, the referral offers a 20% rebate/discount on trading fees for eligible new accounts. Applied to the same volume:

  • With 20% off: 40 USDT per month, 480 USDT per year, a yearly saving of 120 USDT.

Availability and conditions can vary by country and user profile, so check the eligibility rules that apply to you before relying on the discount in your own calculations.

This article contains an affiliate link; if you sign up through it, I may earn a commission at no extra cost to you.

Terms checked: November 2026.

Item Detail
Referral code UNLOCK20
Confirmed benefit 20% rebate on trading fees

Putting the three asset classes next to each other

Once each market's costs are expressed as a percentage or a per-trade amount, a single comparison table makes the differences clear:

Asset class Main cost type Typical visibility How to annualise
Stocks / ETFs Commission, spread, expense ratio Mixed: some explicit, some hidden Per-order cost × trade count
FX Markup on the rate Mostly hidden Markup % × converted volume
Crypto Maker/taker fee Explicit on the fee schedule Fee % × monthly volume × 12

The useful takeaway is the method, not any single number: put every cost on the same basis, multiply by your real volume, and compare the annual totals. A cheap-looking headline fee can be the expensive option once the spread, markup or volume tier is included.