> ## Documentation Index
> Fetch the complete documentation index at: https://docs.daya.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Last Price

> Get the latest trade price and 24h change for a trading pair

## 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

<ParamField path="symbol" type="string" required>
  Trading pair symbol

  **Example:** `USDT-NGN`

  **Allowed values:** `USDT-NGN`, `USDC-NGN`, `USD-NGN`
</ParamField>

## Request Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl --request GET \
    --url https://api.pro.daya.co/public/v1/last-price/USDT-NGN
  ```

  ```javascript JavaScript theme={null}
  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);
  ```

  ```python Python theme={null}
  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']}")
  ```

  ```go Go theme={null}
  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"])
  }
  ```
</CodeGroup>

## Response

<ResponseField name="success" type="boolean" required>
  Indicates if the request was successful
</ResponseField>

<ResponseField name="message" type="string" required>
  Human-readable response message
</ResponseField>

<ResponseField name="data" type="object" required>
  Last price data

  <Expandable title="data properties">
    <ResponseField name="symbol" type="string">
      Trading pair symbol

      **Example:** `USD-NGN`
    </ResponseField>

    <ResponseField name="price" type="number">
      Most recent trade price

      **Example:** `1545.50`
    </ResponseField>

    <ResponseField name="change_24h" type="number">
      Price change over the last 24 hours as a percentage

      **Example:** `0.35`
    </ResponseField>
  </Expandable>
</ResponseField>

### Success Response

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "success": true,
    "message": "Last price retrieved successfully",
    "data": {
      "symbol": "USD-NGN",
      "price": 1545.50,
      "change_24h": 0.35
    }
  }
  ```
</ResponseExample>

## Error Responses

<ResponseExample>
  ```json 404 Not Found theme={null}
  {
    "success": false,
    "message": "Market not found",
    "error": {
      "code": "SYMBOL_NOT_FOUND",
      "message": "Market not found"
    }
  }
  ```
</ResponseExample>

## Notes

* The price reflects the most recent executed trade on the market.
* The `change_24h` value 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

<CardGroup cols={2}>
  <Card title="Get Orderbook" icon="book" href="/pro/api-reference/get-orderbook">
    View market depth for a trading pair
  </Card>

  <Card title="List Market Trades" icon="clock-rotate-left" href="/pro/api-reference/list-market-trades">
    View recent trades for a market
  </Card>
</CardGroup>
