getForexForwardCurves API

The getForexForwardCurves API provides the bid, ask and mid price data for all available forward curves (forward rates) for a given forex symbol.

All APIs

Contact Us to Get Access

Inputs

symbols required

A valid forex symbol.

Type
list (A comma or semi-colon delimited string.) 
Example
^EURUSD 

Outputs

Name / Requirement
Description
Type
symbol
always returned
The forex symbol
string
A sequence of characters. (example: GOOG)
name
always returned
Name of the forex
string
A sequence of characters. (example: GOOG)
bid
always returned
The current bid price
double
A numeric type defining a number with fractional parts. (example: 2.14)
ask
always returned
The current ask price
double
A numeric type defining a number with fractional parts. (example: 2.14)
mid
always returned
The current mid price
double
A numeric type defining a number with fractional parts. (example: 2.14)
lastUpdate
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>.
forwardCurves
always returned
A multi-dimensional array with symbol, name, bid, ask, mid and last update timestamp for all available forward curves for the requested forex symbol.
enum
A type which includes a list of valid possible values.

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/getForexForwardCurves.json?apikey=<YOUR API KEY>&symbols=%5EEURUSD
Host: ondemand.websol.barchart.com

POST

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

apikey=<YOUR API KEY>&symbols=%5EEURUSD

Response

