Get Last Price
curl --request GET \
--url https://api.pro.daya.co/public/v1/last-price/{symbol}import requests
url = "https://api.pro.daya.co/public/v1/last-price/{symbol}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.pro.daya.co/public/v1/last-price/{symbol}', 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.pro.daya.co/public/v1/last-price/{symbol}",
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.pro.daya.co/public/v1/last-price/{symbol}"
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.pro.daya.co/public/v1/last-price/{symbol}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pro.daya.co/public/v1/last-price/{symbol}")
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{
"success": true,
"message": "Last price retrieved successfully",
"data": {
"symbol": "USD-NGN",
"price": 1545.50,
"change_24h": 0.35
}
}
Markets
Get Last Price
Get the latest trade price and 24h change for a trading pair
GET
/
public
/
v1
/
last-price
/
{symbol}
Get Last Price
curl --request GET \
--url https://api.pro.daya.co/public/v1/last-price/{symbol}import requests
url = "https://api.pro.daya.co/public/v1/last-price/{symbol}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.pro.daya.co/public/v1/last-price/{symbol}', 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.pro.daya.co/public/v1/last-price/{symbol}",
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.pro.daya.co/public/v1/last-price/{symbol}"
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.pro.daya.co/public/v1/last-price/{symbol}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pro.daya.co/public/v1/last-price/{symbol}")
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{
"success": true,
"message": "Last price retrieved successfully",
"data": {
"symbol": "USD-NGN",
"price": 1545.50,
"change_24h": 0.35
}
}
Overview
Get the most recent trade price for a specific trading pair, along with the 24-hour price change. This endpoint does not require authentication.Path Parameters
string
required
Trading pair symbolExample:
USDT-NGNAllowed values: USDT-NGN, USDC-NGN, USD-NGNRequest Examples
curl --request GET \
--url https://api.pro.daya.co/public/v1/last-price/USDT-NGN
const response = await fetch(
'https://api.pro.daya.co/public/v1/last-price/USDT-NGN'
);
const data = await response.json();
console.log('Price:', data.data.price);
console.log('24h change:', data.data.change_24h);
import requests
response = requests.get('https://api.pro.daya.co/public/v1/last-price/USDT-NGN')
data = response.json()
print(f"Price: {data['data']['price']}")
print(f"24h change: {data['data']['change_24h']}")
package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
resp, err := http.Get("https://api.pro.daya.co/public/v1/last-price/USDT-NGN")
if err != nil {
panic(err)
}
defer resp.Body.Close()
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
data := result["data"].(map[string]interface{})
fmt.Println("Price:", data["price"])
fmt.Println("24h change:", data["change_24h"])
}
Response
boolean
required
Indicates if the request was successful
string
required
Human-readable response message
object
required
Success Response
{
"success": true,
"message": "Last price retrieved successfully",
"data": {
"symbol": "USD-NGN",
"price": 1545.50,
"change_24h": 0.35
}
}
Error Responses
{
"success": false,
"message": "Market not found",
"error": {
"code": "SYMBOL_NOT_FOUND",
"message": "Market not found"
}
}
Notes
- The price reflects the most recent executed trade on the market.
- The
change_24hvalue is calculated by comparing the latest trade price to the most recent trade price from 24 hours ago. A positive value indicates the price has increased. - If no trades have occurred, the price and change values may be
0.
Rate Limits
- 100 requests per minute per IP address
- No authentication required
Next Steps
Get Orderbook
View market depth for a trading pair
List Market Trades
View recent trades for a market