Skip to main content
GET
/
dexs
/
ohlc
/
{dex}
/
{pair}
DEX and Pair OHLC
curl --request GET \
  --url https://mainnet.gomaestro-api.org/v1/markets/dexs/ohlc/{dex}/{pair} \
  --header 'api-key: <api-key>'
import requests

url = "https://mainnet.gomaestro-api.org/v1/markets/dexs/ohlc/{dex}/{pair}"

headers = {"api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'api-key': '<api-key>'}};

fetch('https://mainnet.gomaestro-api.org/v1/markets/dexs/ohlc/{dex}/{pair}', 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://mainnet.gomaestro-api.org/v1/markets/dexs/ohlc/{dex}/{pair}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"api-key: <api-key>"
],
]);

$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://mainnet.gomaestro-api.org/v1/markets/dexs/ohlc/{dex}/{pair}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("api-key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://mainnet.gomaestro-api.org/v1/markets/dexs/ohlc/{dex}/{pair}")
.header("api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://mainnet.gomaestro-api.org/v1/markets/dexs/ohlc/{dex}/{pair}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
[
  {
    "coin_a_change_pct": 123,
    "coin_a_close": 123,
    "coin_a_high": 123,
    "coin_a_low": 123,
    "coin_a_open": 123,
    "coin_a_volume": 123,
    "coin_b_change_pct": 123,
    "coin_b_close": 123,
    "coin_b_high": 123,
    "coin_b_low": 123,
    "coin_b_open": 123,
    "coin_b_volume": 123,
    "count": 123,
    "timestamp": "<string>"
  }
]
{
"error": "Bad Request"
}
{
"error": "Bad Request"
}

Authorizations

api-key
string
header
required

Project API Key

Path Parameters

dex
string
required

minswap

pair
string
required

ADA-MIN

Query Parameters

resolution
enum<string>

1h

Available options:
1m,
5m,
15m,
30m,
1h,
4h,
1d,
1w,
1mo
from
string

2023-04-01

to
string

2023-05-15

limit
integer
default:5000

10000

Required range: 1 <= x <= 50000
sort
enum<string>

desc

Available options:
asc,
desc
carry
boolean

false

Response

OK

coin_a_change_pct
number

Coin A change percentage

coin_a_close
number

Coin A close

coin_a_high
number

Coin B high

coin_a_low
number

Coin A low

coin_a_open
number

Coin A open

coin_a_volume
number

Coin A volume

coin_b_change_pct
number

Coin B change percentage

coin_b_close
number

Coin B close

coin_b_high
number

Coin A high

coin_b_low
number

Coin B low

coin_b_open
number

Coin B open

coin_b_volume
number

Coin B volume

count
integer

Candlestick size

timestamp
string

Candlestick timestamp