# Asset Prices

Request price info in realtime. The request needs to provide a price pair for specific asset.

#### **Method**

```

GET https://api.ninjapay.me/tapi/v1/assetPrice

```

#### **Parameters**

**`pricePair?: string`** // Optional asset symbol input to get a single asset price, pass the symbol "BTC", "ETH", "SOL", "USDT"...

#### **Response**

```json
// Dont pass any body to get all three pairs.
{
    "status": true,
    "data": {
        "btc_usd": 39936, //<int>
        "eth_usd": 39936, //<int>
        "sol_usd": 39936, //<int>
        "ltc_usd": 39936, //<int>
        "usdt_usd": 1.001, //<int>
        "usdt_inr": 83.3 //<int> // When USDT is passed in body param, response will have both usdt_usd and usdt_inr price.
    },
    "message": “Pricing data”
} 
```

#### **Example**

```jsx

const options = {
  method: 'GET',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'API_KEY'
  },
  body: '{"pricePair":"BTC"}'
};

fetch('https://api.ninjapay.me/tapi/v1/assetPrice', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
  
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ninjapay.gitbook.io/ninjapay-api-docs/how-to/api-reference-btc/spot-trade/asset-prices.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
