Futures Data by Exchange API
getFuturesByExchange
Receive all real-time or delayed, or end-of-day futures data by exchange through a single onDemand query with the get FuturesByExchange API.
View All APIsContact Us to Get Access
Inputs
exchangerequired
The exchange code for which the list of commodities are required.
Type
enum (A type which includes a list of valid possible values.)
Example
BMF
Valid Values
LIFFE, IOM, CROSS, CME, CBOT, MIAX, NYMEX, CASH, KCBT, CBOE, CFE, ICEUS, LME, WCE, GBLX, IMM, BMF, ROFEX, EUIDX, SFE, ICEFI, ICE, SIMEX, EUREX, MEFF, COMEX, HKFE, ENDEX, TIFFE, MDEX, SAFEX, OMX, CXMI, NYMI, TFEX, MNTRL, JPX, TAIWA, CBOTM, MATIF, LCE, BSE, SHFE, NCDEX, NZX, EEX, CZCE, DCE, TURK, MATBA, TOCOM, DGCX, MCX, CFFEX, NSE, EEX_POWER, SGCOM, SGXFX, SGXNZ, SGIDX
categoryoptional
Category of the commodity.
Type
string (A sequence of characters. (example: GOOG))
Example
Meats
fieldsoptional
Request additional optional fields.
Type
list (A comma or semi-colon delimited string.)
Example
openInterest
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)
name
always returned
always returned
The type of symbol used.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
dayCode
always returned
always returned
The day code for the session. Day codes are "1-9" for days 1 through 9, "0" (zero) for the 10th of the month, and "A - U" for days 11 through 31.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
mode
always returned
always returned
An indicator representing if the quote is real-time ("R"), delayed ("I") or end-of-day ("D").
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
lastPrice
always returned
always returned
The last price the instrument 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)
tradeTimestamp
always returned
always returned
The exchange 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>.
netChange
always returned
always returned
The difference between the last traded price and the 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)
percentChange
always returned
always returned
The percent difference between the last traded price and the 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)
unitCode
always returned
always returned
The corresponding unit code.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
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)
close
always returned
always returned
The last 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)
numTrades
always returned
always returned
The number of individual transactions over the course of a trading session.
int
A numeric type defining a whole number. (example: 2)
A numeric type defining a whole number. (example: 2)
dollarVolume
always returned
always returned
The current Dollar Volume.
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
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 official 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)
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)
previousVolume
always returned
always returned
The quantity of shares or contracts traded from the previous day.
int
A numeric type defining a whole number. (example: 2)
A numeric type defining a whole number. (example: 2)
previousOpenInterest
always returned
always returned
The quantity of open interest for futures from 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)
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/getFuturesByExchange.json?apikey=YOUR_API_KEY&exchange=BMF&category=Meats&fields=openInterest
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getFuturesByExchange.json
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&exchange=BMF&category=Meats&fields=openInterest
Response
{
"status": {
"code": 200,
"message": "Success."
},
"results": [
{
"symbol": "XCZ24",
"name": "BMF Live Cattle",
"dayCode": "M",
"mode": "i",
"lastPrice": 318,
"tradeTimestamp": "2024-12-20T18:06:00-06:00",
"netChange": -1.0500000000000114,
"percentChange": -0.33,
"unitCode": "2",
"open": 318.4,
"high": 318.4,
"low": 318,
"close": 319.05,
"numTrades": 6,
"dollarVolume": 0,
"flag": "",
"volume": 34,
"previousVolume": 3075,
"previousOpenInterest": 10103
},
{
"symbol": "XCF25",
"name": "BMF Live Cattle",
"dayCode": "M",
"mode": "i",
"lastPrice": 323.1,
"tradeTimestamp": "2024-12-20T18:06:00-06:00",
"netChange": -0.44999999999998863,
"percentChange": -0.14,
"unitCode": "2",
"open": 323.9,
"high": 324,
"low": 322.3,
"close": 323.55,
"numTrades": 51,
"dollarVolume": 0,
"flag": "",
"volume": 85,
"previousVolume": 3325,
"previousOpenInterest": 11714
},
{
"symbol": "XCG25",
"name": "BMF Live Cattle",
"dayCode": "M",
"mode": "i",
"lastPrice": 325,
"tradeTimestamp": "2024-12-20T18:06:00-06:00",
"netChange": 0.25,
"percentChange": 0.08,
"unitCode": "2",
"open": 324.75,
"high": 325,
"low": 324.75,
"close": 324.75,
"numTrades": 14,
"dollarVolume": 0,
"flag": "",
"volume": 21,
"previousVolume": 1019,
"previousOpenInterest": 2811
},
{
"symbol": "XCH25",
"name": "BMF Live Cattle",
"dayCode": "M",
"mode": "i",
"lastPrice": 324.95,
"tradeTimestamp": "2024-12-20T18:06:00-06:00",
"netChange": 1.5,
"percentChange": 0.46,
"unitCode": "2",
"open": 324.95,
"high": 324.95,
"low": 324.95,
"close": 323.45,
"numTrades": 1,
"dollarVolume": 0,
"flag": "",
"volume": 1,
"previousVolume": 739,
"previousOpenInterest": 1541
},
{
"symbol": "XCJ25",
"name": "BMF Live Cattle",
"dayCode": "M",
"mode": "i",
"lastPrice": 323.7,
"tradeTimestamp": "2024-12-20T18:06:00-06:00",
"netChange": 1,
"percentChange": 0.31,
"unitCode": "2",
"open": 323.7,
"high": 323.7,
"low": 323.7,
"close": 322.7,
"numTrades": 1,
"dollarVolume": 0,
"flag": "",
"volume": 1,
"previousVolume": 114,
"previousOpenInterest": 479
},
{
"symbol": "XCK25",
"name": "BMF Live Cattle",
"dayCode": "M",
"mode": "i",
"lastPrice": 323.55,
"tradeTimestamp": "2024-12-20T18:06:00-06:00",
"netChange": 0.44999999999998863,
"percentChange": 0.14,
"unitCode": "2",
"open": 323.55,
"high": 323.55,
"low": 323.55,
"close": 323.1,
"numTrades": 1,
"dollarVolume": 0,
"flag": "",
"volume": 1,
"previousVolume": 91,
"previousOpenInterest": 915
},
{
"symbol": "XCM25",
"name": "BMF Live Cattle",
"dayCode": "J",
"mode": "i",
"lastPrice": 322,
"tradeTimestamp": "2024-12-20T18:06:00-06:00",
"netChange": 2,
"percentChange": 0.63,
"unitCode": "2",
"open": 319.1,
"high": 324.85,
"low": 319.1,
"close": 322,
"numTrades": 0,
"dollarVolume": 0,
"flag": "s",
"volume": 13,
"previousVolume": 14,
"previousOpenInterest": 123
},
{
"symbol": "XCN25",
"name": "BMF Live Cattle",
"dayCode": "J",
"mode": "i",
"lastPrice": 321.1,
"tradeTimestamp": "2024-12-20T18:06:00-06:00",
"netChange": 2,
"percentChange": 0.63,
"unitCode": "2",
"open": 326.65,
"high": 326.65,
"low": 321.1,
"close": 321.1,
"numTrades": 1,
"dollarVolume": 0,
"flag": "s",
"volume": 1,
"previousVolume": 1,
"previousOpenInterest": 184
},
{
"symbol": "XCQ25",
"name": "BMF Live Cattle",
"dayCode": "J",
"mode": "i",
"lastPrice": 324.5,
"tradeTimestamp": "2024-12-20T18:06:00-06:00",
"netChange": 2,
"percentChange": 0.62,
"unitCode": "2",
"open": 325.95,
"high": 325.95,
"low": 324.5,
"close": 324.5,
"numTrades": 1,
"dollarVolume": 0,
"flag": "s",
"volume": 1,
"previousVolume": 5,
"previousOpenInterest": 375
},
{
"symbol": "XCU25",
"name": "BMF Live Cattle",
"dayCode": "J",
"mode": "i",
"lastPrice": 328.9,
"tradeTimestamp": "2024-12-20T18:06:00-06:00",
"netChange": 2.0499999999999545,
"percentChange": 0.63,
"unitCode": "2",
"open": 328.9,
"high": 328.9,
"low": 328.9,
"close": 328.9,
"numTrades": 0,
"dollarVolume": 0,
"flag": "s",
"volume": 0,
"previousVolume": 0,
"previousOpenInterest": 7
},
{
"symbol": "XCV25",
"name": "BMF Live Cattle",
"dayCode": "J",
"mode": "i",
"lastPrice": 344.6,
"tradeTimestamp": "2024-12-20T18:06:00-06:00",
"netChange": 2.1,
"percentChange": 0.61,
"unitCode": "2",
"open": 0,
"high": 344.6,
"low": 344.6,
"close": 344.6,
"numTrades": 0,
"dollarVolume": 0,
"flag": "s",
"volume": 0,
"previousVolume": 3,
"previousOpenInterest": 66
},
{
"symbol": "XCX25",
"name": "BMF Live Cattle",
"dayCode": "J",
"mode": "i",
"lastPrice": 328.9,
"tradeTimestamp": "2024-12-20T18:06:00-06:00",
"netChange": 2.05,
"percentChange": 0.63,
"unitCode": "2",
"open": 0,
"high": 328.9,
"low": 328.9,
"close": 328.9,
"numTrades": 0,
"dollarVolume": 0,
"flag": "s",
"volume": 0,
"previousVolume": 0,
"previousOpenInterest": 1
}
]
}
XML
GET
GET https://ondemand.websol.barchart.com/getFuturesByExchange.xml?apikey=YOUR_API_KEY&exchange=BMF&category=Meats&fields=openInterest
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getFuturesByExchange.xml
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&exchange=BMF&category=Meats&fields=openInterest
Response
<?xml version="1.0" encoding="utf-8"?>
<getFuturesByExchange>
<status>
<code>200</code>
<message>Success.</message>
</status>
<item>
<symbol>XCZ24</symbol>
<name>BMF Live Cattle</name>
<dayCode>M</dayCode>
<mode>i</mode>
<lastPrice>318</lastPrice>
<tradeTimestamp>2024-12-20T18:06:00-06:00</tradeTimestamp>
<netChange>-1.05</netChange>
<percentChange>-0.33</percentChange>
<unitCode>2</unitCode>
<open>318.4</open>
<high>318.4</high>
<low>318</low>
<close>319.05</close>
<numTrades>6</numTrades>
<dollarVolume>0</dollarVolume>
<flag/>
<volume>34</volume>
<previousVolume>3075</previousVolume>
<previousOpenInterest>10103</previousOpenInterest>
</item>
<item>
<symbol>XCF25</symbol>
<name>BMF Live Cattle</name>
<dayCode>M</dayCode>
<mode>i</mode>
<lastPrice>323.1</lastPrice>
<tradeTimestamp>2024-12-20T18:06:00-06:00</tradeTimestamp>
<netChange>-0.44999999999999</netChange>
<percentChange>-0.14</percentChange>
<unitCode>2</unitCode>
<open>323.9</open>
<high>324</high>
<low>322.3</low>
<close>323.55</close>
<numTrades>51</numTrades>
<dollarVolume>0</dollarVolume>
<flag/>
<volume>85</volume>
<previousVolume>3325</previousVolume>
<previousOpenInterest>11714</previousOpenInterest>
</item>
<item>
<symbol>XCG25</symbol>
<name>BMF Live Cattle</name>
<dayCode>M</dayCode>
<mode>i</mode>
<lastPrice>325</lastPrice>
<tradeTimestamp>2024-12-20T18:06:00-06:00</tradeTimestamp>
<netChange>0.25</netChange>
<percentChange>0.08</percentChange>
<unitCode>2</unitCode>
<open>324.75</open>
<high>325</high>
<low>324.75</low>
<close>324.75</close>
<numTrades>14</numTrades>
<dollarVolume>0</dollarVolume>
<flag/>
<volume>21</volume>
<previousVolume>1019</previousVolume>
<previousOpenInterest>2811</previousOpenInterest>
</item>
<item>
<symbol>XCH25</symbol>
<name>BMF Live Cattle</name>
<dayCode>M</dayCode>
<mode>i</mode>
<lastPrice>324.95</lastPrice>
<tradeTimestamp>2024-12-20T18:06:00-06:00</tradeTimestamp>
<netChange>1.5</netChange>
<percentChange>0.46</percentChange>
<unitCode>2</unitCode>
<open>324.95</open>
<high>324.95</high>
<low>324.95</low>
<close>323.45</close>
<numTrades>1</numTrades>
<dollarVolume>0</dollarVolume>
<flag/>
<volume>1</volume>
<previousVolume>739</previousVolume>
<previousOpenInterest>1541</previousOpenInterest>
</item>
<item>
<symbol>XCJ25</symbol>
<name>BMF Live Cattle</name>
<dayCode>M</dayCode>
<mode>i</mode>
<lastPrice>323.7</lastPrice>
<tradeTimestamp>2024-12-20T18:06:00-06:00</tradeTimestamp>
<netChange>1</netChange>
<percentChange>0.31</percentChange>
<unitCode>2</unitCode>
<open>323.7</open>
<high>323.7</high>
<low>323.7</low>
<close>322.7</close>
<numTrades>1</numTrades>
<dollarVolume>0</dollarVolume>
<flag/>
<volume>1</volume>
<previousVolume>114</previousVolume>
<previousOpenInterest>479</previousOpenInterest>
</item>
<item>
<symbol>XCK25</symbol>
<name>BMF Live Cattle</name>
<dayCode>M</dayCode>
<mode>i</mode>
<lastPrice>323.55</lastPrice>
<tradeTimestamp>2024-12-20T18:06:00-06:00</tradeTimestamp>
<netChange>0.44999999999999</netChange>
<percentChange>0.14</percentChange>
<unitCode>2</unitCode>
<open>323.55</open>
<high>323.55</high>
<low>323.55</low>
<close>323.1</close>
<numTrades>1</numTrades>
<dollarVolume>0</dollarVolume>
<flag/>
<volume>1</volume>
<previousVolume>91</previousVolume>
<previousOpenInterest>915</previousOpenInterest>
</item>
<item>
<symbol>XCM25</symbol>
<name>BMF Live Cattle</name>
<dayCode>J</dayCode>
<mode>i</mode>
<lastPrice>322</lastPrice>
<tradeTimestamp>2024-12-20T18:06:00-06:00</tradeTimestamp>
<netChange>2</netChange>
<percentChange>0.63</percentChange>
<unitCode>2</unitCode>
<open>319.1</open>
<high>324.85</high>
<low>319.1</low>
<close>322</close>
<numTrades>0</numTrades>
<dollarVolume>0</dollarVolume>
<flag>s</flag>
<volume>13</volume>
<previousVolume>14</previousVolume>
<previousOpenInterest>123</previousOpenInterest>
</item>
<item>
<symbol>XCN25</symbol>
<name>BMF Live Cattle</name>
<dayCode>J</dayCode>
<mode>i</mode>
<lastPrice>321.1</lastPrice>
<tradeTimestamp>2024-12-20T18:06:00-06:00</tradeTimestamp>
<netChange>2</netChange>
<percentChange>0.63</percentChange>
<unitCode>2</unitCode>
<open>326.65</open>
<high>326.65</high>
<low>321.1</low>
<close>321.1</close>
<numTrades>1</numTrades>
<dollarVolume>0</dollarVolume>
<flag>s</flag>
<volume>1</volume>
<previousVolume>1</previousVolume>
<previousOpenInterest>184</previousOpenInterest>
</item>
<item>
<symbol>XCQ25</symbol>
<name>BMF Live Cattle</name>
<dayCode>J</dayCode>
<mode>i</mode>
<lastPrice>324.5</lastPrice>
<tradeTimestamp>2024-12-20T18:06:00-06:00</tradeTimestamp>
<netChange>2</netChange>
<percentChange>0.62</percentChange>
<unitCode>2</unitCode>
<open>325.95</open>
<high>325.95</high>
<low>324.5</low>
<close>324.5</close>
<numTrades>1</numTrades>
<dollarVolume>0</dollarVolume>
<flag>s</flag>
<volume>1</volume>
<previousVolume>5</previousVolume>
<previousOpenInterest>375</previousOpenInterest>
</item>
<item>
<symbol>XCU25</symbol>
<name>BMF Live Cattle</name>
<dayCode>J</dayCode>
<mode>i</mode>
<lastPrice>328.9</lastPrice>
<tradeTimestamp>2024-12-20T18:06:00-06:00</tradeTimestamp>
<netChange>2.05</netChange>
<percentChange>0.63</percentChange>
<unitCode>2</unitCode>
<open>328.9</open>
<high>328.9</high>
<low>328.9</low>
<close>328.9</close>
<numTrades>0</numTrades>
<dollarVolume>0</dollarVolume>
<flag>s</flag>
<volume>0</volume>
<previousVolume>0</previousVolume>
<previousOpenInterest>7</previousOpenInterest>
</item>
<item>
<symbol>XCV25</symbol>
<name>BMF Live Cattle</name>
<dayCode>J</dayCode>
<mode>i</mode>
<lastPrice>344.6</lastPrice>
<tradeTimestamp>2024-12-20T18:06:00-06:00</tradeTimestamp>
<netChange>2.1</netChange>
<percentChange>0.61</percentChange>
<unitCode>2</unitCode>
<open>0</open>
<high>344.6</high>
<low>344.6</low>
<close>344.6</close>
<numTrades>0</numTrades>
<dollarVolume>0</dollarVolume>
<flag>s</flag>
<volume>0</volume>
<previousVolume>3</previousVolume>
<previousOpenInterest>66</previousOpenInterest>
</item>
<item>
<symbol>XCX25</symbol>
<name>BMF Live Cattle</name>
<dayCode>J</dayCode>
<mode>i</mode>
<lastPrice>328.9</lastPrice>
<tradeTimestamp>2024-12-20T18:06:00-06:00</tradeTimestamp>
<netChange>2.05</netChange>
<percentChange>0.63</percentChange>
<unitCode>2</unitCode>
<open>0</open>
<high>328.9</high>
<low>328.9</low>
<close>328.9</close>
<numTrades>0</numTrades>
<dollarVolume>0</dollarVolume>
<flag>s</flag>
<volume>0</volume>
<previousVolume>0</previousVolume>
<previousOpenInterest>1</previousOpenInterest>
</item>
</getFuturesByExchange>
CSV
GET
GET https://ondemand.websol.barchart.com/getFuturesByExchange.csv?apikey=YOUR_API_KEY&exchange=BMF&category=Meats&fields=openInterest
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getFuturesByExchange.csv
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&exchange=BMF&category=Meats&fields=openInterest
Response
symbol,name,dayCode,mode,lastPrice,tradeTimestamp,netChange,percentChange,unitCode,open,high,low,close,numTrades,dollarVolume,flag,volume,previousVolume,previousOpenInterest
"XCZ24","BMF Live Cattle","M","i","318","2024-12-20T18:06:00-06:00","-1.05","-0.33","2","318.4","318.4","318","319.05","6","0","","34","3075","10103"
"XCF25","BMF Live Cattle","M","i","323.1","2024-12-20T18:06:00-06:00","-0.44999999999999","-0.14","2","323.9","324","322.3","323.55","51","0","","85","3325","11714"
"XCG25","BMF Live Cattle","M","i","325","2024-12-20T18:06:00-06:00","0.25","0.08","2","324.75","325","324.75","324.75","14","0","","21","1019","2811"
"XCH25","BMF Live Cattle","M","i","324.95","2024-12-20T18:06:00-06:00","1.5","0.46","2","324.95","324.95","324.95","323.45","1","0","","1","739","1541"
"XCJ25","BMF Live Cattle","M","i","323.7","2024-12-20T18:06:00-06:00","1","0.31","2","323.7","323.7","323.7","322.7","1","0","","1","114","479"
"XCK25","BMF Live Cattle","M","i","323.55","2024-12-20T18:06:00-06:00","0.44999999999999","0.14","2","323.55","323.55","323.55","323.1","1","0","","1","91","915"
"XCM25","BMF Live Cattle","J","i","322","2024-12-20T18:06:00-06:00","2","0.63","2","319.1","324.85","319.1","322","0","0","s","13","14","123"
"XCN25","BMF Live Cattle","J","i","321.1","2024-12-20T18:06:00-06:00","2","0.63","2","326.65","326.65","321.1","321.1","1","0","s","1","1","184"
"XCQ25","BMF Live Cattle","J","i","324.5","2024-12-20T18:06:00-06:00","2","0.62","2","325.95","325.95","324.5","324.5","1","0","s","1","5","375"
"XCU25","BMF Live Cattle","J","i","328.9","2024-12-20T18:06:00-06:00","2.05","0.63","2","328.9","328.9","328.9","328.9","0","0","s","0","0","7"
"XCV25","BMF Live Cattle","J","i","344.6","2024-12-20T18:06:00-06:00","2.1","0.61","2","0","344.6","344.6","344.6","0","0","s","0","3","66"
"XCX25","BMF Live Cattle","J","i","328.9","2024-12-20T18:06:00-06:00","2.05","0.63","2","0","328.9","328.9","328.9","0","0","s","0","0","1"
PHP
<?php
$ondemand = new SoapClient('https://ondemand.websol.barchart.com/service?wsdl');
$params = [
'apikey' => 'YOUR_API_KEY',
'exchange' => 'BMF',
'category' => 'Meats',
'fields' => 'openInterest',
];
$result = $ondemand->getFuturesByExchange($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.getFuturesByExchange("YOUR_API_KEY", "BMF", "Meats", "openInterest")
Perl
use SOAP::Lite;
use SOAP::WSDL;
my $ondemand = SOAP::Lite
-> service('https://ondemand.websol.barchart.com/service?wsdl');
my $result = $ondemand->getFuturesByExchange('YOUR_API_KEY', 'BMF', 'Meats', 'openInterest');
print $result;
Python
from suds.client import Client
ondemand = Client('https://ondemand.websol.barchart.com/service?wsdl')
result = ondemand.service.getFuturesByExchange('YOUR_API_KEY', 'BMF', 'Meats', 'openInterest')
print(result)
Ruby
require 'savon'
ondemand = Savon.client(wsdl: 'https://ondemand.websol.barchart.com/service?wsdl')
response = ondemand.call(
:getFuturesByExchange,
message: {
apikey: 'YOUR_API_KEY',
exchange: 'BMF',
category: 'Meats',
fields: 'openInterest',
}
)
response.body