NGNC Bridge
Search
K

NGNC - USDC Rates

Use this endpoint to fetch our ngnc - usdc rates
Shell
JavaScript
Python
Ruby
PHP
Swift
Kotlin
1
curl --request GET \
2
--url https://api.ngnc.online/rates/v1/ngnc-usdc \
3
--header 'accept: application/json' \
4
--header 'content-type: application/json' \
5
--header 'ngnc-sec-key: NGNC_SECRET_KEY' \
1
const options = {
2
method: 'GET',
3
headers: {
4
accept: 'application/json',
5
'content-type': 'application/json',
6
'ngnc-sec-key': 'NGNC_SECRET_KEY',
7
},
8
9
};
10
11
fetch('https://api.ngnc.online/rates/v1/ngnc-usdc', options)
12
.then(response => response.json())
13
.then(response => console.log(response))
14
.catch(err => console.error(err));
1
2
import requests
3
4
url = "https://api.ngnc.online/rates/v1/ngnc-usdc"
5
6
headers = {
7
"accept": "application/json",
8
"content-type": "application/json",
9
"ngnc-sec-key": "NGNC_SECRET_KEY"
10
}
11
12
response = requests.get(url, json=payload, headers=headers)
13
14
print(response.text)
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.ngnc.online/rates/v1/ngnc-usdc")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["ngnc-sec-key"] = 'NGNC_SECRET_KEY'
request["content-type"] = 'application/json'
response = http.request(request)
puts response.read_body
<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://api.ngnc.online/rates/v1/ngnc-usdc',
[
'headers' => [
'accept' => 'application/json',
'ngnc-sec-key' => 'NGNC_SECRET_KEY',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
import Foundation
let headers = [
"accept": "application/json",
"ngnc-sec-key": "NGNC_SECRET_KEY",
"content-type": "application/json"
]
let fetchData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.ngnc.online/rates/v1/ngnc-usdc")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
require 'net/http'
require 'openssl'
url = URI("https://api.ngnc.online/rates/v1/ngnc-usdc")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["ngnc-sec-key"] = 'NGNC_SECRET_KEY'
request["content-type"] = 'application/json'
response = http.request(request)
puts response.read_bod\":\"string\"}")
val request = Request.Builder()
.url("https://api.ngnc.online/rates/v1/ngnc-usdc")
.addHeader("accept", "application/json")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
get
https://api.ngnc.online/rates/v1/ngnc-usdc