Skip to main content
Splash charges a fee on every order. On a buy, the fee is added to the cost of the contracts and both are taken from your cash when the order is submitted. Your fee settings are on your account, so you can compute the exact amount an order will take, compare it with your balance, and only then send the order. You never send the fee. An order is the same raw order as always (market_id, side, quantity, price, time_in_force and request_id), and Splash computes the fee itself from your fee settings. This page gives the formula Splash uses, so the number you compute is the number Splash takes.

Before you send an order

  1. Read your account with GET /account: fee is your fee settings and max_trade is the maximum trade. Both change rarely, so read them at start-up rather than before every order.
  2. Read your balance with GET /balance: cash_available is the cash you can spend now.
  3. Compute the order’s cost: the contracts cost, the fee and the debit, as below.
  4. Check both limits: the debit must be at most cash_available, and the contracts cost at most max_trade.
  5. Send the raw order to POST /trading/orders and follow it as in Placing an order.
The two limits fail differently. An order whose contracts cost is more than max_trade is refused at once with 400 Order exceeds the maximum trade of $<limit>, and its request_id is spent. An order whose debit is more than your cash is accepted (200 with order_status: "pending") and then ends cancelled without filling, so you only learn about it by polling. Checking first saves you both.

The fee

fee on GET /account looks like this:
fee = theta × quantity × price × (1 − price) The fee is largest at a price of $0.50 and shrinks toward $0.01 and $0.99. The formula gives the same number for price and 1 − price, so it is the same whichever side you trade, and on a buy or a close.
  • Rounding. Multiply in that order, rounding each product to 6 decimal places, half up: theta × quantity, then × price, then × (1 − price). Round the result to the cent half to even (banker’s rounding): $0.105 becomes $0.10 and $0.035 becomes $0.04. Every other amount on this page rounds half up; this is the one step that does not.
  • Example. 10 contracts at $0.59, theta 0.07: 0.07 × 10 × 0.59 × 0.41 = $0.16933, so the fee is $0.17.
Read theta from your own account rather than copying 0.07 from these examples.

What a buy costs

A buy opens contracts, or adds to the ones you hold on the same side.
  • Contracts cost = quantity × price, exactly. price is the price you send, in the terms of side: a no order is priced in NO terms. A sub-cent price such as 0.655 is used as sent.
  • Fee: as above.
  • Debit = contracts cost + fee, rounded to the cent, half up. The fee is always a whole number of cents, so this rounds only the contracts cost: 13 contracts at $0.655 cost $8.515, and with a fee of $0.29 the debit is $8.805, rounded to $8.81.
The debit is the most a buy costs you. It is taken when the order is submitted. If the order fills at a better price, Splash works out the fee again at the fill price and credits back whatever the debit came to above the fill plus that fee. If the fill-or-kill order cannot fill, the whole debit is returned. If the fee at the fill price would bring the total above the debit, you are still charged no more than the debit. A buy at a sub-cent price is sent to the market at the cent below, so part of its debit can come back as a refund even when it fills at your limit: a buy at $0.655 is debited at $0.655 a contract and placed at $0.65. Maximum trade. The contracts cost, not the debit, is checked against max_trade: the fee is not counted. With a max_trade of 100000, 169500 contracts at $0.59 cost $100,005.00 and are refused, whatever the fee; 169491 contracts cost $99,999.69 and are allowed.

What a close costs

A close sells the contracts you hold: an order on the other side for exactly the number you hold (see side on Place an order). Its price is in the terms of the side you send, so to sell 10 YES contracts at $0.66 you send side: "no", price: 0.34.
  • Nothing is debited, so a close needs no cash and is never limited by max_trade.
  • When it fills, you are credited the proceeds less the fee: quantity × (1 − price) − fee, rounded to the cent, half up. The fee is computed at the fill price, so at your limit price this is the least you receive, give or take a cent of fee.
Selling 10 YES at $0.66 with theta 0.07: the proceeds are 10 × 0.66 = $6.60, the fee is 0.07 × 10 × 0.34 × 0.66 = $0.15708, rounded to $0.16, and you are credited $6.44.

Rounding at a glance

Use decimal arithmetic, not binary floating point: in a float, 0.655 × 1000 is not exactly 655, and a half-cent tie can round the wrong way. The calculator below uses Python’s decimal, and integer micro-dollars in TypeScript (bigint) and Go (int64).

Check your implementation

Run your code on these orders and compare to the cent. Each came from Splash’s own fee code. The second row is a half-to-even tie: 0.07 × 6 × 0.5 × 0.5 = $0.105, which rounds to $0.10, not $0.11. The fifth row rounds the debit half up: $8.515 + $0.29 = $8.805, debited as $8.81. The last row sells 10 YES contracts at $0.66, filled at that price.

A cost calculator

order_cost / orderCost / OrderCost takes the fee object from GET /account as it arrives, the order’s price and quantity, and whether the order closes a position you hold. It returns the contracts cost, the fee, the debit and, for a close, the credit. can_afford / canAfford / CanAfford checks the debit against cash_available and the contracts cost against max_trade. The Python and TypeScript tabs then read the two values and place the order, reusing the request helpers from the signed-order example; the Go tab is a complete program with the values filled in by hand.