req_mkt_data – ShinyBroker

# req_mkt_data

`req_mkt_data(reqId, contract, genericTickList='', snapshot=False, regulatorySnapshot=False)`

Create a market data request string

## Parameters

Name | Type | Description | Default
--- | --- | --- | ---
`reqId` | int | Numeric identifier of the request | required
`contract` | Contract | A Contract object | required
`genericTickList` |  | Comma-separated string of the numerical Generic Ticks for which you’d like data | `''`
`snapshot` |  | Set to `True` if you want a snapshot | `False`
`regulatorySnapshot` |  | Set to `True` if you want a regulatory snapshot | `False`

## Examples

    import shinybroker as sb
    mkt_data_req_msg = sb.req_mkt_data(
        reqId=1,
        contract=sb.Contract({
            'symbol': 'AAPL',
            'secType': 'STK',
            'exchange': 'SMART',
            'currency': 'USD'
        }),
        genericTickList="233,236"  # request for "RT Volume" & "Shortable"
    )
    print(mkt_data_req_msg)