# eToro

> Read eToro market data and portfolios, track watchlists, and manage price alerts.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/etoro

## Actions

### Create a price alert

Create a price alert.

**Inputs**

- Symbol (`symbol`, text, required): Trading symbol to identify the instrument (e.g. AAPL, TSLA)
- Target price (`target_price`, number, required): Target price at which the alert should trigger. Must be greater than 0. At least 0.

**Outputs**

- `data` (object): The response from eToro.

**Example output**

```json
{
  "data": {
    "data": {
      "alertId": "example",
      "createdAt": "example",
      "currentPrice": 1,
      "instrumentId": 1,
      "symbol": "example",
      "targetPrice": 1,
      "updatedAt": "example"
    },
    "success": true
  }
}
```

### Delete a price alert

Delete a price alert.

**Inputs**

- Alert ID (`alert_id`, text, required): Unique identifier of the price alert to delete

**Outputs**

- `data` (object): The response from eToro.

**Example output**

```json
{
  "data": {
    "data": {
      "alertId": "example"
    },
    "success": true
  }
}
```

### Get aggregated balances

Get aggregated balances.

**Inputs**

- Account types (`account_types`, text): Account types.
- Display currency (`display_currency`, text): ISO 4217 currency code for totals and conversions. Defaults to USD.
- Include zero balances (`include_zero_balances`, true/false): Whether to include accounts with a zero balance in the response. Defaults to false.
- Include sub accounts (`include_sub_accounts`, true/false): Whether to also include the user's sub-account Trading balances. Only effective when Trading is in scope. That means when no accountTypes filter is supplied, or the filter includes trading. Sub-account entries are returned with accountType Trading and subType "subAccount". Defaults to false.
- Expand (`expand`, text): Comma-separated list of optional sections to include in the response. Valid values: equityDetails.

**Outputs**

- `data` (object): The response from eToro.

**Example output**

```json
{
  "data": {
    "balances": [
      {}
    ],
    "displayCurrency": "example",
    "gcid": 1,
    "totalBalance": 1
  }
}
```

### Get authenticated user profile

Get authenticated user profile.

**Inputs**: None.

**Outputs**

- `data` (object): The response from eToro.

**Example output**

```json
{
  "data": {
    "avatarUrl": "example",
    "dateOfBirth": "example",
    "demoCid": 1,
    "firstName": "example",
    "gcid": 1,
    "gender": 1,
    "language": 1,
    "lastName": "example",
    "middleName": "example",
    "playerLevel": 1,
    "realCid": 1,
    "username": "example"
  }
}
```

### Get curated lists

Get curated lists.

**Inputs**: None.

**Outputs**

- `data` (object): The response from eToro.

**Example output**

```json
{
  "data": {
    "curatedLists": [
      {}
    ]
  }
}
```

### Get demo portfolio breakdown

Get demo portfolio breakdown.

**Inputs**: None.

**Outputs**

- `data` (object): The response from eToro.

**Example output**

```json
{
  "data": {
    "clientPortfolio": {
      "bonusCredit": 1,
      "credit": 1,
      "entryOrders": [
        {}
      ],
      "exitOrders": [
        {}
      ],
      "mirrors": [
        {}
      ],
      "orders": [
        {}
      ],
      "ordersForClose": [
        {}
      ],
      "ordersForCloseMultiple": [
        {}
      ],
      "ordersForOpen": [
        {}
      ],
      "positions": [
        {}
      ],
      "stockOrders": [
        {}
      ]
    }
  }
}
```

### Get in-app notifications

Get in-app notifications.

**Inputs**: None.

**Outputs**

- `data` (object): The response from eToro.

**Example output**

```json
{
  "data": {
    "messages": [
      {}
    ],
    "meta": {
      "notSeen": 1
    }
  }
}
```

### Get instrument candle history

Get instrument candle history.

**Inputs**

