1 curl --request GET \
2 --url https://api-sandbox.poweredbyibex.io/v2/currencies/rate/2/3 \
3 --header 'Authorization: eyJhbGc...rOM-UE' \
4 --header 'accept: application/json'
1 const sdk = require('api')('@sing-in/v1.0#eunzr16lr5s5jiu');
2
3 sdk.auth('eyJhbGc...rOM-UE');
4 sdk.getRatesV2({primary_currency_id: '2', secondary_currency_id: '3'})
5 .then(({ data }) => console.log(data))
6 .catch(err => console.error(err));
1 require 'uri'
2 require 'net/http'
3
4 url = URI("https://api-sandbox.poweredbyibex.io/v2/currencies/rate/2/3")
5
6 http = Net::HTTP.new(url.host, url.port)
7 http.use_ssl = true
8
9 request = Net::HTTP::Get.new(url)
10 request["accept"] = 'application/json'
11 request["Authorization"] = 'eyJhbGc...rOM-UE'
12
13 response = http.request(request)
14 puts response.read_body
1 <?php
2 require_once('vendor/autoload.php');
3
4 $client = new \GuzzleHttp\Client();
5
6 $response = $client->request('GET', 'https://api-sandbox.poweredbyibex.io/v2/currencies/rate/2/3', [
7 'headers' => [
8 'Authorization' => 'eyJhbGc...rOM-UE',
9 'accept' => 'application/json',
10 ],
11 ]);
12
13 echo $response->getBody();
1 import requests
2
3 url = "https://api-sandbox.poweredbyibex.io/v2/currencies/rate/2/3"
4
5 headers = {
6 "accept": "application/json",
7 "Authorization": "eyJhbGc...rOM-UE"
8 }
9
10 response = requests.get(url, headers=headers)
11
12 print(response.text)
1 CURL *hnd = curl_easy_init();
2
3 curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
4 curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
5 curl_easy_setopt(hnd, CURLOPT_URL, "https://api-sandbox.poweredbyibex.io/v2/currencies/rate/2/3");
6
7 struct curl_slist *headers = NULL;
8 headers = curl_slist_append(headers, "accept: application/json");
9 headers = curl_slist_append(headers, "Authorization: eyJhbGc...rOM-UE");
10 curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
11
12 CURLcode ret = curl_easy_perform(hnd);
1 using RestSharp;
2
3
4 var options = new RestClientOptions("https://api-sandbox.poweredbyibex.io/v2/currencies/rate/2/3");
5 var client = new RestClient(options);
6 var request = new RestRequest("");
7 request.AddHeader("accept", "application/json");
8 request.AddHeader("Authorization", "eyJhbGc...rOM-UE");
9 var response = await client.GetAsync(request);
10
11 Console.WriteLine("{0}", response.Content);
1 CURL *hnd = curl_easy_init();
2
3 curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
4 curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
5 curl_easy_setopt(hnd, CURLOPT_URL, "https://api-sandbox.poweredbyibex.io/v2/currencies/rate/2/3");
6
7 struct curl_slist *headers = NULL;
8 headers = curl_slist_append(headers, "accept: application/json");
9 headers = curl_slist_append(headers, "Authorization: eyJhbGc...rOM-UE");
10 curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
11
12 CURLcode ret = curl_easy_perform(hnd);
1 (require '[clj-http.client :as client])
2
3 (client/get "https://api-sandbox.poweredbyibex.io/v2/currencies/rate/2/3" {:headers {:Authorization "eyJhbGc...rOM-UE"}
4 :accept :json})
1 package main
2
3 import (
4 "fmt"
5 "net/http"
6 "io"
7
8
9 func main() {
10
11 url := "https://api-sandbox.poweredbyibex.io/v2/currencies/rate/2/3"
12
13 req, _ := http.NewRequest("GET", url, nil)
14
15 req.Header.Add("accept", "application/json")
16 req.Header.Add("content-type", "application/json")
17
18 res, _ := http.DefaultClient.Do(req)
19
20 defer res.Body.Close()
21 body, _ := io.ReadAll(res.Body)
22
23 fmt.Println(string(body))
24
25 }
1 GET /currency/all HTTP/1.1
2 Accept: application/json
3 Host: api-sandbox.poweredbyibex.io
1 OkHttpClient client = new OkHttpClient();
2
3 Request request = new Request.Builder()
4 .url("https://api-sandbox.poweredbyibex.io/v2/currencies/rate/2/3")
5 .get()
6 .addHeader("accept", "application/json")
7 .addHeader("Authorization", "eyJhbGc...rOM-UE")
8 .build();
9
10 Response response = client.newCall(request).execute();
1 No JSON body
1 val client = OkHttpClient()
2
3 val request = Request.Builder()
4 .url("https://api-sandbox.poweredbyibex.io/v2/currencies/rate/2/3")
5 .get()
6 .addHeader("accept", "application/json")
7 .addHeader("Authorization", "eyJhbGc...rOM-UE")
8 .build()
9
10 val response = client.newCall(request).execute()
1 #import <Foundation/Foundation.h>
2
3 NSDictionary *headers = @{ @"accept": @"application/json",
4 @"Authorization": @"eyJhbGc...rOM-UE" };
5
6 NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api-sandbox.poweredbyibex.io/v2/currencies/rate/2/3"]
7 cachePolicy:NSURLRequestUseProtocolCachePolicy
8 timeoutInterval:10.0];
9 [request setHTTPMethod:@"GET"];
10 [request setAllHTTPHeaderFields:headers];
1 open Cohttp_lwt_unix
2 open Cohttp
3 open Lwt
4
5 let uri = Uri.of_string "https://api-sandbox.poweredbyibex.io/v2/currencies/rate/2/3" in
6 let headers = Header.add_list (Header.init ()) [
7 ("accept", "application/json");
8 ("Authorization", "eyJhbGc...rOM-UE");
9 ] in
10
11 Client.call ~headers `GET uri
12 >>= fun (res, body_stream) ->
13 (* Do stuff with the result *)
1 $headers=@{}
2 $headers.Add("accept", "application/json")
3 $headers.Add("Authorization", "eyJhbGc...rOM-UE")
4 $response = Invoke-WebRequest -Uri 'https://api-sandbox.poweredbyibex.io/v2/currencies/rate/2/3' -Method GET -Headers $headers
1 library(httr)
2
3 url <- "https://api-sandbox.poweredbyibex.io/v2/currencies/rate/2/3"
4
5 response <- VERB("GET", url, add_headers('Authorization' = 'eyJhbGc...rOM-UE'), content_type("application/octet-stream"), accept("application/json"))
6
7 content(response, "text")
1 import Foundation
2
3 let headers = [
4 "accept": "application/json",
5 "Authorization": "eyJhbGc...rOM-UE"
6 ]
7
8 let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.poweredbyibex.io/v2/currencies/rate/2/3")! as URL,
9 cachePolicy: .useProtocolCachePolicy,
10 timeoutInterval: 10.0)
11 request.httpMethod = "GET"
12 request.allHTTPHeaderFields = headers
13
14 let session = URLSession.shared
15 let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
16 if (error != nil) {
17 print(error as Any)
18 } else {
19 let httpResponse = response as? HTTPURLResponse
20 print(httpResponse)
21 }
22 })
23
24 dataTask.resume()