Multi Assets Hourly

The multi assets hourly endpoint returns values for a specific multi asset index that is calculated on an hourly basis.

The endpoint requires an API key and it requires that the symbol of the index is specified using the symbol parameter. If the limit parameter is not specified the latest value is returned. To ensure chronological ordering of the index values you should sort the values using the timestmp field. The endpoint only returns a maximum of 2000 records Example URL

Response Fields

GET https://www.vinterapi.com/api/v3/multi_assets_hourly/

This is a sample response for asset vntr-eq-5-h

Query Parameters

Headers

{
    "result": "success",
    "message": "Success",
    "data": [
        {
            "id": 167943,
            "created_at": "2022-11-18T10:00:31.546Z",
            "symbol": "vntr-eq-5-h",
            "value": 1916.04,
            "rebalance_values": [
                {
                    "value": 0.4032,
                    "symbol": "ada-usd-p-d",
                    "datetime": "2022-10-31T16:00:06.384Z",
                    "timestamp": 1667232006383
                },
                {
                    "value": 324.33,
                    "symbol": "bnb-usd-p-d",
                    "datetime": "2022-10-31T16:00:11.707Z",
                    "timestamp": 1667232011706
                },
                {
                    "value": 20363.48,
                    "symbol": "btc-usd-p-d",
                    "datetime": "2022-10-31T16:00:07.907Z",
                    "timestamp": 1667232007905
                },
                {
                    "value": 1565.25,
                    "symbol": "eth-usd-p-d",
                    "datetime": "2022-10-31T16:00:04.531Z",
                    "timestamp": 1667232002445
                },
                {
                    "value": 0.452628,
                    "symbol": "xrp-usd-p-d",
                    "datetime": "2022-10-31T16:00:07.781Z",
                    "timestamp": 1667232007780
                },
                {
                    "value": 2341.2,
                    "symbol": "vntr-eq-5-d",
                    "datetime": "2022-10-31T16:00:21.381Z",
                    "timestamp": 1667232021379
                }
            ],
            "timestamp": 1668765631545,
            "date": "2022-11-18",
            "rebalance_weights": {
                "ada-usd-p-h": 0.2,
                "bnb-usd-p-h": 0.2,
                "btc-usd-p-h": 0.2,
                "eth-usd-p-h": 0.2,
                "xrp-usd-p-h": 0.2
            },
            "current_weights": {
                "ada-usd-p-h": 0.1986187064,
                "bnb-usd-p-h": 0.2046175635,
                "btc-usd-p-h": 0.2007775648,
                "eth-usd-p-h": 0.1894596455,
                "xrp-usd-p-h": 0.2065265197
            },
            "current_values": [
                {
                    "value": 0.3277,
                    "symbol": "ada-usd-p-h",
                    "datetime": "2022-11-18T10:00:03.496486Z",
                    "timestamp": 1668765603496
                },
                {
                    "value": 271.56,
                    "symbol": "bnb-usd-p-h",
                    "datetime": "2022-11-18T10:00:31.458464Z",
                    "timestamp": 1668765631458
                },
                {
                    "value": 16730.27,
                    "symbol": "btc-usd-p-h",
                    "datetime": "2022-11-18T10:00:04.510639Z",
                    "timestamp": 1668765604510
                },
                {
                    "value": 1213.49,
                    "symbol": "eth-usd-p-h",
                    "datetime": "2022-11-18T10:00:04.911595Z",
                    "timestamp": 1668765604911
                },
                {
                    "value": 0.382519,
                    "symbol": "xrp-usd-p-h",
                    "datetime": "2022-11-18T10:00:06.238735Z",
                    "timestamp": 1668765606238
                }
            ],
            "hour": 10
        }
    ],
    "params": {
        "symbol": "vntr-eq-5-h"
    }
}

The multi-asset endpoint offers comprehensive metadata about the index. If you only require specific index data filtering, you can utilize the following code snippet below to retrieve filtered data based on specific fields.

import requests

url = "https://www.vinterapi.com/api/v3/multi_assets_hourly/?symbol=vntr-eq-5-h"
headers = {"Authorization": your_secret_api_key}
r = requests.get(url, headers=headers)
resp = r.json()

# Filter Fields
INDEX_FIELDS = [
    "id",
    "created_at",
    "value",
    "symbol",
    "timestamp",
    "date"
]

filtered_data = []

# Filter just the fields mentioned in INDEX_FIELDS
for index in resp["data"]:
    # Add it to dict
    filtered_data.append({k: index[k] for k in INDEX_FIELDS})

print(filtered_data)

Please read the following for detailed information on parameters.

Last updated