- Direction (`direction`, text, required): Sorting direction of the candles data. Use 'asc' for oldest to newest, or 'desc' for newest to oldest. One of: `asc`, `desc`.
- Interval (`interval`, text, required): Time interval for each candle. Determines the granularity of the price data. Shorter intervals provide more detailed price action but require more data points. One of: `OneMinute`, `FiveMinutes`, `TenMinutes`, `FifteenMinutes`, `ThirtyMinutes`, `OneHour`, `FourHours`, `OneDay`, `OneWeek`.
- Candles count (`candles_count`, number, required): Number of candles to retrieve. Maximum value is 1000. For longer historical periods, consider using a larger time interval or making multiple requests. At most 1000.
- Instrument ID (`instrument_id`, number, required): Unique identifier of the financial instrument to retrieve candles for. This ID is consistent across all etoro systems.

**Outputs**

- `data` (object): The response from eToro.

**Example output**

```json
{
  "data": {
    "candles": [
      {}
    ],
    "interval": "example"
  }
}
```

### Get portfolio breakdown

Get portfolio breakdown.

**Inputs**: None.

**Outputs**

- `data` (object): The response from eToro.

**Example output**

```json
{
  "data": {
    "clientPortfolio": {
      "bonusCredit": 1,
      "credit": 1,
      "entryOrders": [
        {}
      ],
      "exitOrders": [
        {}
      ],
      "mirrors": [
        {}
      ],
      "orders": [
        {}
      ],
      "ordersForClose": [
        {}
      ],
      "ordersForCloseMultiple": [
        {}
      ],
      "ordersForOpen": [
        {}
      ],
      "positions": [
        {}
      ],
      "stockOrders": [
        {}
      ]
    }
  }
}
```

### Get price alerts

Get price alerts.

**Inputs**

- Alert IDS (`alert_ids`, text): Comma-separated list of alert IDs to filter by. AND-combined with the instrument filter when both are present.
- Instrument IDS (`instrument_ids`, text): Comma-separated list of instrument IDs to filter by. Treated as the same dimension as symbols. Results matching either instrumentIds or symbols are returned.
- Symbols (`symbols`, text): Comma-separated list of trading symbols to filter by. Treated as the same dimension as instrumentIds. Results matching either symbols or instrumentIds are returned.

**Outputs**

- `data` (object): The response from eToro.

**Example output**

```json
{
  "data": {
    "results": [
      {}
    ]
  }
}
```

### Get single watchlist

Get single watchlist.

**Inputs**

- Watchlist ID (`watchlist_id`, text, required): Unique identifier of the watchlist
- Page number (`page_number`, number): Page number for pagination. At least 0.
- Items per page (`items_per_page`, number): Number of items per page. From 1 to 1000.

**Outputs**

- `data` (object): The response from eToro.

**Example output**

```json
{
  "data": {
    "exception": {
      "invalidItems": [
        "example"
      ],
      "message": "example",
      "reason": "example"
    },
    "isSucceeded": true,
    "meta": {
      "itemsPerPage": 1,
      "maxItemsInWatchlistLimit": 1,
      "maxWatchlistsLimit": 1,
      "pageNumber": 1
    },
    "status": 1,
    "watchlists": [
      {}
    ]
  }
}
```

### Get stocks industries

Get stocks industries.

**Inputs**

- Stocks industry IDS (`stocks_industry_ids`, list): A comma seperated list of stock industry ids to retrieves

**Outputs**

- `data` (object): The response from eToro.

**Example output**

```json
{
  "data": {
    "stocksIndustries": [
      {}
    ]
  }
}
```

### Get user watchlists

Get user watchlists.

**Inputs**

- Items per page for single (`items_per_page_for_single`, number): Number of items to include per watchlist for pagination. From 1 to 1000.
- Ensure builtin watchlists (`ensure_builtin_watchlists`, true/false): Whether to ensure built-in watchlists are included
- Add related assets (`add_related_assets`, true/false): Whether to include related assets in the response

**Outputs**

- `data` (object): The response from eToro.

**Example output**

```json
{
  "data": {
    "exception": {
      "invalidItems": [
        "example"
      ],
      "message": "example",
      "reason": "example"
    },
    "isSucceeded": true,
    "meta": {
      "itemsPerPage": 1,
      "maxItemsInWatchlistLimit": 1,
      "maxWatchlistsLimit": 1,
      "pageNumber": 1
    },
    "status": 1,
    "watchlists": [
      {}
    ]
  }
}
```