{
    "status": {
        "code": 200,
        "message": "Success."
    },
    "results": [
        {
            "symbol": "^EURUSD",
            "name": "Euro Fx\/U.S. Dollar",
            "bid": 1.17752,
            "ask": 1.17761,
            "mid": 1.17757,
            "lastUpdate": "2017-11-22T08:46:23-06:00",
            "forwardCurves": [
                {
                    "symbol": "EURUSD.O",
                    "name": "EUR\/USD Overnight Forward",
                    "bid": 1.11,
                    "ask": 1.12,
                    "mid": 1.115,
                    "lastUpdate": "2017-11-22T08:55:27-06:00"
                },
                {
                    "symbol": "EURUSD.A",
                    "name": "EUR\/USD Tomorrow Forward",
                    "bid": 1.16,
                    "ask": 1.165,
                    "mid": 1.1625,
                    "lastUpdate": "2017-11-22T08:55:27-06:00"
                },
                {
                    "symbol": "EURUSD.S",
                    "name": "EUR\/USD Spot Forward",
                    "bid": 0.56,
                    "ask": 0.58,
                    "mid": 0.57,
                    "lastUpdate": "2017-11-22T08:55:27-06:00"
                },
                {
                    "symbol": "EURUSD.B",
                    "name": "EUR\/USD 1-Week Forward",
                    "bid": 4.07,
                    "ask": 4.14,
                    "mid": 4.105,
                    "lastUpdate": "2017-11-22T08:55:27-06:00"
                },
                {
                    "symbol": "EURUSD.C",
                    "name": "EUR\/USD 2-Week Forward",
                    "bid": 8.2,
                    "ask": 8.3,
                    "mid": 8.25,
                    "lastUpdate": "2017-11-22T08:55:49-06:00"
                },
                {
                    "symbol": "EURUSD.D",
                    "name": "EUR\/USD 3-Week Forward",
                    "bid": 12.42,
                    "ask": 12.52,
                    "mid": 12.47,
                    "lastUpdate": "2017-11-22T08:55:27-06:00"
                },
                {
                    "symbol": "EURUSD.E",
                    "name": "EUR\/USD 1-Month Forward",
                    "bid": 20.88,
                    "ask": 21.06,
                    "mid": 20.97,
                    "lastUpdate": "2017-11-22T08:56:23-06:00"
                },
                {
                    "symbol": "EURUSD.G",
                    "name": "EUR\/USD 2-Month Forward",
                    "bid": 46.7,
                    "ask": 46.9,
                    "mid": 46.8,
                    "lastUpdate": "2017-11-22T08:55:27-06:00"
                },
                {
                    "symbol": "EURUSD.H",
                    "name": "EUR\/USD 3-Month Forward",
                    "bid": 69.64,
                    "ask": 69.95,
                    "mid": 69.795,
                    "lastUpdate": "2017-11-22T08:56:23-06:00"
                },
                {
                    "symbol": "EURUSD.J",
                    "name": "EUR\/USD 4-Month Forward",
                    "bid": 89.1,
                    "ask": 89.5,
                    "mid": 89.3,
                    "lastUpdate": "2017-11-22T08:55:27-06:00"
                },
                {
                    "symbol": "EURUSD.K",
                    "name": "EUR\/USD 5-Month Forward",
                    "bid": 112.6,
                    "ask": 113,
                    "mid": 112.8,
                    "lastUpdate": "2017-11-22T08:55:27-06:00"
                },
                {
                    "symbol": "EURUSD.M",
                    "name": "EUR\/USD 6-Month Forward",
                    "bid": 135.7,
                    "ask": 136.2,
                    "mid": 135.95,
                    "lastUpdate": "2017-11-22T08:55:49-06:00"
                },
                {
                    "symbol": "EURUSD.N",
                    "name": "EUR\/USD 7-Month Forward",
                    "bid": 160.2,
                    "ask": 161,
                    "mid": 160.6,
                    "lastUpdate": "2017-11-22T08:55:27-06:00"
                },
                {
                    "symbol": "EURUSD.Q",
                    "name": "EUR\/USD 8-Month Forward",
                    "bid": 184.8,
                    "ask": 185.8,
                    "mid": 185.3,
                    "lastUpdate": "2017-11-22T08:55:27-06:00"
                },
                {
                    "symbol": "EURUSD.U",
                    "name": "EUR\/USD 9-Month Forward",
                    "bid": 210.5,
                    "ask": 211,
                    "mid": 210.75,
                    "lastUpdate": "2017-11-22T08:55:49-06:00"
                },
                {
                    "symbol": "EURUSD.V",
                    "name": "EUR\/USD 10-Month Forward",
                    "bid": 235.5,
                    "ask": 236.5,
                    "mid": 236,
                    "lastUpdate": "2017-11-22T08:55:27-06:00"
                },
                {
                    "symbol": "EURUSD.X",
                    "name": "EUR\/USD 11-Month Forward",
                    "bid": 261.79998,
                    "ask": 262.79998,
                    "mid": 262.29998,
                    "lastUpdate": "2017-11-22T08:55:27-06:00"
                },
                {
                    "symbol": "EURUSD.1",
                    "name": "EUR\/USD 1-Year Forward",
                    "bid": 290.5,
                    "ask": 291.20002,
                    "mid": 290.85001,
                    "lastUpdate": "2017-11-22T08:56:19-06:00"
                },
                {
                    "symbol": "EURUSD.2",
                    "name": "EUR\/USD 2-Year Forward",
                    "bid": 613.50008,
                    "ask": 617.2,
                    "mid": 615.35004,
                    "lastUpdate": "2017-11-22T08:56:19-06:00"
                },
                {
                    "symbol": "EURUSD.3",
                    "name": "EUR\/USD 3-Year Forward",
                    "bid": 927,
                    "ask": 937,
                    "mid": 932,
                    "lastUpdate": "2017-11-22T08:56:14-06:00"
                },
                {
                    "symbol": "EURUSD.4",
                    "name": "EUR\/USD 4-Year Forward",
                    "bid": 1227.00016,
                    "ask": 1239.00016,
                    "mid": 1233.00016,
                    "lastUpdate": "2017-11-22T08:56:04-06:00"
                },
                {
                    "symbol": "EURUSD.5",
                    "name": "EUR\/USD 5-Year Forward",
                    "bid": 1500,
                    "ask": 1515.00016,
                    "mid": 1507.50008,
                    "lastUpdate": "2017-11-22T08:56:04-06:00"
                },
                {
                    "symbol": "EURUSD.6",
                    "name": "EUR\/USD 6-Year Forward",
                    "bid": 1743.00016,
                    "ask": 1783.00016,
                    "mid": 1763.00016,
                    "lastUpdate": "2017-11-22T08:55:33-06:00"
                },
                {
                    "symbol": "EURUSD.7",
                    "name": "EUR\/USD 7-Year Forward",
                    "bid": 1984,
                    "ask": 2024,
                    "mid": 2004,
                    "lastUpdate": "2017-11-22T08:55:27-06:00"
                },
                {
                    "symbol": "EURUSD.Y",
                    "name": "EUR\/USD 10-Year Forward",
                    "bid": 2557,
                    "ask": 2637,
                    "mid": 2597,
                    "lastUpdate": "2017-11-22T08:56:14-06:00"
                }
            ]
        }
    ]
}

XML

GET

