getFuturesSpecifications API

The getFuturesSpecifications API provides contract information such as trading hours, contract size and tick size for futures contracts.

All APIs

Contact Us to Get Access

Inputs

symbols optional

A symbol or code that identifies a financial instrument. Multiple symbols separated by a comma may be used.

Type
list (A comma or semi-colon delimited string.) 
Example
GC,CL 

exchanges optional

The code for the exchange a group of financial instruments are listed on.

Type
list (A comma or semi-colon delimited string.) 
Example
COMEX,NYMEX 

futuresCategory optional

Futures categories include: Energies, Financials, Grains, Indices, Meats, Metals, Softs and Currencies.

Type
list (A comma or semi-colon delimited string.) 
Example
energies,metals 

Outputs

Name / Requirement
Description
Type
symbol
always returned
A symbol or code that identifies a financial instrument. Multiple symbols separated by a comma may be used.
string
A sequence of characters. (example: GOOG)
root
always returned
The Future's root.
string
A sequence of characters. (example: GOOG)
exchange
always returned
The code for the exchange a group of financial instruments are listed on.
string
A sequence of characters. (example: GOOG)
futuresCategory
always returned
Futures categories include: Energies, Financials, Grains, Indices, Meats, Metals, Softs and Currencies.
string
A sequence of characters. (example: GOOG)
contractName
always returned
The name of the futures contract.
string
A sequence of characters. (example: GOOG)
tradingHours
always returned
The futures contract's trading hours.
string
A sequence of characters. (example: GOOG)
ContractSize
always returned
The futures contract's size.
string
A sequence of characters. (example: GOOG)
monthsTraded
always returned
The contract months listed for trading.
string
A sequence of characters. (example: GOOG)
tickValue
always returned
The size and value of the minimum tick size.
string
A sequence of characters. (example: GOOG)
pointValue
always returned
The value of one full point.
string
A sequence of characters. (example: GOOG)
exchangeMargin
always returned
The margin maintenance required for the future.
string
A sequence of characters. (example: GOOG)
exchangeSymbol
always returned
The actual exchange symbol for the corresponding future.
string
A sequence of characters. (example: GOOG)

Status Code Responses

200
OK
Success
400
Bad Request
The request was invalid, please see the message for more information.
500
Internal Server Error
Something is not working correctly, please contact support.


JSON

GET

GET https://ondemand.websol.barchart.com/getFuturesSpecifications.json?apikey=<YOUR API KEY>&symbols=GC%2CCL&exchanges=COMEX%2CNYMEX&futuresCategory=energies%2Cmetals
Host: ondemand.websol.barchart.com

POST

POST https://ondemand.websol.barchart.com/getFuturesSpecifications.json
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length

apikey=<YOUR API KEY>&symbols=GC%2CCL&exchanges=COMEX%2CNYMEX&futuresCategory=energies%2Cmetals

Response

{
    "status": {
        "code": 200,
        "message": "Success."
    },
    "results": [
        {
            "symbol": "GCZ17",
            "root": "GC",
            "exchange": "COMEX",
            "futuresCategory": "Metals",
            "contractName": "Gold 100-oz (GC)",
            "tradingHours": "5:00p.m. - 4:00p.m. (Sun-Fri) (RTH 7:20a.m. - 12:30p.m.) CST",
            "ContractSize": "100 fine troy ounces",
            "monthsTraded": "February, April, June, August, October, December (G, J, M, Q, V, Z)",
            "tickValue": "0.10 (10 cents) per troy ounce ($10.00 per contract)",
            "pointValue": "$100",
            "exchangeMargin": "$5,390\/4,900",
            "exchangeSymbol": "GC"
        },
        {
            "symbol": "CLF18",
            "root": "CL",
            "exchange": "NYMEX",
            "futuresCategory": "Energies",
            "contractName": "Crude Oil West Texas Intermediate (CL)",
            "tradingHours": "5:00p.m. - 4:00p.m. (Sun-Fri) (RTH 8:00a.m. - 1:30p.m.) CST",
            "ContractSize": "1,000 U.S. barrels (42,000 gallons)",
            "monthsTraded": "January, February, March, April, May, June, July, August, September, October, November, December (F, G, H, J, K, M, N, Q, U, V, X, Z)",
            "tickValue": "1 cent per barrel ($10.00 per contract)",
            "pointValue": "$1,000",
            "exchangeMargin": "$2,447.50\/2,225",
            "exchangeSymbol": "CL"
        }
    ]
}

XML

GET

GET https://ondemand.websol.barchart.com/getFuturesSpecifications.xml?apikey=<YOUR API KEY>&symbols=GC%2CCL&exchanges=COMEX%2CNYMEX&futuresCategory=energies%2Cmetals
Host: ondemand.websol.barchart.com

POST

POST https://ondemand.websol.barchart.com/getFuturesSpecifications.xml
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length

apikey=<YOUR API KEY>&symbols=GC%2CCL&exchanges=COMEX%2CNYMEX&futuresCategory=energies%2Cmetals

Response


