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 tax 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.
Authorizations
API key of the application. Only valid together with the x-user-key header — the pair is an alternative to OAuth bearer authentication, never sent alongside it. The pair is granted the same permissions the operation's OAuth scopes describe.
Demo credential for trying the API from these docs: lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663
User-specific authentication key. Only valid together with the x-api-key header — the pair is an alternative to OAuth bearer authentication, never sent alongside it.
Demo credential for trying the API from these docs: eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_
Headers
A unique request identifier.
"afe6f200-f82a-4dd6-a7ec-265991ed0095"
Body
Request payload for creating an order to open or close a position.
The order action whether to open or close a position. Currently only open is supported in this endpoint.
open, close "open"
The transaction direction: buy opens a long position, sell closes a long position, sellShort opens a short position, and buyToCover closes a short position. Currently only buy and sellShort are supported; sell and buyToCover are rejected and will be enabled in a future release alongside the close action.
buy, sell, sellShort, buyToCover "buy"
The asset ticker symbol. For open orders provide exactly one of symbol or instrumentId - providing both is rejected.
"AAPL"
The eToro instrument identifier. For open orders provide exactly one of symbol or instrumentId - providing both is rejected.
101
The settlement type. Possible values: cfd, real, realFutures, marginTrade. Conditional: this parameter must NOT be set for MIT orders; the platform resolves the settlement type from the instrument, direction and leverage of the order. For other order types, the settlement type must be set to an eligible settlement type. A mismatch is rejected during execution after the order has already been accepted with an order id. The valid values differ per instrument, direction and leverage - call POST /api/v2/trading/info/demo/eligibility and read leverageConfigs[].settlementType for the relevant combinations of direction, leverage and settlementType before supplying them; that configuration changes rarely, so one call can be cached and reused for the whole session. real - the real instrument held in full value. realFutures - the real future contract, which is a derivative of an underlying instrument. Each future contract usually maintains a different number of underlying instrument units than 1. The number of units held in a single future contract is called the multiplier, which can be bigger, lower, or equal to 1. marginTrade - the real instrument held with only a portion of its value called margin (leveraged asset). cfd - contract for difference, which is a derivative following the underlying instrument.
cfd, real, realFutures, marginTrade The order execution type. Possible values: mkt (market), mit (market if touched), limitIOC. mkt - a market order that executes at the available market price. mit - a market-if-touched order that waits until the triggerRate or better is published in the market feed and then executes at the market price at that time. limitIOC - an immediate limit order that executes now at the limitRate or better if such a rate is available at the market, or gets cancelled immediately if no such rate is available now. mit is not supported when settlementType is realFutures.
mkt, mit, limitIOC "mkt"
The trigger rate for mit orders. Required for mit orders, and must be greater than zero. Must not be provided for mkt or limitIOC orders - supplying it is rejected.
The leverage multiplier to apply. Optional - defaults to 1 (no leverage) when omitted, and must be 1 or greater. Any value greater than 1 requires stopLossRate.
2
The monetary amount to invest in the order currency. Mutually exclusive with units and contracts. Must be greater than 0.
1000
The currency for the order amount. Typically usd. Only USD is currently supported.
"usd"
The number of units to trade. Mutually exclusive with amount and contracts. Must be greater than 0.
The number of contracts to trade, used for real futures instead of units. Mutually exclusive with amount and units. Only accepted when settlementType is realFutures, and must be a whole number greater than 0.
The stop-loss rate at which the position will automatically close. Required when leverage is greater than 1, when transaction is sellShort, when settlementType is realFutures, or when stopLossType is trailing. Optional otherwise, and must be 0 or greater.
1.2
The take-profit rate at which the position will automatically close. Must be 0 or greater.
1.5
The stop-loss type. Possible values: fixed, trailing. The default is fixed. fixed - the stop-loss rate does not change. trailing - the stop-loss rate moves up whenever the instrument rate goes up such that the stop loss is triggered from the same distance from the last peak rate as the distance of the stop-loss rate from the rate at the open. Setting trailing requires stopLossRate.
fixed, trailing "fixed"
Additional funds in the order currency added to the invested amount (margin), if the desire is for the stop-loss rate to be set lower than normally permitted. Only accepted when settlementType is realFutures - supplying it for any other settlement type is rejected. Must be greater than 0.
LimitRate should be set for LimitIOC orders only, where it is required and must be greater than zero; supplying it for any other order type is rejected. it is the client submitted price which will be routed to the exchange for execution. Please note that a client submitted price cannot exceed a 10% deviation from current market price otherwise it will be rejected on pre trade
1.5
List of position IDs to close. Reserved for the close action, which is not supported yet - supplying any value is currently rejected.
Response
Cost breakdown resolved successfully.
Cost breakdown for a hypothetical open or close order.