Futures Spreads API
getFuturesSpreads
The getFuturesSpreads API returns all active futures spread for the requested commodity.
View All APIsContact Us to Get Access
Inputs
rootrequired
A sequence of characters based on the future contract root symbol.
Type
string (A sequence of characters. (example: GOOG))
Example
ZC
fieldsoptional
A comma separated list of the optional output fields that should be included in the query response.
Type
list (A comma or semi-colon delimited string.)
Example
open,high,ask,askSize
Outputs
symbol
always returned
always returned
A symbol or code that identifies a financial instrument.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
symbolName
always returned
always returned
The name of the instrument.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
type
always returned
always returned
The type of spread in which the data is returned. For a list of valid values and their meaning please click here.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
leg1
always returned
always returned
The first leg of the futures spread.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
leg2
always returned
always returned
The second leg of the futures spread.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
leg3
always returned
always returned
The third leg of the futures spread.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
leg4
always returned
always returned
The fourth leg of the futures spread.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
lastPrice
always returned
always returned
The last price at which the spread traded.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
change
always returned
always returned
The net difference between the last traded price and previous close.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
volume
always returned
always returned
The quantity of shares or contracts traded.
int
A numeric type defining a whole number. (example: 2)
A numeric type defining a whole number. (example: 2)
tradeTime
always returned
always returned
The exchagne timestamp for the last traded price.
dateTime
A date and time in the format of YYYY-MM-DD HH:MI:SS<TIMEZONE_OFFSET>.
A date and time in the format of YYYY-MM-DD HH:MI:SS<TIMEZONE_OFFSET>.
serverTimestamp
always returned
always returned
The time the message was generated on the server.
dateTime
A date and time in the format of YYYY-MM-DD HH:MI:SS<TIMEZONE_OFFSET>.
A date and time in the format of YYYY-MM-DD HH:MI:SS<TIMEZONE_OFFSET>.
bid
as requested
as requested
The current bid price.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
bidSize
as requested
as requested
The size (quantity) of the current bid price.
int
A numeric type defining a whole number. (example: 2)
A numeric type defining a whole number. (example: 2)
ask
as requested
as requested
The current ask price.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
askSize
as requested
as requested
The size (quantity) of the current ask price.
int
A numeric type defining a whole number. (example: 2)
A numeric type defining a whole number. (example: 2)
open
always returned
always returned
The opening (first) price for the session.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
high
always returned
always returned
The highest traded price for the session.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
low
always returned
always returned
The lowest traded price for the session.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
previousClose
always returned
always returned
The settlement price for the previous day.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
flag
always returned
always returned
Determines the market state. If no flag, then the instrument is active and trades have been made. If present, can be one of the following:
"c" meaning that the market is closed for this instrument. "p" meaning that the market is in a pre-open state. This occurs when there are bids and offers being placed, but no trade has occurred yet. This is normally seen shortly before the offical opening time for busy markets, but can also be seen throughout the day for lightly traded markets. "s" meaning that the instrument has settled, and that this is the final, settlement price.
"c" meaning that the market is closed for this instrument. "p" meaning that the market is in a pre-open state. This occurs when there are bids and offers being placed, but no trade has occurred yet. This is normally seen shortly before the offical opening time for busy markets, but can also be seen throughout the day for lightly traded markets. "s" meaning that the instrument has settled, and that this is the final, settlement price.
string
A sequence of characters. (example: GOOG)
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/getFuturesSpreads.json?apikey=YOUR_API_KEY&root=ZC&fields=open%2Chigh%2Cask%2CaskSize
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getFuturesSpreads.json
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&root=ZC&fields=open%2Chigh%2Cask%2CaskSize
Response
{
"status": {
"code": 200,
"message": "Success."
},
"results": [
{
"symbol": "_S_SP_ZCZ4_ZCH5",
"symbolName": "Corn Futures Standard Spread",
"type": "SP",
"leg1": "ZCZ4",
"leg2": "ZCH5",
"leg3": null,
"leg4": null,
"lastPrice": -10.25,
"change": -0.5,
"volume": 11216,
"tradeTime": "2024-11-21T02:57:28-06:00",
"serverTimestamp": "2024-11-21T03:07:28-06:00",
"ask": -10,
"askSize": 166200,
"open": -9.75,
"high": -9.5,
"low": -10.25,
"previousClose": -9.75,
"flag": ""
},
{
"symbol": "_S_BF_ZCZ4_ZCH5_ZCK5",
"symbolName": "Corn Futures Butterfly Spread",
"type": "BF",
"leg1": "ZCZ4",
"leg2": "ZCH5",
"leg3": "ZCK5",
"leg4": null,
"lastPrice": -3.25,
"change": -0.5,
"volume": 61,
"tradeTime": "2024-11-21T01:54:28-06:00",
"serverTimestamp": "2024-11-21T03:07:28-06:00",
"ask": -3,
"askSize": 34600,
"open": -2.75,
"high": -2.75,
"low": -3.25,
"previousClose": -2.75,
"flag": ""
},
{
"symbol": "_S_CF_ZCZ4_ZCH5_ZCK5_ZCN5",
"symbolName": "Corn Futures Condor Spread",
"type": "CF",
"leg1": "ZCZ4",
"leg2": "ZCH5",
"leg3": "ZCK5",
"leg4": "ZCN5",
"lastPrice": -6.75,
"change": 0.5,
"volume": 0,
"tradeTime": "2024-11-20T16:38:16-06:00",
"serverTimestamp": "2024-11-20T19:10:00-06:00",
"ask": 0,
"askSize": 0,
"open": 0,
"high": -6.75,
"low": -6.75,
"previousClose": -7.25,
"flag": "s"
},
{
"symbol": "_S_BF_ZCZ4_ZCH5_ZCN5",
"symbolName": "Corn Futures Butterfly Spread",
"type": "BF",
"leg1": "ZCZ4",
"leg2": "ZCH5",
"leg3": "ZCN5",
"leg4": null,
"lastPrice": 0.25,
"change": 0,
"volume": 1,
"tradeTime": "2024-11-20T16:37:01-06:00",
"serverTimestamp": "2024-11-21T03:07:12-06:00",
"ask": 0.25,
"askSize": 33300,
"open": 0,
"high": 0.25,
"low": 0.25,
"previousClose": 0.25,
"flag": "p"
},
{
"symbol": "_S_SP_ZCZ4_ZCK5",
"symbolName": "Corn Futures Standard Spread",
"type": "SP",
"leg1": "ZCZ4",
"leg2": "ZCK5",
"leg3": null,
"leg4": null,
"lastPrice": -17,
"change": -0.25,
"volume": 784,
"tradeTime": "2024-11-21T02:38:54-06:00",
"serverTimestamp": "2024-11-21T03:07:24-06:00",
"ask": -17,
"askSize": 17000,
"open": -16.75,
"high": -16.5,
"low": -17.25,
"previousClose": -16.75,
"flag": ""
},
{
"symbol": "_S_SP_ZCZ4_ZCN5",
"symbolName": "Corn Futures Standard Spread",
"type": "SP",
"leg1": "ZCZ4",
"leg2": "ZCN5",
"leg3": null,
"leg4": null,
"lastPrice": -20.25,
"change": -0.5,
"volume": 369,
"tradeTime": "2024-11-21T02:56:32-06:00",
"serverTimestamp": "2024-11-21T03:07:24-06:00",
"ask": -20,
"askSize": 8400,
"open": -19.75,
"high": -19.75,
"low": -20.25,
"previousClose": -19.75,
"flag": ""
},
{
"symbol": "_S_SP_ZCZ4_ZCU5",
"symbolName": "Corn Futures Standard Spread",
"type": "SP",
"leg1": "ZCZ4",
"leg2": "ZCU5",
"leg3": null,
"leg4": null,
"lastPrice": -6,
"change": 0.5,
"volume": 32,
"tradeTime": "2024-11-21T02:56:32-06:00",
"serverTimestamp": "2024-11-21T03:07:24-06:00",
"ask": -5.75,
"askSize": 2000,
"open": -6.75,
"high": -6,
"low": -7.25,
"previousClose": -6.5,
"flag": ""
},
{
"symbol": "_S_SP_ZCZ4_ZCZ5",
"symbolName": "Corn Futures Standard Spread",
"type": "SP",
"leg1": "ZCZ4",
"leg2": "ZCZ5",
"leg3": null,
"leg4": null,
"lastPrice": -10.25,
"change": 0.5,
"volume": 114,
"tradeTime": "2024-11-21T02:52:49-06:00",
"serverTimestamp": "2024-11-21T03:07:24-06:00",
"ask": -10,
"askSize": 8300,
"open": -10.75,
"high": -10.25,
"low": -11,
"previousClose": -10.75,
"flag": ""
},
{
"symbol": "_S_SP_ZCZ4_ZCH6",
"symbolName": "Corn Futures Standard Spread",
"type": "SP",
"leg1": "ZCZ4",
"leg2": "ZCH6",
"leg3": null,
"leg4": null,
"lastPrice": -21.75,
"change": 1.5,
"volume": 2,
"tradeTime": "2024-11-20T13:06:23-06:00",
"serverTimestamp": "2024-11-21T03:07:17-06:00",
"ask": -20.75,
"askSize": 300,
"open": -22,
"high": -21.75,
"low": -22,
"previousClose": -23.25,
"flag": "p"
},
{
"symbol": "_S_SP_ZCZ4_ZCK6",
"symbolName": "Corn Futures Standard Spread",
"type": "SP",
"leg1": "ZCZ4",
"leg2": "ZCK6",
"leg3": null,
"leg4": null,
"lastPrice": -27.75,
"change": 1.75,
"volume": 0,
"tradeTime": "2024-11-20T16:37:31-06:00",
"serverTimestamp": "2024-11-21T03:07:17-06:00",
"ask": -27.25,
"askSize": 100,
"open": 0,
"high": -27.75,
"low": -27.75,
"previousClose": -29.5,
"flag": "p"
},
{
"symbol": "_S_SP_ZCZ4_ZCN6",
"symbolName": "Corn Futures Standard Spread",
"type": "SP",
"leg1": "ZCZ4",
"leg2": "ZCN6",
"leg3": null,
"leg4": null,
"lastPrice": -31.25,
"change": 1.75,
"volume": 0,
"tradeTime": "2024-11-20T16:37:53-06:00",
"serverTimestamp": "2024-11-21T03:07:17-06:00",
"ask": -30.5,
"askSize": 200,
"open": 0,
"high": -31.25,
"low": -31.25,
"previousClose": -33,
"flag": "p"
},
{
"symbol": "_S_SP_ZCZ4_ZCU6",
"symbolName": "Corn Futures Standard Spread",
"type": "SP",
"leg1": "ZCZ4",
"leg2": "ZCU6",
"leg3": null,
"leg4": null,
"lastPrice": -18.5,
"change": 1.5,
"volume": 0,
"tradeTime": "2024-11-20T16:37:29-06:00",
"serverTimestamp": "2024-11-21T03:07:17-06:00",
"ask": -16.75,
"askSize": 100,
"open": 0,
"high": -18.5,
"low": -18.5,
"previousClose": -20,
"flag": "p"
},
{
"symbol": "_S_SP_ZCZ4_ZCZ6",
"symbolName": "Corn Futures Standard Spread",
"type": "SP",
"leg1": "ZCZ4",
"leg2": "ZCZ6",
"leg3": null,
"leg4": null,
"lastPrice": -19,
"change": 1.25,
"volume": 0,
"tradeTime": "2024-11-20T16:37:30-06:00",
"serverTimestamp": "2024-11-21T03:07:17-06:00",
"ask": -17.25,
"askSize": 200,
"open": 0,
"high": -19,
"low": -19,
"previousClose": -20.25,
"flag": "p"
},
{
"symbol": "_S_SP_ZCZ4_ZCN7",
"symbolName": "Corn Futures Standard Spread",
"type": "SP",
"leg1": "ZCZ4",
"leg2": "ZCN7",
"leg3": null,
"leg4": null,
"lastPrice": -34,
"change": 1.25,
"volume": 0,
"tradeTime": "2024-11-20T16:37:29-06:00",
"serverTimestamp": "2024-11-21T03:06:39-06:00",
"ask": 0,
"askSize": 0,
"open": 0,
"high": -34,
"low": -34,
"previousClose": -35.25,
"flag": "p"
},
{
"symbol": "_S_SP_ZCZ4_ZCZ7",
"symbolName": "Corn Futures Standard Spread",
"type": "SP",
"leg1": "ZCZ4",
"leg2": "ZCZ7",
"leg3": null,
"leg4": null,
"lastPrice": -18.25,
"change": 1,
"volume": 0,
"tradeTime": "2024-11-20T16:37:31-06:00",
"serverTimestamp": "2024-11-21T03:07:17-06:00",
"ask": -13,
"askSize": 100,
"open": 0,
"high": -18.25,
"low": -18.25,
"previousClose": -19.25,
"flag": "p"
},
{
"symbol": "_S_SP_ZCH5_ZCK5",
"symbolName": "Corn Futures Standard Spread",
"type": "SP",
"leg1": "ZCH5",
"leg2": "ZCK5",
"leg3": null,
"leg4": null,
"lastPrice": -7,
"change": 0,
"volume": 1368,
"tradeTime": "2024-11-21T02:53:08-06:00",
"serverTimestamp": "2024-11-21T03:07:24-06:00",
"ask": -6.75,
"askSize": 307100,
"open": -7,
"high": -6.75,
"low": -7,
"previousClose": -7,
"flag": ""
},
{
"symbol": "_S_BF_ZCH5_ZCK5_ZCN5",
"symbolName": "Corn Futures Butterfly Spread",
"type": "BF",
"leg1": "ZCH5",
"leg2": "ZCK5",
"leg3": "ZCN5",
"leg4": null,
"lastPrice": -3.75,
"change": 0.25,
"volume": 14,
"tradeTime": "2024-11-20T19:00:37-06:00",
"serverTimestamp": "2024-11-21T03:07:24-06:00",
"ask": -3.75,
"askSize": 29100,
"open": -3.75,
"high": -3.75,
"low": -3.75,
"previousClose": -4,
"flag": ""
},
{
"symbol": "_S_CF_ZCH5_ZCK5_ZCN5_ZCU5",
"symbolName": "Corn Futures Condor Spread",
"type": "CF",
"leg1": "ZCH5",
"leg2": "ZCK5",
"leg3": "ZCN5",
"leg4": "ZCU5",
"lastPrice": -20.25,
"change": 0.5,
"volume": 0,
"tradeTime": "2024-11-20T16:38:11-06:00",
"serverTimestamp": "2024-11-20T19:10:00-06:00",
"ask": 0,
"askSize": 0,
"open": 0,
"high": -20.25,
"low": -20.25,
"previousClose": -20.75,
"flag": "s"
},
{
"symbol": "_S_SP_ZCH5_ZCN5",
"symbolName": "Corn Futures Standard Spread",
"type": "SP",
"leg1": "ZCH5",
"leg2": "ZCN5",
"leg3": null,
"leg4": null,
"lastPrice": -10,
"change": 0,
"volume": 215,
"tradeTime": "2024-11-21T02:53:00-06:00",
"serverTimestamp": "2024-11-21T03:07:14-06:00",
"ask": -10,
"askSize": 1600,
"open": -10.25,
"high": -10,
"low": -10.25,
"previousClose": -10,
"flag": ""
},
{
"symbol": "_S_SP_ZCH5_ZCU5",
"symbolName": "Corn Futures Standard Spread",
"type": "SP",
"leg1": "ZCH5",
"leg2": "ZCU5",
"leg3": null,
"leg4": null,
"lastPrice": 4.25,
"change": 1,
"volume": 28,
"tradeTime": "2024-11-21T02:55:02-06:00",
"serverTimestamp": "2024-11-21T03:07:24-06:00",
"ask": 4.5,
"askSize": 4300,
"open": 3,
"high": 4.25,
"low": 3,
"previousClose": 3.25,
"flag": ""
}
]
}
XML
GET
GET https://ondemand.websol.barchart.com/getFuturesSpreads.xml?apikey=YOUR_API_KEY&root=ZC&fields=open%2Chigh%2Cask%2CaskSize
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getFuturesSpreads.xml
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&root=ZC&fields=open%2Chigh%2Cask%2CaskSize
Response
<?xml version="1.0" encoding="utf-8"?>
<getFuturesSpreads>
<status>
<code>200</code>
<message>Success.</message>
</status>
<item>
<symbol>_S_SP_ZCZ4_ZCH5</symbol>
<symbolName>Corn Futures Standard Spread</symbolName>
<type>SP</type>
<leg1>ZCZ4</leg1>
<leg2>ZCH5</leg2>
<leg3/>
<leg4/>
<lastPrice>-10.25</lastPrice>
<change>-0.5</change>
<volume>11216</volume>
<tradeTime>2024-11-21T02:57:28-06:00</tradeTime>
<serverTimestamp>2024-11-21T03:07:28-06:00</serverTimestamp>
<ask>-10</ask>
<askSize>166200</askSize>
<open>-9.75</open>
<high>-9.5</high>
<low>-10.25</low>
<previousClose>-9.75</previousClose>
<flag/>
</item>
<item>
<symbol>_S_BF_ZCZ4_ZCH5_ZCK5</symbol>
<symbolName>Corn Futures Butterfly Spread</symbolName>
<type>BF</type>
<leg1>ZCZ4</leg1>
<leg2>ZCH5</leg2>
<leg3>ZCK5</leg3>
<leg4/>
<lastPrice>-3.25</lastPrice>
<change>-0.5</change>
<volume>61</volume>
<tradeTime>2024-11-21T01:54:28-06:00</tradeTime>
<serverTimestamp>2024-11-21T03:07:28-06:00</serverTimestamp>
<ask>-3</ask>
<askSize>34600</askSize>
<open>-2.75</open>
<high>-2.75</high>
<low>-3.25</low>
<previousClose>-2.75</previousClose>
<flag/>
</item>
<item>
<symbol>_S_CF_ZCZ4_ZCH5_ZCK5_ZCN5</symbol>
<symbolName>Corn Futures Condor Spread</symbolName>
<type>CF</type>
<leg1>ZCZ4</leg1>
<leg2>ZCH5</leg2>
<leg3>ZCK5</leg3>
<leg4>ZCN5</leg4>
<lastPrice>-6.75</lastPrice>
<change>0.5</change>
<volume>0</volume>
<tradeTime>2024-11-20T16:38:16-06:00</tradeTime>
<serverTimestamp>2024-11-20T19:10:00-06:00</serverTimestamp>
<ask>0</ask>
<askSize>0</askSize>
<open>0</open>
<high>-6.75</high>
<low>-6.75</low>
<previousClose>-7.25</previousClose>
<flag>s</flag>
</item>
<item>
<symbol>_S_BF_ZCZ4_ZCH5_ZCN5</symbol>
<symbolName>Corn Futures Butterfly Spread</symbolName>
<type>BF</type>
<leg1>ZCZ4</leg1>
<leg2>ZCH5</leg2>
<leg3>ZCN5</leg3>
<leg4/>
<lastPrice>0.25</lastPrice>
<change>0</change>
<volume>1</volume>
<tradeTime>2024-11-20T16:37:01-06:00</tradeTime>
<serverTimestamp>2024-11-21T03:07:12-06:00</serverTimestamp>
<ask>0.25</ask>
<askSize>33300</askSize>
<open>0</open>
<high>0.25</high>
<low>0.25</low>
<previousClose>0.25</previousClose>
<flag>p</flag>
</item>
<item>
<symbol>_S_SP_ZCZ4_ZCK5</symbol>
<symbolName>Corn Futures Standard Spread</symbolName>
<type>SP</type>
<leg1>ZCZ4</leg1>
<leg2>ZCK5</leg2>
<leg3/>
<leg4/>
<lastPrice>-17</lastPrice>
<change>-0.25</change>
<volume>784</volume>
<tradeTime>2024-11-21T02:38:54-06:00</tradeTime>
<serverTimestamp>2024-11-21T03:07:24-06:00</serverTimestamp>
<ask>-17</ask>
<askSize>17000</askSize>
<open>-16.75</open>
<high>-16.5</high>
<low>-17.25</low>
<previousClose>-16.75</previousClose>
<flag/>
</item>
<item>
<symbol>_S_SP_ZCZ4_ZCN5</symbol>
<symbolName>Corn Futures Standard Spread</symbolName>
<type>SP</type>
<leg1>ZCZ4</leg1>
<leg2>ZCN5</leg2>
<leg3/>
<leg4/>
<lastPrice>-20.25</lastPrice>
<change>-0.5</change>
<volume>369</volume>
<tradeTime>2024-11-21T02:56:32-06:00</tradeTime>
<serverTimestamp>2024-11-21T03:07:24-06:00</serverTimestamp>
<ask>-20</ask>
<askSize>8400</askSize>
<open>-19.75</open>
<high>-19.75</high>
<low>-20.25</low>
<previousClose>-19.75</previousClose>
<flag/>
</item>
<item>
<symbol>_S_SP_ZCZ4_ZCU5</symbol>
<symbolName>Corn Futures Standard Spread</symbolName>
<type>SP</type>
<leg1>ZCZ4</leg1>
<leg2>ZCU5</leg2>
<leg3/>
<leg4/>
<lastPrice>-6</lastPrice>
<change>0.5</change>
<volume>32</volume>
<tradeTime>2024-11-21T02:56:32-06:00</tradeTime>
<serverTimestamp>2024-11-21T03:07:24-06:00</serverTimestamp>
<ask>-5.75</ask>
<askSize>2000</askSize>
<open>-6.75</open>
<high>-6</high>
<low>-7.25</low>
<previousClose>-6.5</previousClose>
<flag/>
</item>
<item>
<symbol>_S_SP_ZCZ4_ZCZ5</symbol>
<symbolName>Corn Futures Standard Spread</symbolName>
<type>SP</type>
<leg1>ZCZ4</leg1>
<leg2>ZCZ5</leg2>
<leg3/>
<leg4/>
<lastPrice>-10.25</lastPrice>
<change>0.5</change>
<volume>114</volume>
<tradeTime>2024-11-21T02:52:49-06:00</tradeTime>
<serverTimestamp>2024-11-21T03:07:24-06:00</serverTimestamp>
<ask>-10</ask>
<askSize>8300</askSize>
<open>-10.75</open>
<high>-10.25</high>
<low>-11</low>
<previousClose>-10.75</previousClose>
<flag/>
</item>
<item>
<symbol>_S_SP_ZCZ4_ZCH6</symbol>
<symbolName>Corn Futures Standard Spread</symbolName>
<type>SP</type>
<leg1>ZCZ4</leg1>
<leg2>ZCH6</leg2>
<leg3/>
<leg4/>
<lastPrice>-21.75</lastPrice>
<change>1.5</change>
<volume>2</volume>
<tradeTime>2024-11-20T13:06:23-06:00</tradeTime>
<serverTimestamp>2024-11-21T03:07:17-06:00</serverTimestamp>
<ask>-20.75</ask>
<askSize>300</askSize>
<open>-22</open>
<high>-21.75</high>
<low>-22</low>
<previousClose>-23.25</previousClose>
<flag>p</flag>
</item>
<item>
<symbol>_S_SP_ZCZ4_ZCK6</symbol>
<symbolName>Corn Futures Standard Spread</symbolName>
<type>SP</type>
<leg1>ZCZ4</leg1>
<leg2>ZCK6</leg2>
<leg3/>
<leg4/>
<lastPrice>-27.75</lastPrice>
<change>1.75</change>
<volume>0</volume>
<tradeTime>2024-11-20T16:37:31-06:00</tradeTime>
<serverTimestamp>2024-11-21T03:07:17-06:00</serverTimestamp>
<ask>-27.25</ask>
<askSize>100</askSize>
<open>0</open>
<high>-27.75</high>
<low>-27.75</low>
<previousClose>-29.5</previousClose>
<flag>p</flag>
</item>
<item>
<symbol>_S_SP_ZCZ4_ZCN6</symbol>
<symbolName>Corn Futures Standard Spread</symbolName>
<type>SP</type>
<leg1>ZCZ4</leg1>
<leg2>ZCN6</leg2>
<leg3/>
<leg4/>
<lastPrice>-31.25</lastPrice>
<change>1.75</change>
<volume>0</volume>
<tradeTime>2024-11-20T16:37:53-06:00</tradeTime>
<serverTimestamp>2024-11-21T03:07:17-06:00</serverTimestamp>
<ask>-30.5</ask>
<askSize>200</askSize>
<open>0</open>
<high>-31.25</high>
<low>-31.25</low>
<previousClose>-33</previousClose>
<flag>p</flag>
</item>
<item>
<symbol>_S_SP_ZCZ4_ZCU6</symbol>
<symbolName>Corn Futures Standard Spread</symbolName>
<type>SP</type>
<leg1>ZCZ4</leg1>
<leg2>ZCU6</leg2>
<leg3/>
<leg4/>
<lastPrice>-18.5</lastPrice>
<change>1.5</change>
<volume>0</volume>
<tradeTime>2024-11-20T16:37:29-06:00</tradeTime>
<serverTimestamp>2024-11-21T03:07:17-06:00</serverTimestamp>
<ask>-16.75</ask>
<askSize>100</askSize>
<open>0</open>
<high>-18.5</high>
<low>-18.5</low>
<previousClose>-20</previousClose>
<flag>p</flag>
</item>
<item>
<symbol>_S_SP_ZCZ4_ZCZ6</symbol>
<symbolName>Corn Futures Standard Spread</symbolName>
<type>SP</type>
<leg1>ZCZ4</leg1>
<leg2>ZCZ6</leg2>
<leg3/>
<leg4/>
<lastPrice>-19</lastPrice>
<change>1.25</change>
<volume>0</volume>
<tradeTime>2024-11-20T16:37:30-06:00</tradeTime>
<serverTimestamp>2024-11-21T03:07:17-06:00</serverTimestamp>
<ask>-17.25</ask>
<askSize>200</askSize>
<open>0</open>
<high>-19</high>
<low>-19</low>
<previousClose>-20.25</previousClose>
<flag>p</flag>
</item>
<item>
<symbol>_S_SP_ZCZ4_ZCN7</symbol>
<symbolName>Corn Futures Standard Spread</symbolName>
<type>SP</type>
<leg1>ZCZ4</leg1>
<leg2>ZCN7</leg2>
<leg3/>
<leg4/>
<lastPrice>-34</lastPrice>
<change>1.25</change>
<volume>0</volume>
<tradeTime>2024-11-20T16:37:29-06:00</tradeTime>
<serverTimestamp>2024-11-21T03:06:39-06:00</serverTimestamp>
<ask>0</ask>
<askSize>0</askSize>
<open>0</open>
<high>-34</high>
<low>-34</low>
<previousClose>-35.25</previousClose>
<flag>p</flag>
</item>
<item>
<symbol>_S_SP_ZCZ4_ZCZ7</symbol>
<symbolName>Corn Futures Standard Spread</symbolName>
<type>SP</type>
<leg1>ZCZ4</leg1>
<leg2>ZCZ7</leg2>
<leg3/>
<leg4/>
<lastPrice>-18.25</lastPrice>
<change>1</change>
<volume>0</volume>
<tradeTime>2024-11-20T16:37:31-06:00</tradeTime>
<serverTimestamp>2024-11-21T03:07:17-06:00</serverTimestamp>
<ask>-13</ask>
<askSize>100</askSize>
<open>0</open>
<high>-18.25</high>
<low>-18.25</low>
<previousClose>-19.25</previousClose>
<flag>p</flag>
</item>
<item>
<symbol>_S_SP_ZCH5_ZCK5</symbol>
<symbolName>Corn Futures Standard Spread</symbolName>
<type>SP</type>
<leg1>ZCH5</leg1>
<leg2>ZCK5</leg2>
<leg3/>
<leg4/>
<lastPrice>-7</lastPrice>
<change>0</change>
<volume>1368</volume>
<tradeTime>2024-11-21T02:53:08-06:00</tradeTime>
<serverTimestamp>2024-11-21T03:07:24-06:00</serverTimestamp>
<ask>-6.75</ask>
<askSize>307100</askSize>
<open>-7</open>
<high>-6.75</high>
<low>-7</low>
<previousClose>-7</previousClose>
<flag/>
</item>
<item>
<symbol>_S_BF_ZCH5_ZCK5_ZCN5</symbol>
<symbolName>Corn Futures Butterfly Spread</symbolName>
<type>BF</type>
<leg1>ZCH5</leg1>
<leg2>ZCK5</leg2>
<leg3>ZCN5</leg3>
<leg4/>
<lastPrice>-3.75</lastPrice>
<change>0.25</change>
<volume>14</volume>
<tradeTime>2024-11-20T19:00:37-06:00</tradeTime>
<serverTimestamp>2024-11-21T03:07:24-06:00</serverTimestamp>
<ask>-3.75</ask>
<askSize>29100</askSize>
<open>-3.75</open>
<high>-3.75</high>
<low>-3.75</low>
<previousClose>-4</previousClose>
<flag/>
</item>
<item>
<symbol>_S_CF_ZCH5_ZCK5_ZCN5_ZCU5</symbol>
<symbolName>Corn Futures Condor Spread</symbolName>
<type>CF</type>
<leg1>ZCH5</leg1>
<leg2>ZCK5</leg2>
<leg3>ZCN5</leg3>
<leg4>ZCU5</leg4>
<lastPrice>-20.25</lastPrice>
<change>0.5</change>
<volume>0</volume>
<tradeTime>2024-11-20T16:38:11-06:00</tradeTime>
<serverTimestamp>2024-11-20T19:10:00-06:00</serverTimestamp>
<ask>0</ask>
<askSize>0</askSize>
<open>0</open>
<high>-20.25</high>
<low>-20.25</low>
<previousClose>-20.75</previousClose>
<flag>s</flag>
</item>
<item>
<symbol>_S_SP_ZCH5_ZCN5</symbol>
<symbolName>Corn Futures Standard Spread</symbolName>
<type>SP</type>
<leg1>ZCH5</leg1>
<leg2>ZCN5</leg2>
<leg3/>
<leg4/>
<lastPrice>-10</lastPrice>
<change>0</change>
<volume>215</volume>
<tradeTime>2024-11-21T02:53:00-06:00</tradeTime>
<serverTimestamp>2024-11-21T03:07:14-06:00</serverTimestamp>
<ask>-10</ask>
<askSize>1600</askSize>
<open>-10.25</open>
<high>-10</high>
<low>-10.25</low>
<previousClose>-10</previousClose>
<flag/>
</item>
<item>
<symbol>_S_SP_ZCH5_ZCU5</symbol>
<symbolName>Corn Futures Standard Spread</symbolName>
<type>SP</type>
<leg1>ZCH5</leg1>
<leg2>ZCU5</leg2>
<leg3/>
<leg4/>
<lastPrice>4.25</lastPrice>
<change>1</change>
<volume>28</volume>
<tradeTime>2024-11-21T02:55:02-06:00</tradeTime>
<serverTimestamp>2024-11-21T03:07:24-06:00</serverTimestamp>
<ask>4.5</ask>
<askSize>4300</askSize>
<open>3</open>
<high>4.25</high>
<low>3</low>
<previousClose>3.25</previousClose>
<flag/>
</item>
</getFuturesSpreads>
CSV
GET
GET https://ondemand.websol.barchart.com/getFuturesSpreads.csv?apikey=YOUR_API_KEY&root=ZC&fields=open%2Chigh%2Cask%2CaskSize
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getFuturesSpreads.csv
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&root=ZC&fields=open%2Chigh%2Cask%2CaskSize
Response
symbol,symbolName,type,leg1,leg2,leg3,leg4,lastPrice,change,volume,tradeTime,serverTimestamp,ask,askSize,open,high,low,previousClose,flag
"_S_SP_ZCZ4_ZCH5","Corn Futures Standard Spread","SP","ZCZ4","ZCH5","","","-10.25","-0.5","11216","2024-11-21T02:57:28-06:00","2024-11-21T03:07:28-06:00","-10","166200","-9.75","-9.5","-10.25","-9.75",""
"_S_BF_ZCZ4_ZCH5_ZCK5","Corn Futures Butterfly Spread","BF","ZCZ4","ZCH5","ZCK5","","-3.25","-0.5","61","2024-11-21T01:54:28-06:00","2024-11-21T03:07:28-06:00","-3","34600","-2.75","-2.75","-3.25","-2.75",""
"_S_CF_ZCZ4_ZCH5_ZCK5_ZCN5","Corn Futures Condor Spread","CF","ZCZ4","ZCH5","ZCK5","ZCN5","-6.75","0.5","0","2024-11-20T16:38:16-06:00","2024-11-20T19:10:00-06:00","0","0","0","-6.75","-6.75","-7.25","s"
"_S_BF_ZCZ4_ZCH5_ZCN5","Corn Futures Butterfly Spread","BF","ZCZ4","ZCH5","ZCN5","","0.25","0","1","2024-11-20T16:37:01-06:00","2024-11-21T03:07:12-06:00","0.25","33300","0","0.25","0.25","0.25","p"
"_S_SP_ZCZ4_ZCK5","Corn Futures Standard Spread","SP","ZCZ4","ZCK5","","","-17","-0.25","784","2024-11-21T02:38:54-06:00","2024-11-21T03:07:24-06:00","-17","17000","-16.75","-16.5","-17.25","-16.75",""
"_S_SP_ZCZ4_ZCN5","Corn Futures Standard Spread","SP","ZCZ4","ZCN5","","","-20.25","-0.5","369","2024-11-21T02:56:32-06:00","2024-11-21T03:07:24-06:00","-20","8400","-19.75","-19.75","-20.25","-19.75",""
"_S_SP_ZCZ4_ZCU5","Corn Futures Standard Spread","SP","ZCZ4","ZCU5","","","-6","0.5","32","2024-11-21T02:56:32-06:00","2024-11-21T03:07:24-06:00","-5.75","2000","-6.75","-6","-7.25","-6.5",""
"_S_SP_ZCZ4_ZCZ5","Corn Futures Standard Spread","SP","ZCZ4","ZCZ5","","","-10.25","0.5","114","2024-11-21T02:52:49-06:00","2024-11-21T03:07:24-06:00","-10","8300","-10.75","-10.25","-11","-10.75",""
"_S_SP_ZCZ4_ZCH6","Corn Futures Standard Spread","SP","ZCZ4","ZCH6","","","-21.75","1.5","2","2024-11-20T13:06:23-06:00","2024-11-21T03:07:17-06:00","-20.75","300","-22","-21.75","-22","-23.25","p"
"_S_SP_ZCZ4_ZCK6","Corn Futures Standard Spread","SP","ZCZ4","ZCK6","","","-27.75","1.75","0","2024-11-20T16:37:31-06:00","2024-11-21T03:07:17-06:00","-27.25","100","0","-27.75","-27.75","-29.5","p"
"_S_SP_ZCZ4_ZCN6","Corn Futures Standard Spread","SP","ZCZ4","ZCN6","","","-31.25","1.75","0","2024-11-20T16:37:53-06:00","2024-11-21T03:07:17-06:00","-30.5","200","0","-31.25","-31.25","-33","p"
"_S_SP_ZCZ4_ZCU6","Corn Futures Standard Spread","SP","ZCZ4","ZCU6","","","-18.5","1.5","0","2024-11-20T16:37:29-06:00","2024-11-21T03:07:17-06:00","-16.75","100","0","-18.5","-18.5","-20","p"
"_S_SP_ZCZ4_ZCZ6","Corn Futures Standard Spread","SP","ZCZ4","ZCZ6","","","-19","1.25","0","2024-11-20T16:37:30-06:00","2024-11-21T03:07:17-06:00","-17.25","200","0","-19","-19","-20.25","p"
"_S_SP_ZCZ4_ZCN7","Corn Futures Standard Spread","SP","ZCZ4","ZCN7","","","-34","1.25","0","2024-11-20T16:37:29-06:00","2024-11-21T03:06:39-06:00","0","0","0","-34","-34","-35.25","p"
"_S_SP_ZCZ4_ZCZ7","Corn Futures Standard Spread","SP","ZCZ4","ZCZ7","","","-18.25","1","0","2024-11-20T16:37:31-06:00","2024-11-21T03:07:17-06:00","-13","100","0","-18.25","-18.25","-19.25","p"
"_S_SP_ZCH5_ZCK5","Corn Futures Standard Spread","SP","ZCH5","ZCK5","","","-7","0","1368","2024-11-21T02:53:08-06:00","2024-11-21T03:07:24-06:00","-6.75","307100","-7","-6.75","-7","-7",""
"_S_BF_ZCH5_ZCK5_ZCN5","Corn Futures Butterfly Spread","BF","ZCH5","ZCK5","ZCN5","","-3.75","0.25","14","2024-11-20T19:00:37-06:00","2024-11-21T03:07:24-06:00","-3.75","29100","-3.75","-3.75","-3.75","-4",""
"_S_CF_ZCH5_ZCK5_ZCN5_ZCU5","Corn Futures Condor Spread","CF","ZCH5","ZCK5","ZCN5","ZCU5","-20.25","0.5","0","2024-11-20T16:38:11-06:00","2024-11-20T19:10:00-06:00","0","0","0","-20.25","-20.25","-20.75","s"
"_S_SP_ZCH5_ZCN5","Corn Futures Standard Spread","SP","ZCH5","ZCN5","","","-10","0","215","2024-11-21T02:53:00-06:00","2024-11-21T03:07:14-06:00","-10","1600","-10.25","-10","-10.25","-10",""
"_S_SP_ZCH5_ZCU5","Corn Futures Standard Spread","SP","ZCH5","ZCU5","","","4.25","1","28","2024-11-21T02:55:02-06:00","2024-11-21T03:07:24-06:00","4.5","4300","3","4.25","3","3.25",""
PHP
<?php
$ondemand = new SoapClient('https://ondemand.websol.barchart.com/service?wsdl');
$params = [
'apikey' => 'YOUR_API_KEY',
'root' => 'ZC',
'fields' => 'open,high,ask,askSize',
];
$result = $ondemand->getFuturesSpreads($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.getFuturesSpreads("YOUR_API_KEY", "ZC", "open,high,ask,askSize")
Perl
use SOAP::Lite;
use SOAP::WSDL;
my $ondemand = SOAP::Lite
-> service('https://ondemand.websol.barchart.com/service?wsdl');
my $result = $ondemand->getFuturesSpreads('YOUR_API_KEY', 'ZC', 'open,high,ask,askSize');
print $result;
Python
from suds.client import Client
ondemand = Client('https://ondemand.websol.barchart.com/service?wsdl')
result = ondemand.service.getFuturesSpreads('YOUR_API_KEY', 'ZC', 'open,high,ask,askSize')
print(result)
Ruby
require 'savon'
ondemand = Savon.client(wsdl: 'https://ondemand.websol.barchart.com/service?wsdl')
response = ondemand.call(
:getFuturesSpreads,
message: {
apikey: 'YOUR_API_KEY',
root: 'ZC',
fields: 'open,high,ask,askSize',
}
)
response.body