GET https://ondemand.websol.barchart.com/getForexForwardCurves.xml?apikey=<YOUR API KEY>&symbols=%5EEURUSD
Host: ondemand.websol.barchart.com

POST

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

apikey=<YOUR API KEY>&symbols=%5EEURUSD

Response


<?xml version="1.0" encoding="utf-8"?>
 <getForexForwardCurves>
  <status>
   <code>200</code>
   <message>Success.</message>
  </status>
  <item>
   <symbol>^EURUSD</symbol>
   <name>Euro Fx/U.S. Dollar</name>
   <bid>1.17752</bid>
   <ask>1.17761</ask>
   <mid>1.17757</mid>
   <lastUpdate>2017-11-22T08:46:23-06:00</lastUpdate>
   <forwardCurves>
    <>
     <symbol>EURUSD.O</symbol>
     <name>EUR/USD Overnight Forward</name>
     <bid>1.11</bid>
     <ask>1.12</ask>
     <mid>1.115</mid>
     <lastUpdate>2017-11-22T08:55:27-06:00</lastUpdate>
     </>
     <>
      <symbol>EURUSD.A</symbol>
      <name>EUR/USD Tomorrow Forward</name>
      <bid>1.16</bid>
      <ask>1.165</ask>
      <mid>1.1625</mid>
      <lastUpdate>2017-11-22T08:55:27-06:00</lastUpdate>
      </>
      <>
       <symbol>EURUSD.S</symbol>
       <name>EUR/USD Spot Forward</name>
       <bid>0.56</bid>
       <ask>0.58</ask>
       <mid>0.57</mid>
       <lastUpdate>2017-11-22T08:55:27-06:00</lastUpdate>
       </>
       <>
        <symbol>EURUSD.B</symbol>
        <name>EUR/USD 1-Week Forward</name>
        <bid>4.07</bid>
        <ask>4.14</ask>
        <mid>4.105</mid>
        <lastUpdate>2017-11-22T08:55:27-06:00</lastUpdate>
        </>
        <>
         <symbol>EURUSD.C</symbol>
         <name>EUR/USD 2-Week Forward</name>
         <bid>8.2</bid>
         <ask>8.3</ask>
         <mid>8.25</mid>
         <lastUpdate>2017-11-22T08:55:49-06:00</lastUpdate>
         </>
         <>
          <symbol>EURUSD.D</symbol>
          <name>EUR/USD 3-Week Forward</name>
          <bid>12.42</bid>
          <ask>12.52</ask>
          <mid>12.47</mid>
          <lastUpdate>2017-11-22T08:55:27-06:00</lastUpdate>
          </>
          <>
           <symbol>EURUSD.E</symbol>
           <name>EUR/USD 1-Month Forward</name>
           <bid>20.88</bid>
           <ask>21.06</ask>
           <mid>20.97</mid>
           <lastUpdate>2017-11-22T08:56:23-06:00</lastUpdate>
           </>
           <>
            <symbol>EURUSD.G</symbol>
            <name>EUR/USD 2-Month Forward</name>
            <bid>46.7</bid>
            <ask>46.9</ask>
            <mid>46.8</mid>
            <lastUpdate>2017-11-22T08:55:27-06:00</lastUpdate>
            </>
            <>
             <symbol>EURUSD.H</symbol>
             <name>EUR/USD 3-Month Forward</name>
             <bid>69.64</bid>
             <ask>69.95</ask>
             <mid>69.795</mid>
             <lastUpdate>2017-11-22T08:56:23-06:00</lastUpdate>
             </>
             <>
              <symbol>EURUSD.J</symbol>
              <name>EUR/USD 4-Month Forward</name>
              <bid>89.1</bid>
              <ask>89.5</ask>
              <mid>89.3</mid>
              <lastUpdate>2017-11-22T08:55:27-06:00</lastUpdate>
              </>
              <>
               <symbol>EURUSD.K</symbol>
               <name>EUR/USD 5-Month Forward</name>
               <bid>112.6</bid>
               <ask>113</ask>
               <mid>112.8</mid>
               <lastUpdate>2017-11-22T08:55:27-06:00</lastUpdate>
               </>
               <>
                <symbol>EURUSD.M</symbol>
                <name>EUR/USD 6-Month Forward</name>
                <bid>135.7</bid>
                <ask>136.2</ask>
                <mid>135.95</mid>
                <lastUpdate>2017-11-22T08:55:49-06:00</lastUpdate>
                </>
                <>
                 <symbol>EURUSD.N</symbol>
                 <name>EUR/USD 7-Month Forward</name>
                 <bid>160.2</bid>
                 <ask>161</ask>
                 <mid>160.6</mid>
                 <lastUpdate>2017-11-22T08:55:27-06:00</lastUpdate>
                 </>
                 <>
                  <symbol>EURUSD.Q</symbol>
                  <name>EUR/USD 8-Month Forward</name>
                  <bid>184.8</bid>
                  <ask>185.8</ask>
                  <mid>185.3</mid>
                  <lastUpdate>2017-11-22T08:55:27-06:00</lastUpdate>
                  </>
                  <>
                   <symbol>EURUSD.U</symbol>
                   <name>EUR/USD 9-Month Forward</name>
                   <bid>210.5</bid>
                   <ask>211</ask>
                   <mid>210.75</mid>
                   <lastUpdate>2017-11-22T08:55:49-06:00</lastUpdate>
                   </>
                   <>
                    <symbol>EURUSD.V</symbol>
                    <name>EUR/USD 10-Month Forward</name>
                    <bid>235.5</bid>
                    <ask>236.5</ask>
                    <mid>236</mid>
                    <lastUpdate>2017-11-22T08:55:27-06:00</lastUpdate>
                    </>
                    <>
                     <symbol>EURUSD.X</symbol>
                     <name>EUR/USD 11-Month Forward</name>
                     <bid>261.79998</bid>
                     <ask>262.79998</ask>
                     <mid>262.29998</mid>
                     <lastUpdate>2017-11-22T08:55:27-06:00</lastUpdate>
                     </>
                     <>
                      <symbol>EURUSD.1</symbol>
                      <name>EUR/USD 1-Year Forward</name>
                      <bid>290.5</bid>
                      <ask>291.20002</ask>
                      <mid>290.85001</mid>
                      <lastUpdate>2017-11-22T08:56:19-06:00</lastUpdate>
                      </>
                      <>
                       <symbol>EURUSD.2</symbol>
                       <name>EUR/USD 2-Year Forward</name>
                       <bid>613.50008</bid>
                       <ask>617.2</ask>
                       <mid>615.35004</mid>
                       <lastUpdate>2017-11-22T08:56:19-06:00</lastUpdate>
                       </>
                       <>
                        <symbol>EURUSD.3</symbol>
                        <name>EUR/USD 3-Year Forward</name>
                        <bid>927</bid>
                        <ask>937</ask>
                        <mid>932</mid>
                        <lastUpdate>2017-11-22T08:56:14-06:00</lastUpdate>
                        </>
                        <>
                         <symbol>EURUSD.4</symbol>
                         <name>EUR/USD 4-Year Forward</name>
                         <bid>1227.00016</bid>
                         <ask>1239.00016</ask>
                         <mid>1233.00016</mid>
                         <lastUpdate>2017-11-22T08:56:04-06:00</lastUpdate>
                         </>
                         <>
                          <symbol>EURUSD.5</symbol>
                          <name>EUR/USD 5-Year Forward</name>
                          <bid>1500</bid>
                          <ask>1515.00016</ask>
                          <mid>1507.50008</mid>
                          <lastUpdate>2017-11-22T08:56:04-06:00</lastUpdate>
                          </>
                          <>
                           <symbol>EURUSD.6</symbol>
                           <name>EUR/USD 6-Year Forward</name>
                           <bid>1743.00016</bid>
                           <ask>1783.00016</ask>
                           <mid>1763.00016</mid>
                           <lastUpdate>2017-11-22T08:55:33-06:00</lastUpdate>
                           </>
                           <>
                            <symbol>EURUSD.7</symbol>
                            <name>EUR/USD 7-Year Forward</name>
                            <bid>1984</bid>
                            <ask>2024</ask>
                            <mid>2004</mid>
                            <lastUpdate>2017-11-22T08:55:27-06:00</lastUpdate>
                            </>
                            <>
                             <symbol>EURUSD.Y</symbol>
                             <name>EUR/USD 10-Year Forward</name>
                             <bid>2557</bid>
                             <ask>2637</ask>
                             <mid>2597</mid>
                             <lastUpdate>2017-11-22T08:56:14-06:00</lastUpdate>
                             </>
                            </forwardCurves>
                           </item>
                          </getForexForwardCurves>

