translate Englishattach_moneyUSDQuick AI Login
emoji_food_beverage Exploremaps Maps Listcurrency_exchange Live Currency Ratesfoggy Global Weather Forecastmonitor_heart Commodities Futures Marketapi API Docs

Exchange Rates API Documentation

Access real-time exchange rates for currencies & crypto. This API provides accurate, up-to-date rates for integrating into your financial applications.

Below are the endpoints for accessing exchange rates. Learn how to integrate the API into your application.

Route Parameters:

  • :region *Please check location table here
    (e.g., "SOUTH|ARAB|EAST|NORD").

Response based on params:

{
  "success": true,
  "data": {
    "rates": {
      "USD": 1,
      "INR": 83.540592,
      "JPY": 143.662125,
      "BTC": 0.000015737383
    },
    "crypto": {
      "BTC": 63478.467340116214,
      "DOGE": 0.012578131058644222
    },
    "commodity": {
      "HEUSX": 91.275,
      "ZCUSX": 415.5,
      "ALIUSD": 2540.75,
      "ZOUSX": 326.5,
      "PLUSD": 1363.2,
      "ZMUSD": 292.9,
      "GCUSD": 3412.1,
      "ZLUSX": 54.88,
      "KEUSX": 522.5,
      "SILUSD": 38.905,
      "HGUSD": 4.4815,
      "MGCUSD": 3412.1,
      "SBUSX": 16.44,
      "SIUSD": 38.905,
      "CTUSX": 67.73,
      "ZSUSX": 1056.5,
      "LBUSD": 659,
      "LEUSX": 240.1,
      "NGUSD": 2.765,
      "CLUSD": 63.68,
      "OJUSX": 243.3,
      "KCUSX": 378,
      "PAUSD": 1134.5,
      "GFUSX": 362.325,
      "ZRUSD": 11.865,
      "CCUSD": 7781,
      "BZUSD": 67.74,
      "DCUSD": 18.22,
      "RBUSD": 1.9866,
      "HOUSD": 2.3068
    }
  }
}

GET

check_boxAllcheck_box_outline_blankCurrencycheck_box_outline_blankCryptocheck_box_outline_blankCommodity

This endpoint provides the current exchange rates for the requested currencies.

JavaScript
Python
Php
Java
c#
Ruby
Go
Swift
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "io/ioutil"
    "net/http"
    "net/url"
)

func main() {
    result, err := fetchData()
    if err != nil {
        fmt.Printf("Error: %v\n", err)
        return
    }

    prettyJSON, _ := json.MarshalIndent(result, "", "  ")
    fmt.Println(string(prettyJSON))
}

func fetchData() (map[string]interface{}, error) {
    // API configuration
    baseURL := "https://exchangegrid.api.mapwale.com/v1"
    params := map[string]string{
        "region": "YOUR_REGION", // Replace with actual region value
    }
    headers := map[string]string{
        "Content-Type":  "application/json"
    }
    queryParams := {"show":"all","list":"USD,INR,JPY,BTC,DOGE"}

    // Build URL
    urlBuilder, err := url.Parse(baseURL)
    if err != nil {
        return nil, err
    }

    // Add path parameters
    pathParams := ["region"]
    path := urlBuilder.Path
    for _, param := range pathParams {
        path += "/" + url.PathEscape(params[param])
    }
    urlBuilder.Path = path

    // Add query parameters
    q := urlBuilder.Query()
    for key, value := range queryParams {
        q.Add(key, value)
    }
    urlBuilder.RawQuery = q.Encode()

    // Create request body for POST/PUT
    var reqBody []byte
    if "GET" == "POST" || "GET" == "PUT" {
        reqBody, err = json.Marshal({})
        if err != nil {
            return nil, err
        }
    }

    // Create request
    req, err := http.NewRequest("GET", urlBuilder.String(), bytes.NewBuffer(reqBody))
    if err != nil {
        return nil, err
    }

    // Send request
    client := &http.Client{}
    resp, err := client.Do(req)
    if err != nil {
        return nil, err
    }
    defer resp.Body.Close()

    // Check for errors
    if resp.StatusCode >= 400 {
        return nil, fmt.Errorf("HTTP error! status: %d", resp.StatusCode)
    }

    // Read response
    body, err := ioutil.ReadAll(resp.Body)
    if err != nil {
        return nil, err
    }

    // Parse JSON response
    var result map[string]interface{}
    err = json.Unmarshal(body, &result)
    if err != nil {
        return nil, err
    }

    return result, nil
}

Query Parameters:

  • authorization *Specify authorization for site
    (e.g., authorization="<API-KEY>").
  • show Specify which rates to show
    (e.g., show="all"|"currency"|"crypto"|"commodity").
  • list Comma-separated list of currency codes
    (e.g., list="USD,INR,BTC").

List parameter for Currency Rates

expand_more

List parameter for Crypto Rates

expand_more

List parameter for Commodity Rates

expand_more