curl --request POST \
--url https://public-api.etoro.com/api/v2/trading/info/costs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-request-id: <x-request-id>' \
--header 'x-user-key: <api-key>' \
--data '
{
"action": "open",
"transaction": "buy",
"instrumentId": 101,
"settlementType": "cfd",
"orderType": "mkt",
"leverage": 2,
"amount": 1000,
"orderCurrency": "usd"
}
'{
"instrumentId": 101,
"symbol": "AAPL",
"costs": [
{
"costType": "markup",
"value": 0.15,
"currency": "USD"
},
{
"costType": "marketSpread",
"value": 0.03,
"currency": "USD"
},
{
"costType": "transactionFee",
"value": 1,
"currency": "USD"
},
{
"costType": "overnightFee",
"value": 0.25,
"currency": "USD"
},
{
"costType": "overWeekendFee",
"value": 0.75,
"currency": "USD"
},
{
"costType": "sdrt",
"value": 0.5,
"currency": "USD"
}
],
"lastUpdated": "2026-05-25T08:30:00Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}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. 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.
curl --request POST \
--url https://public-api.etoro.com/api/v2/trading/info/costs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-request-id: <x-request-id>' \
--header 'x-user-key: <api-key>' \
--data '
{
"action": "open",
"transaction": "buy",
"instrumentId": 101,
"settlementType": "cfd",
"orderType": "mkt",
"leverage": 2,
"amount": 1000,
"orderCurrency": "usd"
}
'{
"instrumentId": 101,
"symbol": "AAPL",
"costs": [
{
"costType": "markup",
"value": 0.15,
"currency": "USD"
},
{
"costType": "marketSpread",
"value": 0.03,
"currency": "USD"
},
{
"costType": "transactionFee",
"value": 1,
"currency": "USD"
},
{
"costType": "overnightFee",
"value": 0.25,
"currency": "USD"
},
{
"costType": "overWeekendFee",
"value": 0.75,
"currency": "USD"
},
{
"costType": "sdrt",
"value": 0.5,
"currency": "USD"
}
],
"lastUpdated": "2026-05-25T08:30:00Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}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_
Scopes
Headers
Body
Request payload for creating an order to open or close a position.
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 settlement type. Possible values: cfd, real, realFutures, marginTrade. Version rules: on Public API v2 create (POST /api/v2/trading/execution/orders, Admin v1) settlementType remains optional. On Public API v3 create (POST /api/v3/trading/execution/orders, Admin v2) it must NOT be set for MIT orders (the platform resolves it), and for all other order types it 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/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 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
Response
Cost breakdown resolved successfully.
Cost breakdown for a hypothetical open or close order.