CSV

GET

GET https://ondemand.websol.barchart.com/getForexForwardCurves.csv?apikey=<YOUR API KEY>&symbols=%5EEURUSD
Host: ondemand.websol.barchart.com

POST

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

apikey=<YOUR API KEY>&symbols=%5EEURUSD

Response

symbol,name,bid,ask,mid,lastUpdate,parent
"^EURUSD","Euro Fx/U.S. Dollar","1.17752","1.17761","1.17757","2017-11-22T08:46:23-06:00"
"EURUSD.Y","EUR/USD 10-Year Forward","2557","2637","2597","2017-11-22T08:56:14-06:00",""
"EURUSD.7","EUR/USD 7-Year Forward","1984","2024","2004","2017-11-22T08:55:27-06:00",""
"EURUSD.6","EUR/USD 6-Year Forward","1743.00016","1783.00016","1763.00016","2017-11-22T08:55:33-06:00",""
"EURUSD.5","EUR/USD 5-Year Forward","1500","1515.00016","1507.50008","2017-11-22T08:56:04-06:00",""
"EURUSD.4","EUR/USD 4-Year Forward","1227.00016","1239.00016","1233.00016","2017-11-22T08:56:04-06:00",""
"EURUSD.3","EUR/USD 3-Year Forward","927","937","932","2017-11-22T08:56:14-06:00",""
"EURUSD.2","EUR/USD 2-Year Forward","613.50008","617.2","615.35004","2017-11-22T08:56:19-06:00",""
"EURUSD.1","EUR/USD 1-Year Forward","290.5","291.20002","290.85001","2017-11-22T08:56:19-06:00",""
"EURUSD.X","EUR/USD 11-Month Forward","261.79998","262.79998","262.29998","2017-11-22T08:55:27-06:00",""
"EURUSD.V","EUR/USD 10-Month Forward","235.5","236.5","236","2017-11-22T08:55:27-06:00",""
"EURUSD.U","EUR/USD 9-Month Forward","210.5","211","210.75","2017-11-22T08:55:49-06:00",""
"EURUSD.Q","EUR/USD 8-Month Forward","184.8","185.8","185.3","2017-11-22T08:55:27-06:00",""
"EURUSD.N","EUR/USD 7-Month Forward","160.2","161","160.6","2017-11-22T08:55:27-06:00",""
"EURUSD.M","EUR/USD 6-Month Forward","135.7","136.2","135.95","2017-11-22T08:55:49-06:00",""
"EURUSD.K","EUR/USD 5-Month Forward","112.6","113","112.8","2017-11-22T08:55:27-06:00",""
"EURUSD.J","EUR/USD 4-Month Forward","89.1","89.5","89.3","2017-11-22T08:55:27-06:00",""
"EURUSD.H","EUR/USD 3-Month Forward","69.64","69.95","69.795","2017-11-22T08:56:23-06:00",""
"EURUSD.G","EUR/USD 2-Month Forward","46.7","46.9","46.8","2017-11-22T08:55:27-06:00",""
"EURUSD.E","EUR/USD 1-Month Forward","20.88","21.06","20.97","2017-11-22T08:56:23-06:00",""
"EURUSD.D","EUR/USD 3-Week Forward","12.42","12.52","12.47","2017-11-22T08:55:27-06:00",""
"EURUSD.C","EUR/USD 2-Week Forward","8.2","8.3","8.25","2017-11-22T08:55:49-06:00",""
"EURUSD.B","EUR/USD 1-Week Forward","4.07","4.14","4.105","2017-11-22T08:55:27-06:00",""
"EURUSD.S","EUR/USD Spot Forward","0.56","0.58","0.57","2017-11-22T08:55:27-06:00",""
"EURUSD.A","EUR/USD Tomorrow Forward","1.16","1.165","1.1625","2017-11-22T08:55:27-06:00",""
"EURUSD.O","EUR/USD Overnight Forward","1.11","1.12","1.115","2017-11-22T08:55:27-06:00",""


PHP

<?php

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

$params = [
    'symbols' => '^EURUSD',
];

$result = $ondemand->getForexForwardCurves($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.getForexForwardCurves("^EURUSD")

Perl

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

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

my $result = $ondemand->getForexForwardCurves('^EURUSD');

print $result;

Python

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

result = client.service.getForexForwardCurves('^EURUSD')

print result

Ruby

require 'savon'

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

response = ondemand.call(
    :getForexForwardCurves,
    message: {
        symbols: '^EURUSD',
    }
)

response.body