### List instrument types

List instrument types.

**Inputs**

- Instrument type IDS (`instrument_type_ids`, list): A comma seperated list of instrument type ids to retrieve

**Outputs**

- `data` (object): The response from eToro.

**Example output**

```json
{
  "data": {
    "instrumentTypes": [
      {}
    ]
  }
}
```

### List supported exchanges

List supported exchanges.

**Inputs**

- Exchange IDS (`exchange_ids`, list): A comma seperated list of exchange ids to retrieve

**Outputs**

- `data` (object): The response from eToro.

**Example output**

```json
{
  "data": {
    "exchangeInfo": [
      {}
    ]
  }
}
```

### List trading history

List trading history.

**Inputs**

- Min date (`min_date`, date, required): The start date of the period you would like to view.
- Page (`page`, number): The page number.
- Page size (`page_size`, number): The amount of trades in each page.

**Outputs**

- `data` (list): The response from eToro.

**Example output**

```json
{
  "data": [
    {
      "closeRate": 1,
      "closeTimestamp": "example",
      "instrumentId": 1,
      "isBuy": true,
      "leverage": 1,
      "netProfit": 1,
      "openRate": 1,
      "openTimestamp": "example",
      "positionId": 1,
      "stopLossRate": 1,
      "takeProfitRate": 1,
      "trailingStopLoss": true
    }
  ]
}
```

### Retrieve bid/ask rates for one or more instruments

Retrieve bid/ask rates for one or more instruments.

**Inputs**

- Instrument IDS (`instrument_ids`, list, required): List of instrument IDs to fetch rates for (max 1000).

**Outputs**

- `data` (object): The response from eToro.

**Example output**

```json
{
  "data": {
    "results": [
      {}
    ]
  }
}
```

### Search for securities (instruments) by ID or symbol

Search for securities (instruments) by ID or symbol.

**Inputs**

- Instruments IDS (`instruments_ids`, list): Filter by instrument IDs. Mutually exclusive with symbols.
- Symbols (`symbols`, list): Filter by trading symbols (e.g. AAPL). Mutually exclusive with instrumentsIds.
- Page size (`page_size`, number): Maximum number of results per page. Defaults to 100 when omitted.
- Page token (`page_token`, text): Pagination cursor from the previous response's pagination.nextPageToken.
- Exchange ID (`exchange_id`, number): Filter by exchange ID.
- Type (`type`, text): Filter by instrument type. One of: `Forex`, `Commodity`, `CFD`, `Indices`, `Stocks`, `ETF`, `Bonds`, `TrustFunds`, `Options`, `Crypto`.

**Outputs**

- `data` (object): The response from eToro.

**Example output**

```json
{
  "data": {
    "pagination": {
      "hasNext": true,
      "nextPageToken": "example",
      "pageSize": 1
    },
    "results": [
      {}
    ]
  }
}
```

### Search instruments by free-text query

Search instruments by free-text query.

**Inputs**

- Query (`query`, text, required): Free-text query to match instruments by name or symbol (1-100 chars).
- Limit (`limit`, number): Maximum number of results (1-50, default 10). From 1 to 50.

**Outputs**

- `data` (object): The response from eToro.

**Example output**

```json
{
  "data": {
    "results": [
      {}
    ]
  }
}
```

### Update a price alert

Update a price alert.

**Inputs**

- Alert ID (`alert_id`, text, required): Unique identifier of the price alert
- Target price (`target_price`, number, required): New target price for the alert. Must be greater than 0. At least 0.

**Outputs**

- `data` (object): The response from eToro.

**Example output**

```json
{
  "data": {
    "data": {
      "alertId": "example",
      "createdAt": "example",
      "currentPrice": 1,
      "instrumentId": 1,
      "symbol": "example",
      "targetPrice": 1,
      "updatedAt": "example"
    },
    "success": true
  }
}
```
