RapidAPI logo

IP2Currency

FREE
By fraudlabs
Updated 6 months ago
Finance
-/10
Popularity Score
-
Latency
-
Success Rate

IP2Currency API Documentation

IP2Currency Exchange Rate Web Service provides the user with an easy way to get a localized & latest Currency Exchange Rate based on the visitor's IP address.

Sign up for free license key at http://www.fraudlabs.com/freelicense.aspx?PackageID=10 which allows up to 90 queries a month.

View API Details
GETIP2Currency API
GETIP2Currency API

Currency by IP Geolocation API

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
LICENSESTRING
REQUIREDAPI license key.
Optional Parameters
VISITORIPSTRING
OPTIONALIP address of visitor.
FROMCURRENCYCODESTRING
OPTIONALBase currency code.
TOCURRENCYCODESTRING
OPTIONALTarget currency code.
FROMAMOUNTSTRING
OPTIONALCurrency amount for conversion.
Code Snippet
unirest.get("https://fraudlabs-ip2currency-v1.p.rapidapi.com/ip2currencywebservice.asmx")
.header("X-RapidAPI-Host", "fraudlabs-ip2currency-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://fraudlabs-ip2currency-v1.p.rapidapi.com/ip2currencywebservice.asmx
Request Method: GET
Response Headers
Response Body
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://v1.fraudlabs.com/soap/IP2CurrencyWebService"><SOAP-ENV:Body><ns1:IP2CurrencyResponse xmlns:ns1="v1.fraudlabs.com"><return xsi:type="tns:IP2CurrencyOutput"><FROMCURRENCYCODE xsi:type="xsd:string">USD</FROMCURRENCYCODE><TOCURRENCYCODE xsi:type="xsd:string">USD</TOCURRENCYCODE><TOCURRENCYSYMBOL xsi:type="xsd:string">$</TOCURRENCYSYMBOL><FROMAMOUNT xsi:type="xsd:string"></FROMAMOUNT><TOAMOUNT xsi:type="xsd:string"></TOAMOUNT><CONVERSIONRATE xsi:type="xsd:string">1.0000</CONVERSIONRATE><TOCOUNTRYNAME xsi:type="xsd:string">UNITED STATES</TOCOUNTRYNAME><TOCOUNTRYCODE xsi:type="xsd:string">US</TOCOUNTRYCODE><CREDITSAVAILABLE xsi:type="xsd:string">999972741</CREDITSAVAILABLE><MESSAGE xsi:type="xsd:string"></MESSAGE></return></ns1:IP2CurrencyResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.get("https://fraudlabs-ip2currency-v1.p.rapidapi.com/ip2currencywebservice.asmx")
.header("X-RapidAPI-Host", "fraudlabs-ip2currency-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication