5
$\begingroup$

I am interested in downloading price data for individual futures contracts. For example, the price of the CBOT (CME) Wheat future ZWU3, which is the September 2023 contract for wheat, which will stop trading on 25 Aug 2023. So in general Exchange code + contract month + year, although specification is different per exchange.

Quandl offers the continuous contract, I'm not so interested in that. So -

  1. Is there any way to get raw futures prices on quandl?
  2. Is there another source for this data?

Thanks.

$\endgroup$
1

1 Answer 1

2
$\begingroup$

Have you tried Databento for this?

import databento as db

hist = db.Historical()
df = hist.timeseries.get_range(
    dataset='GLBX.MDP3',
    schema='trades',
    symbols=['ZWU3', 'ZWZ3'],
    start='2023-09-06',
    end='2023-09-06',
).to_df()

print(df)
                                                               ts_event  rtype  publisher_id  instrument_id action side  depth   price  size  flags  ts_in_delta  sequence symbol
ts_recv
2023-09-06 00:00:00.048889101+00:00           2023-09-06 00:00:00+00:00      0             1          11548      T    N      0  601.25    38      0        15887  13383956   ZWZ3
2023-09-06 00:00:00.050593420+00:00           2023-09-06 00:00:00+00:00      0             1          11548      T    N      0  600.50    15      0        15740  13383977   ZWZ3
2023-09-06 00:00:00.067415901+00:00 2023-09-06 00:00:00.002203413+00:00      0             1          11548      T    N      0  601.25     5      0        18638  13384054   ZWZ3
2023-09-06 00:00:00.068546997+00:00 2023-09-06 00:00:00.044519411+00:00      0             1          11548      T    A      0  600.25     1      0        15169  13384138   ZWZ3
2023-09-06 00:00:00.069071381+00:00 2023-09-06 00:00:00.048949485+00:00      0             1          11548      T    B      0  600.50     1    130        14889  13384177   ZWZ3
...                                                                 ...    ...           ...            ...    ...  ...    ...     ...   ...    ...          ...       ...    ...
2023-09-06 18:19:57.552399668+00:00 2023-09-06 18:19:57.552082273+00:00      0             1          11548      T    A      0  609.50     1    128        18729  25113311   ZWZ3
2023-09-06 18:19:59.426980100+00:00 2023-09-06 18:19:59.426556417+00:00      0             1          11548      T    N      0  610.00     2      0        18160  25118320   ZWZ3
2023-09-06 18:19:59.525244392+00:00 2023-09-06 18:19:59.524931395+00:00      0             1          11548      T    A      0  609.50     1    128        18572  25118969   ZWZ3
2023-09-06 18:19:59.688887631+00:00 2023-09-06 18:19:59.688240591+00:00      0             1          11548      T    N      0  609.50     1      0        15136  25119908   ZWZ3
2023-09-06 18:19:59.860866128+00:00 2023-09-06 18:19:59.860231917+00:00      0             1          11548      T    N      0  609.50     1      0        16191  25120794   ZWZ3

[11976 rows x 13 columns]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.