<?xml version="1.0" encoding="utf-8"?>
 <getFuturesSpecifications>
  <status>
   <code>200</code>
   <message>Success.</message>
  </status>
  <item>
   <symbol>GCZ17</symbol>
   <root>GC</root>
   <exchange>COMEX</exchange>
   <futuresCategory>Metals</futuresCategory>
   <contractName>Gold 100-oz (GC)</contractName>
   <tradingHours>5:00p.m. - 4:00p.m. (Sun-Fri) (RTH 7:20a.m. - 12:30p.m.) CST</tradingHours>
   <ContractSize>100 fine troy ounces</ContractSize>
   <monthsTraded>February, April, June, August, October, December (G, J, M, Q, V, Z)</monthsTraded>
   <tickValue>0.10 (10 cents) per troy ounce ($10.00 per contract)</tickValue>
   <pointValue>$100</pointValue>
   <exchangeMargin>$5,390/4,900</exchangeMargin>
   <exchangeSymbol>GC</exchangeSymbol>
  </item>
  <item>
   <symbol>CLF18</symbol>
   <root>CL</root>
   <exchange>NYMEX</exchange>
   <futuresCategory>Energies</futuresCategory>
   <contractName>Crude Oil West Texas Intermediate (CL)</contractName>
   <tradingHours>5:00p.m. - 4:00p.m. (Sun-Fri) (RTH 8:00a.m. - 1:30p.m.) CST</tradingHours>
   <ContractSize>1,000 U.S. barrels (42,000 gallons)</ContractSize>
   <monthsTraded>January, February, March, April, May, June, July, August, September, October, November, December (F, G, H, J, K, M, N, Q, U, V, X, Z)</monthsTraded>
   <tickValue>1 cent per barrel ($10.00 per contract)</tickValue>
   <pointValue>$1,000</pointValue>
   <exchangeMargin>$2,447.50/2,225</exchangeMargin>
   <exchangeSymbol>CL</exchangeSymbol>
  </item>
 </getFuturesSpecifications>

CSV

GET

GET https://ondemand.websol.barchart.com/getFuturesSpecifications.csv?apikey=<YOUR API KEY>&symbols=GC%2CCL&exchanges=COMEX%2CNYMEX&futuresCategory=energies%2Cmetals
Host: ondemand.websol.barchart.com

POST

POST https://ondemand.websol.barchart.com/getFuturesSpecifications.csv
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length

apikey=<YOUR API KEY>&symbols=GC%2CCL&exchanges=COMEX%2CNYMEX&futuresCategory=energies%2Cmetals

Response

symbol,root,exchange,futuresCategory,contractName,tradingHours,ContractSize,monthsTraded,tickValue,pointValue,exchangeMargin,exchangeSymbol
"GCZ17","GC","COMEX","Metals","Gold 100-oz (GC)","5:00p.m. - 4:00p.m. (Sun-Fri) (RTH 7:20a.m. - 12:30p.m.) CST","100 fine troy ounces","February, April, June, August, October, December (G, J, M, Q, V, Z)","0.10 (10 cents) per troy ounce ($10.00 per contract)","$100","$5,390/4,900","GC"
"CLF18","CL","NYMEX","Energies","Crude Oil West Texas Intermediate (CL)","5:00p.m. - 4:00p.m. (Sun-Fri) (RTH 8:00a.m. - 1:30p.m.) CST","1,000 U.S. barrels (42,000 gallons)","January, February, March, April, May, June, July, August, September, October, November, December (F, G, H, J, K, M, N, Q, U, V, X, Z)","1 cent per barrel ($10.00 per contract)","$1,000","$2,447.50/2,225","CL"


PHP

<?php

$ondemand = new SoapClient('https://ondemand.websol.barchart.com/service?wsdl');

$params = [
    'symbols' => 'GC,CL',
    'exchanges' => 'COMEX,NYMEX',
    'futuresCategory' => 'energies,metals',
];

$result = $ondemand->getFuturesSpecifications($params);
var_dump($result);

Classic ASP

Dim ondemand
Dim result

Set ondemand = Server.CreateObject("MSSOAP.SoapClient30")
ondemand.ClientProperty("ServerHTTPRequest") = True
ondemand.MSSoapInit("https://ondemand.websol.barchart.com/service?wsdl")

Set result = ondemand.getFuturesSpecifications("GC,CL", "COMEX,NYMEX", "energies,metals")

Perl

use SOAP::Lite;
use SOAP::WSDL;

my $ondemand = SOAP::Lite
    -> service('https://ondemand.websol.barchart.com/service?wsdl');

my $result = $ondemand->getFuturesSpecifications('GC,CL', 'COMEX,NYMEX', 'energies,metals');

print $result;

Python

from suds.client import Client
ondemand = Client('https://ondemand.websol.barchart.com/service?wsdl')

result = client.service.getFuturesSpecifications('GC,CL', 'COMEX,NYMEX', 'energies,metals')

print result

Ruby

require 'savon'

ondemand = Savon.client(wsdl: 'https://ondemand.websol.barchart.com/service?wsdl')

response = ondemand.call(
    :getFuturesSpecifications,
    message: {
        symbols: 'GC,CL',
        exchanges: 'COMEX,NYMEX',
        futuresCategory: 'energies,metals',
    }
)

response.body