Documentation

DataMine API

DataMine offers a secure data download REST API to programmatically access your purchased historical data with a CME Group API ID.

Download

You can download a file that you have access to using this API call.

Endpoints:

Criteria

NAME

DESCRIPTION

REQUIRED

TYPE

fid

File IDs are available from the Order History page under My Account.

The fid format is: yyyymmdd-dataset_exch_symbol_foi_spread-venue

foi possible value:

  • fut
  • opt

spread possible value:

  • 0 for outright
  • 1 for spread

Example: 20240107-bbo_xcme_sp_fut_0-rth

Yes

String

list of File IDs (fid) is available here for download.

Connection Sample Code

Generating OAuth Access Token (Python):

import requests

token_url = 'https://auth.cmegroup.com/as/token.oauth2'
api_id = '<API ID>'
api_password= '<API Password>'

def get_access_token (token_url, api_id, api_password):
    response = requests.post(
        token_url,
        data={"grant_type": "client_credentials"},
        auth=(api_id, api_password),
    )
    return response.json()["access_token"]

access_token = get_access_token(token_url, client_id, client_secret)

Requesting Data (Python):

datamine_url = 'https://datamine.new.cmegroup.com/cme/api/v2/download?'
file_id = '<INSERT FILE ID>'

headers = {"Authorization": f"Bearer {access_token}"}
params={"fid": file_id}

response = requests.get(datamine_url, headers=headers, params=params)
print(response.text)

CME Group is the world’s leading derivatives marketplace. The company is comprised of four Designated Contract Markets (DCMs). 
Further information on each exchange's rules and product listings can be found by clicking on the links to CME, CBOT, NYMEX and COMEX.

© 2024 CME Group Inc. All rights reserved.