Get OHLCV candles
curl --request GET \
--url https://api.numofx.com/candlesimport requests
url = "https://api.numofx.com/candles"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.numofx.com/candles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.numofx.com/candles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.numofx.com/candles"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.numofx.com/candles")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.numofx.com/candles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"market_presentation": {
"market": "cNGN-30NOV26",
"contract_type": "<string>",
"settlement_type": "<string>",
"base_asset_symbol": "cNGN",
"quote_asset_symbol": "USDC",
"expiry_timestamp": 123,
"display_name": "cNGN-30NOV26",
"display_label": "USDC per cNGN",
"tick_size": "<string>",
"min_size": "1",
"contract_multiplier": "1000000",
"settlement_note": "<string>",
"asset_address": "<string>",
"sub_id": "<string>",
"pricing_model": "linear",
"price_semantics": "linear",
"display_price_kind": "direct",
"display_semantics": "direct",
"last_trade_timestamp": 123,
"ui_price_unit": "USDC per cNGN",
"ui_size_unit": "1,000 cNGN of notional (1,000,000 cNGN a contract)",
"ui_side_meaning": "BUY (long) gains when cNGN strengthens against USD (more USDC per cNGN); SELL (short) gains when it weakens.",
"engine_price_unit": "USDC per cNGN",
"engine_amount_unit": "1,000 cNGN of notional",
"engine_side_policy": "same_as_ui",
"ui_price_to_engine": "engine_price = ui_price",
"ui_size_to_engine": "engine_amount = ui_size (signed as ui_size x 1000000000000000: ui_size / 1000 contracts)",
"trade_module_address": "<string>",
"quote_asset_address": "<string>",
"margin_manager_address": "<string>",
"amount_scale": "1000000000000000",
"fill_band_enforced": true,
"fill_band_low": "0.000630765282229334",
"fill_band_high": "0.00074599555457997",
"future": {
"expiry_timestamp": 1796047200,
"band_status": "ok",
"updated_at": "2023-11-07T05:31:56Z",
"last_trade_time": 1796043600,
"listed": true,
"settled": true,
"trading_open": true,
"trading_closed_reason": "<string>",
"mark_price": "1377.493377719890714283",
"index_price": "1359.000000000001175535",
"band_width": "0.1",
"contract_size_usdc": "1000",
"contract_size": "1000000",
"contract_size_asset": "cNGN",
"close_only": true
}
},
"interval": "<string>",
"candles": [
{
"bucket_start": "2023-11-07T05:31:56Z",
"open": "<string>",
"high": "<string>",
"low": "<string>",
"close": "<string>",
"volume": "<string>",
"quote_volume": "<string>",
"trade_count": 123
}
]
}
Markets service
Get OHLCV candles
GET
/
candles
Get OHLCV candles
curl --request GET \
--url https://api.numofx.com/candlesimport requests
url = "https://api.numofx.com/candles"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.numofx.com/candles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.numofx.com/candles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.numofx.com/candles"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.numofx.com/candles")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.numofx.com/candles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"market_presentation": {
"market": "cNGN-30NOV26",
"contract_type": "<string>",
"settlement_type": "<string>",
"base_asset_symbol": "cNGN",
"quote_asset_symbol": "USDC",
"expiry_timestamp": 123,
"display_name": "cNGN-30NOV26",
"display_label": "USDC per cNGN",
"tick_size": "<string>",
"min_size": "1",
"contract_multiplier": "1000000",
"settlement_note": "<string>",
"asset_address": "<string>",
"sub_id": "<string>",
"pricing_model": "linear",
"price_semantics": "linear",
"display_price_kind": "direct",
"display_semantics": "direct",
"last_trade_timestamp": 123,
"ui_price_unit": "USDC per cNGN",
"ui_size_unit": "1,000 cNGN of notional (1,000,000 cNGN a contract)",
"ui_side_meaning": "BUY (long) gains when cNGN strengthens against USD (more USDC per cNGN); SELL (short) gains when it weakens.",
"engine_price_unit": "USDC per cNGN",
"engine_amount_unit": "1,000 cNGN of notional",
"engine_side_policy": "same_as_ui",
"ui_price_to_engine": "engine_price = ui_price",
"ui_size_to_engine": "engine_amount = ui_size (signed as ui_size x 1000000000000000: ui_size / 1000 contracts)",
"trade_module_address": "<string>",
"quote_asset_address": "<string>",
"margin_manager_address": "<string>",
"amount_scale": "1000000000000000",
"fill_band_enforced": true,
"fill_band_low": "0.000630765282229334",
"fill_band_high": "0.00074599555457997",
"future": {
"expiry_timestamp": 1796047200,
"band_status": "ok",
"updated_at": "2023-11-07T05:31:56Z",
"last_trade_time": 1796043600,
"listed": true,
"settled": true,
"trading_open": true,
"trading_closed_reason": "<string>",
"mark_price": "1377.493377719890714283",
"index_price": "1359.000000000001175535",
"band_width": "0.1",
"contract_size_usdc": "1000",
"contract_size": "1000000",
"contract_size_asset": "cNGN",
"close_only": true
}
},
"interval": "<string>",
"candles": [
{
"bucket_start": "2023-11-07T05:31:56Z",
"open": "<string>",
"high": "<string>",
"low": "<string>",
"close": "<string>",
"volume": "<string>",
"quote_volume": "<string>",
"trade_count": 123
}
]
}
Buckets are returned oldest first. Periods with no trades are absent, not zero-filled, so carry the previous close forward if you need a continuous axis.
Query Parameters
Was this page helpful?

