CME DataMine API

CME DataMine now offers a secure data download API to access and download historical data. The API allows you to programmatically retrieve your purchased data. Learn more about use and functionality of the API. 

List

You can query a list of entitled files using this API call, with optional criteria to limit the number of results returned. The maximum number of result from a list is 1000. If you have more result than the limit, you need to use the paging links that are returned in the "paging" section as part of the response.

In order to access your data, please complete the following steps:

  1. Register for one API ID per subscription:
    • Log in to your CME Group Login account
    • In the top right corner, click on your CME Group Login username and click on your user name and then "My Profile"
    • Click "API Management"
    • Click "Create API ID" and register
  2. Please go to https://datamine.cmegroup.com/
    • Click on “My Profile” at the top of the page
    • Click the “Edit” button below API ID and enter your credentials
    • Click “Save”
  3. Please refer back to this documentation for steps on how to access your data.

Criteria

Name

Description

Required

Type

dataset

Dataset the user is querying.

Example: bbo, block, eod, md, tick (see reference section for remaps)

No

String

exchangecode

Exchange Code the data is requested for.

Example: xcme, xnym, xcbt, xcec, cmed, etc. (see reference section for remaps)

No

String

foiindicator

Future Option Indicator.

Possible values:

  • fut – Futures
  • opt – Options
  • idx – Indices

No

String

venue

The venue the product is traded in.

Possible values: 

  • rth - Regular trading hours
  • eth - Extended trading hours
  • otc - Clearport

No

String

productcode

CME Product Code

Example: cl, es, gs

No

String

yyyymmdd

CME trade date. Accepted format is yyyymmdd

Example: 20150131

No

String

limit

Amount of results per request. Maximum 1000 rows will be returned.

A paging information will return with offset information.

No

int

offset

Pagination mechanism 

Use the offset returned by previous query for previous or next page.

No

int

firstfid

Alternative pagination mechanism

Use the firstfid returned in the paging section to query previous page

No String
lastfid Use the lastfid returned in the paging section to query next page No String

Syntax

curl --user {{UNO_API_KEY}}:{{UNO_API_PASSWORD}} 'https://{{URL}}/cme/api/v1/list?{{criteria1}}={{val1}}&{{criteria2}}={{val2}}&{{criteriaN}}={{valN}}'

Curl Users:
curl --user API_JOHNSMITH:12345
'
https://datamine.cmegroup.com/cme/api/v1/list?dataset=eod&exchangecode=xcec&yyyymmdd=20150130'
WGET Users:
wget --user API_JOHNSMITH -O- -q --password 12345 'https://datamine.cmegroup.com/cme/api/v1/list'

Response

Elements of the "files" array

Name

Description

Type

dataset

Dataset of the file

String

exchangecode

Exchange Code for the file

String

url

Fully qualified download URL

String

expiration

expiration date of file access

String

productcode

CME Product Code

String

yyyymmdd

CME trade date

String

checksum

MD5 Checksum for data

String

size

File size in bytes

int

fid

Unique identifier for file

String

orderid

Order number

String

"Paging" Object

Name

Description

Type

previous

Pre-populated link that will bring you toprevious the previous page of result

String

next

Pre-populated link that will bring you to the next page of result

String

Sample Response

{

  "files": [

    {

      "dataset": "eod",

      "yyyymmdd": "20150130",

      "url": "http://localhost:8080/cme/api/v1/download?fid=20150130-eod_xcec_ali_fut_0-eth_p",

      "fid": "20150130-eod_xcec_ali_fut_0-eth_p",

      "orderid": "29",

      "exchangecode": "xcec",

      "productcode": "ali",

      "checksum": "c609f0a1091c693e759d46f1b8756f54",

      "size": 642,

      "expiration": "2016-06-10"

    },

    {

      "dataset": "eod",

      "yyyymmdd": "20150130",

      "url": "http://localhost:8080/cme/api/v1/download?fid=20150130-eod_xcec_ali_fut_0-eth_f",

      "fid": "20150130-eod_xcec_ali_fut_0-eth_f",

      "orderid": "31",

      "exchangecode": "xcec",

      "productcode": "ali",

      "checksum": "c609f0a1091c693e759d46f1b8756f54",

      "size": 642,

      "expiration": "2016-06-12"

    }

  ],

  "paging": {

    "previous": "http://localhost:8080/cme/api/v1/list?limit=2&offset=0",

    "next": "http://localhost:8080/cme/api/v1/list?limit=2&offset=3"

  }

}

 

