Comment on page
OTC Buy Rates
Use this endpoint to fetch our OTC rates
Shell
JavaScript
Python
Ruby
PHP
Swift
Kotlin
1
curl --request GET \
2
--url https://lobster-app-whutt.ondigitalocean.app/otc/buy \
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://lobster-app-whutt.ondigitalocean.app/otc/buy', 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://lobster-app-whutt.ondigitalocean.app/otc/buy"
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://lobster-app-whutt.ondigitalocean.app/otc/buy")
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://lobster-app-whutt.ondigitalocean.app/otc/buy',
[
'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://lobster-app-whutt.ondigitalocean.app/otc/buy")! 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://lobster-app-whutt.ondigitalocean.app/otc/buy")
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://lobster-app-whutt.ondigitalocean.app/otc/buy")
.addHeader("accept", "application/json")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
get
https://lobster-app-whutt.ondigitalocean.app/otc/buy
Last modified 1mo ago