v1
latestOpenAPI 3.0.12026-07-26171200932.8 KBTrading - Demo
Get what-if trading cost breakdown
Rate limit: 20 requests per 60 seconds. This is a dedicated limit for this endpoint — it is not shared with (pooled across) any other endpoint, so the full rate is available to this endpoint alone.
Returns the markup, market spread, transaction fee, overnight fee, over-weekend fee, and SDRT that would apply if the supplied order were executed now against the demo account. For action: open, exactly one of symbol or instrumentId must be provided and leverage must be at least 1. For action: close, positionIds must be non-empty.
post/api/v2/trading/info/demo/costs
Headers
x-request-idstring uuid required
Example:96553ce8-0cd3-4a5e-9021-0b0fe8cd36ec
A unique request identifier.
x-api-keystring password required
Example:lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663
API key for authentication.
x-user-keystring password required
Example:eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_
User-specific authentication key.
Request body
Example request
{
"action": "open",
"transaction": "buy",
"symbol": "AAPL",
"instrumentId": 101,
"settlementType": "cfd",
"orderType": "mkt",
"leverage": 2,
"amount": 1000,
"orderCurrency": "usd",
"stopLossRate": 1.2,
"takeProfitRate": 1.5,
"stopLossType": "fixed"
}Response
Cost breakdown resolved successfully.