v1

latestOpenAPI 3.1.0UNLICENSED2026-07-26216788.0 KB
Orders

GetEstimatedFees

Estimates the trading fee for opening a position, given the margin you plan to post and the leverage you intend to use. The fee is computed as if it were deducted from margin upfront, before the position opens: fee = (rate / (1 + rate)) * margin, where rate is the market's configured trade-fee rate multiplied by leverage.

If the market has no trade-fee percentage configured, this returns a successful response with fees: -1 rather than an error.

post/order_service.v1.OrderService/GetEstimatedFees

Headers

Connect-Protocol-Version1 required

Define the version of the Connect protocol. If omitted, use 1.

Connect-Timeout-Msnumber

Define the timeout, in ms

Request body

marketIdstring int64

Market to estimate the fee for.

marginnumber float

Collateral you plan to post for the position, in quote asset units.

leveragenumber float

Leverage multiplier you intend to use. Combined with the market's configured trade-fee rate to compute the effective fee rate.

sizenumber float

Currently unused by the server. Reserved for future fee calculations that account for position size.

pricenumber float

Currently unused by the server. Reserved for future fee calculations that account for entry price.

Response

Success

feesnumber float

Estimated fee in USDC, deducted from margin upfront. -1 if the market has no trade-fee percentage configured.