Hirak Currency Converter API Documentation

Rates

rates

currency exchange, retes between two currencies, ISO currency sumbol ( 3 characters ) uppercase not necessary


/{symbol1}_{symbol2}

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/hirak/{symbol1}_{symbol2}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RatesApi;

import java.io.File;
import java.util.*;

public class RatesApiExample {

    public static void main(String[] args) {
        
        RatesApi apiInstance = new RatesApi();
        String apiecoKey = apiecoKey_example; // String | 
        String symbol1 = symbol1_example; // String | Symbol 1
        String symbol2 = symbol2_example; // String | Symbol 2
        try {
            inline_response_200 result = apiInstance.rates(apiecoKey, symbol1, symbol2);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RatesApi#rates");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RatesApi;

public class RatesApiExample {

    public static void main(String[] args) {
        RatesApi apiInstance = new RatesApi();
        String apiecoKey = apiecoKey_example; // String | 
        String symbol1 = symbol1_example; // String | Symbol 1
        String symbol2 = symbol2_example; // String | Symbol 2
        try {
            inline_response_200 result = apiInstance.rates(apiecoKey, symbol1, symbol2);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RatesApi#rates");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // 
String *symbol1 = symbol1_example; // Symbol 1
String *symbol2 = symbol2_example; // Symbol 2

RatesApi *apiInstance = [[RatesApi alloc] init];

[apiInstance ratesWith:apiecoKey
    symbol1:symbol1
    symbol2:symbol2
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HirakCurrencyConverterApiDocumentation = require('hirak_currency_converter_api_documentation');

var api = new HirakCurrencyConverterApiDocumentation.RatesApi()

var apiecoKey = apiecoKey_example; // {String} 

var symbol1 = symbol1_example; // {String} Symbol 1

var symbol2 = symbol2_example; // {String} Symbol 2


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.rates(apiecoKey, symbol1, symbol2, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class ratesExample
    {
        public void main()
        {
            
            var apiInstance = new RatesApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var symbol1 = symbol1_example;  // String | Symbol 1
            var symbol2 = symbol2_example;  // String | Symbol 2

            try
            {
                inline_response_200 result = apiInstance.rates(apiecoKey, symbol1, symbol2);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RatesApi.rates: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\RatesApi();
$apiecoKey = apiecoKey_example; // String | 
$symbol1 = symbol1_example; // String | Symbol 1
$symbol2 = symbol2_example; // String | Symbol 2

try {
    $result = $api_instance->rates($apiecoKey, $symbol1, $symbol2);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RatesApi->rates: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RatesApi;

my $api_instance = WWW::SwaggerClient::RatesApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $symbol1 = symbol1_example; # String | Symbol 1
my $symbol2 = symbol2_example; # String | Symbol 2

eval { 
    my $result = $api_instance->rates(apiecoKey => $apiecoKey, symbol1 => $symbol1, symbol2 => $symbol2);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RatesApi->rates: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RatesApi()
apiecoKey = apiecoKey_example # String | 
symbol1 = symbol1_example # String | Symbol 1
symbol2 = symbol2_example # String | Symbol 2

try: 
    api_response = api_instance.rates(apiecoKey, symbol1, symbol2)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RatesApi->rates: %s\n" % e)

Parameters

Path parameters
Name Description
symbol1*
String
Symbol 1
Required
symbol2*
String
Symbol 2
Required
Header parameters
Name Description
apieco-key*
String
Required

Responses

Status: 200 - successful