OpenAPI
Service GroupRelease notes
Trade

Orders:

For a limited period of time we have removed the possibility of placing trades via OpenAPI on any CME Group product as well as CFD's on CME Group products!

An application may verify in an instrument is on the list of "forbidden instruments" using either of two procedures:

a) Execute the following four queries against the instrument reference data endpoint:

https://developer.saxobank.com/sim/openapi/ref/v1/instruments?ExchangeId=COMEX   , or

https://developer.saxobank.com/sim/openapi/ref/v1/instruments?ExchangeId=NYMEX  , or

https://developer.saxobank.com/sim/openapi/ref/v1/instruments?ExchangeId=CBOT , or

https://developer.saxobank.com/sim/openapi/ref/v1/instruments?ExchangeId=CME, 

(Remember to use $top and $skip to go through the whole list).

If the instruments i on any of the above lists, orders on that instrument will be rejected.


b) When considering to trade a particular instrument, look up each instrument explictly and check if

  • The ExchangeId of the instrument is any of COMEX, NYMEX, CBOT or CME, or
  • If the ExchangeId is empty, then iterate the list of related instrumetns to see if the the ExchangeId of any of those related instruments are COMEX, NYMEX, CBOT or CME.

Pseudo code for this is shown below:


function isInstrumentRejected(uic, assetType) {
       const blockedExchanges = [ "CME""CBOT""NYMEX""COMEX" ];
       
       // Call API - need to be replaced with actual API call
       var response = client.Call("/ref/v1/instruments/details/"+ uic +"/" + assetType);
       
       if (blockedExchanges.indexOf(response.Exchange.ExchangeId) != -1) {
              return true;
       else if (response.Exchange.ExchangeId === "" && response.RelatedInstruments) {
              // Check related instruments
              for (var i = 0; i < response.RelatedInstruments.length; i++) {
                     var relatedInstrument = response.RelatedInstruments[i];
                     var rejected = isInstrumentRejected(relatedInstrument.Uic, relatedInstrument.AssetType);
                     if (rejected) return true;
              }
       }
  
       // Default to not rejected
       return false;
}