**Please note that paging information is at the end of the response**

Download

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

Criteria

Name

Description

Required

Type

fid

File ID, available from the list API.

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: 20160107-bbo_xcme_sp_fut_0-rth

Yes

String

Syntax:

curl -J -O --user {{UNO_API_KEY}}:{{UNO_API_PASSWORD}} 'https://{{URL}}/cme/api/v1/download?fid={{val}}'

Curl Users: 
curl -J -O --user API_JOHNSMITH:12345
'https://datamine.cmegroup.com/cme/api/v1/download?fid=20150130-eod_xcec_ali_fut_0-eth_p'

You can use “-o” option to name your own file: 
curl --user API_JOHNSMITH:12345
'https://datamine.cmegroup.com/cme/api/v1/download?fid=20150130-eod_xcec_ali_fut_0-eth_p' -o my_eod_file.gz

WGET Users:
wget --content-disposition --user API_TEST_DM_PROD --password Test12345 'https://datamine.cmegroup.com/cme/api/v1/download?fid=20160920-EOD_xcbt_c_fut_0-eth_p'

Batch Download

You can download a concatenated csv file containing all the EOD files that you have access to for a specific day using this api call.

Criteria

Name

Description

Required

Type

dataset

Currently only EOD is supported

Yes

String

yyyymmdd

CME trade date. Accepted format is yyyymmdd

 

Example: 20150131

Yes

String

period

Possible values:

f, e, p

Yes

String

Syntax:

curl -J -O --user {{UNO_API_KEY}}:{{UNO_API_PASSWORD}} 'https://{{URL}}/cme/api/v1/batchdownload?dataset={{val}}&yyyymmdd={{val}}&period={{value}}'

curl -J -O --user API_JOHNSMITH:12345

'https://datamine.cmegroup.com/cme/api/v1/batchdownload?dataset=eod&yyyymmdd=20150130&period=f'

Reference

Dataset

API Value

Top-of-Book

BBO

Block Trades

BLOCK

End-of-day

EOD

Market Depth (FIX)

MD

Market Depth (RLC)

RLC

RLC-SecDef

RLCSECDEF

SecDef

SECDEF

Time & Sales

TICK

Exchange

API value

COMEX

XCEC

CBOT

XCBT

CME

XCME

NYMEX

XNYM

CMED

CMED

Web Browser API Calls

For clients who are not familiar with Curl nor WGET, a simpler way of executing API calls is through the web browser. Simply put this list call in a browser, and hit enter:

https://datamine.cmegroup.com/cme/api/v1/list?limit=1

Enter your API username and password, hit enter to see the listing. You should see something similar to this:

{

  "files": [

    {

      "dataset": "MD",

      "yyyymmdd": "20161003",

      "url": "https://datamine.cmegroup.com/cme/api/v1/download?fid=20161003-MD_xnym_zz6_fut_1-eth",

      "fid": "20161003-MD_xnym_zz6_fut_1-eth",

      "orderid": "2793",

      "exchangecode": "xnym",

      "productcode": "zz6",

      "checksum": "87ba2eada6a38c093307d579ad97026e",

      "size": 299,

      "expiration": "2017-07-05"

    }

  ],

  "paging": {

    "previous": "",

    "next": "https://datamine.cmegroup.com/cme/api/v1/list?limit=1&lastFid=20161003-MD_xnym_zz6_fut_1-eth&page=1"

 }

}

 

The "url" can be copy / pasted into a browser to download the file.

More about DataMine API