getAmeriborRate API

Ameribor® is an interbank interest rate reflecting the borrowing rates based on actual transactions of the members of the American Financial Exchange (AFX). Ameribor is a transaction-based short-term interest rate based on loans executed between U.S. depositories on the American Financial Exchange Electronic Trading System. The rate is calculated using the 30 trading day rolling average of the weighted average daily volume in the AFX overnight unsecured market. The rate is denoted as a 360-day annualized percentage rate up to the fifth decimal.

All APIs

Contact Us to Get Access

Inputs

Outputs

Name / Requirement
Description
Type
name
always returned
The name of the instrument
string
A sequence of characters. (example: GOOG)
exchange
always returned
The exchange code for the instrument
string
A sequence of characters. (example: GOOG)
lastPrice
always returned
The end of day price
double
A numeric type defining a number with fractional parts. (example: 2.14)
tradeTimestamp
always returned
The timestamp for the last price
dateTime
A date and time in the format of YYYY-MM-DD HH:MI:SS<TIMEZONE_OFFSET>.

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/getAmeriborRate.json?apikey=YOUR_API_KEY
Host: ondemand.websol.barchart.com

POST

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

apikey=YOUR_API_KEY

Response

{
    "status": {
        "code": 200,
        "message": "Success."
    },
    "results": [
        {
            "name": "Ameribor Rate",
            "exchange": "AFX",
            "lastPrice": 2.33453,
            "tradeTimestamp": "2018-10-09T17:00:00-05:00"
        }
    ]
}

XML

GET

GET https://ondemand.websol.barchart.com/getAmeriborRate.xml?apikey=YOUR_API_KEY
Host: ondemand.websol.barchart.com

POST

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

apikey=YOUR_API_KEY

Response


<?xml version="1.0" encoding="utf-8"?>
 <getAmeriborRate>
  <status>
   <code>200</code>
   <message>Success.</message>
  </status>
  <item>
   <name>Ameribor Rate</name>
   <exchange>AFX</exchange>
   <lastPrice>2.33453</lastPrice>
   <tradeTimestamp>2018-10-09T17:00:00-05:00</tradeTimestamp>
  </item>
 </getAmeriborRate>

CSV

GET

GET https://ondemand.websol.barchart.com/getAmeriborRate.csv?apikey=YOUR_API_KEY
Host: ondemand.websol.barchart.com

POST

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

apikey=YOUR_API_KEY

Response

name,exchange,lastPrice,tradeTimestamp
"Ameribor Rate","AFX","2.33453","2018-10-09T17:00:00-05:00"


PHP

<?php

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

$params = [
    'apikey' => 'YOUR_API_KEY',
];

$result = $ondemand->getAmeriborRate($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.getAmeriborRate("YOUR_API_KEY")

Perl

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

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

my $result = $ondemand->getAmeriborRate('YOUR_API_KEY');

print $result;

Python

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

result = client.service.getAmeriborRate('YOUR_API_KEY')

print result

Ruby

require 'savon'

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

response = ondemand.call(
    :getAmeriborRate,
    message: {
        apikey: 'YOUR_API_KEY',
    }
)

response.body