xChart.aspx Help
To use xChart.aspx, simply create an IMG object in your source page and set the src url as follow:
<img src="http://www.xignite.com/xchart.aspx?Method=Binary&Type=&SubType=&Symbol=&..."/>
Parameters
Header_Username
- <username>: used for authentication against each underlying service.
Method (required)
- Binary: returns a binary output suited for inclusion in an IMG tag. If you use this in a browser, you will see a text representation of the binary output.
- HTML: returns an HTML output not suited for inclusion in an IMG tag. It is simply an HTML page with a single IMG tag populated with the equivalent Method=Binary url.
- Real: returns an HTML output not suited for inclusion in an IMG tag. It is simply an HTML page with a single IMG tag populated with real url of the chart.
Type (required)
- Stock: draws an equity chart. Requires Symbol. Symbol represents a listed equity.
- Future: draws a future chart. Requires Symbol, Month, and Year. Symbol represents a commodity.
- Currency: draws an currency chart. Requires Symbol. Symbol represents a currency pair in format SSSTTT.
- Metal: draws a spot metal chart. Requires Symbol. Symbol represents a pair in format MMMCCC where MMM os the metal symbol (XAU, XAG, XPT, XFD) and CCC the currency (USD, etc...)
- Rate: draws an interest rate or yield curve chart. Requires Symbol. Symbol represents a rate or a rate family
SubType (required)
- Historical: draws a historical chart. StartDate and EndDate must be in MM/DD/YYYY format. Valid for Types Future, Stock, Currency and Rate.
- Commodity: draws a historical commodity chart. StartDate and EndDate must be in MM/DD/YYYY format. Month and Year not required. Valid for Type Future only.
- Intraday: draws an intradays stock chart. StartDate and EndDate must be in HH:MM:SS format. Valid for Types Future and Stock.
- Yield Curve: draws a historical yield curve. Symbol must be a valid RateType. StartDate must be in MM/DD/YYYY format. Valid for Type Rate only.
- RealTime Yield Curve: draws a real-time yield curve. Symbol must be a valid RateFamilyType. StartDate must be in MM/DD/YYYY format. Valid for Type Rate only.
Symbol (default: MSFT for Stocks, CL for futures)
- Valid symbol: the symbol of the stock, commodity, or future to display.
Year (default: 0)
- Integer that is either 0 or a valid contract year: the year of the contract. If Year=0 and Month=0, then next immediate future is displayed.
Month (default: 0)
- Integer between 0 and 12: the month of the contract. If Year<>0 and Month=0, then spot prices are displayed.
StartDate (default: one year ago for Historical and Commodity SubType, 9:00 for Intraday subtype)
- MM/DD/YYYY for Historical and Commodity SubType, HH:MM:SS for Intraday SubType: the start date or time for the chart.
EndDate (default: today for Historical and Commodity SubType, Now (EST) for Intraday subtype)
- MM/DD/YYYY for Historical and Commodity SubType, HH:MM:SS for Intraday SubType: the end date or time for the chart.
Width (default: 800 pixels)
- Integer between 20 and 1200: the width of the chart in pixels.
Height (default: 600 pixels)
- Integer between 20 and 1200: the height of the chart in pixels.
Examples
All these examples use the 'Demo' preset (Preset=Demo).
3 Year History for Microsoft
<img src="http://www.xignite.com/xchart.aspx?Method=Binary&Type=Stock&SubType=Historical&Symbol=MFST&StartDate=11/21/2021&EndDate=11/21/2024"/>
1 Year History for Crude Oil
<img src="http://www.xignite.com/xchart.aspx?Method=Binary&Type=Future&SubType=Commodity&Symbol=CL&StartDate=11/21/2023&EndDate=11/21/2024"/>
Intraday Chart for Google
<img src="http://www.xignite.com/xchart.aspx?Method=Binary&Type=Stock&SubType=Intraday&Symbol=GOOG&StartDate=9:00&EndDate=16:00"/>
Intraday Chart for Natural Gas
<img src="http://www.xignite.com/xchart.aspx?Method=Binary&Type=Future&SubType=Intraday&Symbol=NG&Year=0&Month=0StartDate=6:00&EndDate=16:00"/>
1-Year History for US Dollar vs. Euro
<img src="http://www.xignite.com/xchart.aspx?Method=Binary&Type=Currency&SubType=Historical&Symbol=USDEUR&StartDate=11/21/2021&EndDate=11/21/2024"/>
Today's LIBOR Yield Curve
<img src="http://www.xignite.com/xchart.aspx?Method=Binary&Type=Rate&SubType=Yield Curve&Symbol=Libors&StartDate=11/21/2024"/>