Note: Currently this should only be tested by OTC users, ask APIHelp@cqg.com to enable “HMS Demo” on the products and services page in CAST for your demo trader first.
Scenario #1. Receiving a full list of exchange locations.
List of locations is represented as a list of contributors in CQG system.
Steps:
1. Send SymbolCategoryRequest with category_id set to a specific exchange category ID. CQG will provide a specific ID for specific setup, HMS Demo on Stage environment is 3516.
2. Receive SymbolCategoryReport with a list of contributors.
Scenario #2. Getting a list of products and contracts for a particular location.
Products are received as top level symbols in symbol trees, specific contracts are leavesof these trees.
Sample of a symbol tree:
- Product ' YCN' Yellow Corn - Code (SymbolRoot, Key) –
- Security (SymbolPrefix, Key) F.HM.YCNJLT1 (Source ZCE)
- Contract (Instrument, Key) F.HM.YCNJLT1N19
- Contract (Instrument, Key) F.HM.YCNJLT1Q19
- Contract (Instrument, Key) F.HM.YCNJLT1U19
…
- Security (SymbolPrefix, Key) F.HM.YCNJLT2 (Source ZCE)
- Contract (Instrument, Key) F.HM.YCNJLT2N19
- Contract (Instrument, Key) F.HM.YCNJLT2Q19
- Contract (Instrument, Key) F.HM.YCNJLT2U19
…
1. Send SymbolListRequest with category_ids set to a category of a specific contributor/location (see scenario #1) and depth 3.
2. Receive SymbolListReport with a tree of symbols that represents:
a. products (roots),
b. securities (intermediate levels, technically required to connect products to contracts) contracts (leaves)
Scenario #3. Getting a list of published bids and asks for a particular product or location.
1. Need to get name/id of a contributor/exchange
a. send information_request.symbol_category_list_request without params return top categories
b. remember id Exchange category(id1)
c. send information_request.symbol_category_list_request with category_id = id1, depth = 2
d. find in the list a contributor(s) or an exchange, and remember id (id2)
2. Get a list of products/securities
a. send information_request.symbol_list_request with category_ids = id2(repeated field) and depth = 2(return product and securities)
b. choose a security and remember id(id3)
3. Get list of contracts
a. send information_request.symbol_list_request with parent_symbol_id = id3, [optional] category_ids = id2
3.1 Options in the list
Security may have option maturities as children. So, to get options, execute an additional step..
a. send information_request.symbol_list_request with parent_symbol_id = id3, [optional] category_ids = id2
b. choose option maturity and remember id (id4)
c. send information_request.symbol_list_request with parent_symbol_id = id4, [optional] category_ids = id2
4. Get a list of products/securities/option maturities/contracts [Variant to replace steps 2 and 3]
a. send information_request.symbol_list_request with category_ids = id2(repeated field) and depth = 4
Scenario #4. Product search.
1. Send information_request.product_search_request with search term “corn” and (optional) with category_ids set to a category of a specific contributor/location (see scenario #1)
2. Get a information_report.product_search_report with Symbol with ProductMetadata list.