# Principal market price

## What is this endpoint for?

This endpoint returns principal market value prices for crypto assets, helping with financial reporting under US-GAAP (FASB ASC 820), IFRS, and other major accounting frameworks.\
\
It determines the principal market using [Kaiko's Exchange Ranking](https://www.kaiko.com/indices/exchange-ranking) —  a proprietary ranking of cryptocurrency exchanges based on criteria, including regulatory compliance, security, transparency and data quality — to determine the 20 eligible exchanges. Among these exchanges, the principal market is chosen based on the highest 2-week rolling average USD trading volume for the chosen asset.

### Endpoint

{% code overflow="wrap" %}

```http
https://us.market-api.kaiko.io/v2/data/trades.v1/principal_market_value
```

{% endcode %}

### Query parameters

<table><thead><tr><th width="203">Parameter	</th><th width="106" data-type="checkbox">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>asset</code></td><td>true</td><td>The desired base asset <code>code</code></td></tr><tr><td><code>end_time</code></td><td>false</td><td>Ending time in ISO 8601 (exclusive)<br><br><em>Automatically included in continuation tokens.</em><br><br>Note: data is for the current quarter only.</td></tr></tbody></table>

### Fields

<table><thead><tr><th width="283">Field</th><th>Description</th></tr></thead><tbody><tr><td><code>timestamp</code></td><td>The time at which the value was calculated.</td></tr><tr><td><code>price</code></td><td>The Principal Market Value. Price represented in <code>USD</code>.</td></tr><tr><td><code>last_trade_timestamp</code></td><td>Timestamp of the trade corresponding to the Principal Market Value.</td></tr><tr><td><code>principal_market_name</code></td><td>Exchange name in which the trade has been executed, i.e. “principal market”.</td></tr><tr><td><code>principal_market_code</code></td><td>Exchange code in which the trade was executed, i.e. “principal market”.</td></tr><tr><td><code>adtv_2w</code></td><td>The two week average daily trading volume of the principal market (in base asset)</td></tr><tr><td><code>total_adtv_2w</code></td><td>The two week average daily trading volume among the eligible exchanges (in base asset)</td></tr></tbody></table>

### Request examples

{% tabs %}
{% tab title="cURL" %}
{% code overflow="wrap" %}

```url
curl --compressed -H 'Accept: application/json' -H 'X-Api-Key: <client-api-key>' \
  'https://us.market-api.kaiko.io/v2/data/trades.v1/principal_market_value?end_time=2025-09-09T15:00:00.000Z&asset=btc'
```

{% endcode %}
{% endtab %}

{% tab title="Python" %}
{% code overflow="wrap" %}

```python
##### 1. Import dependencies #####

import requests
import pandas as pd

##### 2. Choose the value of the query's parameters #####

# ---- Required parameters ---- #
asset = "btc"

# ---- Optional parameters ---- #
end_time = "2025-09-09T15:00:00.000Z"

# ---- API key configuration ---- #
api_key = "YOUR_API_KEY"

##### 3. Get the data #####

# ---- Function to run an API call ---- #
# Get the data in a dataframe --------- #

def get_kaiko_data(api_key: str, asset: str, end_time: str = None):
    headers = {'Accept': 'application/json', 'X-Api-Key': api_key}
    url = f'https://us.market-api.kaiko.io/v2/data/trades.v1/principal_market_value'
    
    params = {
        "asset": asset,
        "end_time": end_time
    }
    
    try:
        res = requests.get(url, headers=headers, params=params)
        res.raise_for_status()
        data = res.json()
        
        if 'data' not in data:
            print("No data returned.")
            return pd.DataFrame()
        
        df = pd.DataFrame(data['data'])
        
        # Handle pagination with continuation token
        while 'next_url' in data:
            next_url = data['next_url']
            if next_url is None:
                break
            
            res = requests.get(next_url, headers=headers)
            res.raise_for_status()
            data = res.json()
            
            if 'data' in data:
                df = pd.concat([df, pd.DataFrame(data['data'])], ignore_index=True)
        
        return df
        
    except requests.exceptions.RequestException as e:
        print(f"API request error: {e}")
        return pd.DataFrame()

# ---- Get the data ---- #
df = get_kaiko_data(api_key=api_key, asset=asset, end_time=end_time)
print(df)
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Response example

```json
{
    "query": {
        "end_time": "2025-09-09T15:00:00Z",
        "asset": "btc",
        "data_version": "v1",
        "commodity": "principal_market_value",
        "request_time": "2025-09-15T13:00:08.391Z",
        "end_timestamp": 1757430000000
    },
    "time": "2025-09-15T13:00:08.494Z",
    "timestamp": 1757941208494,
    "data": [
        {
            "timestamp": 1757430000000,
            "last_trade_timestamp": 1757429999945,
            "price": 111764,
            "principal_market_name": "CRCO",
            "principal_market_code": "crco",
            "adtv_2w": 8135.835284285715,
            "total_adtv_2w": 16893.05731083857
        }
    ],
    "result": "success",
    "access": {
        "access_range": {
            "start_timestamp": 1454284800000,
            "end_timestamp": 1877896800000
        },
        "data_range": {
            "start_timestamp": 1454281200000,
            "end_timestamp": 1877896800000
        }
    }
}
```


---

# 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://docs.kaiko.com/rest-api/analytics-solutions/kaiko-fair-market-value/established-assets/principal-market-price.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.
