# \MarketDataApi
All URIs are relative to *https://localhost:5000/v1/portal*
[**iserver_marketdata_history_get**](MarketDataApi.md#iserver_marketdata_history_get) | **Get** /iserver/marketdata/history | Market Data History
[**iserver_marketdata_snapshot_get**](MarketDataApi.md#iserver_marketdata_snapshot_get) | **Get** /iserver/marketdata/snapshot | Market Data
# **iserver_marketdata_history_get**
> ::models::HistoryData iserver_marketdata_history_get(conid, period, optional)
Market Data History
Get history of market Data for the given conid, length of data is controlled by period and bar. e.g. 1y period with bar =1w returns 52 data points
### Required Parameters
**conid** | **String**| contract id |
**period** | **String**| time period-- 1d,1w,1m,1y |
**optional** | **map[string]interface{}** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a map[string]interface{}.
**conid** | **String**| contract id |
**period** | **String**| time period-- 1d,1w,1m,1y |
**bar** | **String**| possible value-- 5min,1h,1w |
### Return type
[**::models::HistoryData**](history-data.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **iserver_marketdata_snapshot_get**
> Vec<::models::InlineResponse2007> iserver_marketdata_snapshot_get(conids, optional)
Market Data
Get Market Data for the given conid(s). The end-point will return by default bid, ask, last, change, change pct, close, listing exchange. See response fields for a list of available fields that can be request via fields argument.
### Required Parameters
**conids** | **String**| list of conids separated by comma |
**optional** | **map[string]interface{}** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a map[string]interface{}.
**conids** | **String**| list of conids separated by comma |
**since** | **i32**| time period since which updates are required |
**fields** | **String**| list of fields separated by comma |
### Return type
[**Vec<::models::InlineResponse2007>**](inline_response_200_7.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)