Assets Price API

Fetches and aggregates token prices from multiple sources.
Agent Icon
AGENT ID
ticker
PROVIDES
queries
NETWORKS
N/A
The Assets Price API aggregates prices from trusted sources such as CoinGecko and Binance to deliver reliable, averaged price information.
Note

Assets Price API is currently only available in the pre-production environment. To get started, please see Get an API key .

Query Parameters

Parameter Description Required
op The query operation. See Query Operations . yes
criteria The critaria of the query operation. no

Operations

Get All Prices

Operation: prices

Example arguments:

{
  "pagination": {
    "limit": 50
  },
  "op":"prices"
}

Example arguments filtering by source:

{
  "pagination": {
    "limit": 50
  },
  "op":"prices",
  "criteria": {
    "sources": ["coingecko"]
  }
}

Get Prices by Ticker

Operation: prices.by_ticker

Example arguments:

{
  "op":"prices.by_ticker",
  "criteria": [
    {
      "ticker": "DOT",
      "sources": ["binance"]
    },
    {
      "ticker": "GLMR"
    },
    {
      "ticker": "HDX"
    }
  ]
}

Get Prices by Asset

Operation: prices.by_asset

Example arguments:

{
  "op":"prices.by_asset",
  "criteria": [
    {
      "chainId": "urn:ocn:polkadot:0",
      "assetId": "native",
      "sources": ["binance"]
    },
    {
      "chainId": "urn:ocn:ethereum:1",
      "assetId": "native",
    },
    {
      "chainId": "urn:ocn:polkadot:2030",
      "assetId": {
         "type": "VToken2",
         "value": 0,
      },
    }
  ]
}

List Supported Tickers and Assets IDs

Operation: tickers.list

Example arguments:

{
  "op":"tickers.list"
}

List Supported Sources

Operation: sources.list

Example arguments:

{
  "op":"sources.list"
}

Examples

Curl Requests

Get prices of all supported assets

Request
Get Prices Request
curl \
  'https://dev-api.ocelloids.net/query/ticker' \
  -H "Authorization: Bearer ${OC_API_KEY}" \
  -H 'accept: application/json' \
  -H 'content-type: application/json' \
  -d '{
  "args":{
    "op":"prices"
  }
}'
Response
{
  "items": [
    {
      "ticker": "DOT",
      "asset": {
        "chainId": "urn:ocn:polkadot:0",
        "assetId": "native"
      },
      "aggregatedPrice": 4.508,
      "updated": 1748534086273,
      "sources": [
        {
          "name": "binance",
          "sourcePrice": 4.506
        },
        {
          "name": "coingecko",
          "sourcePrice": 4.51
        }
      ]
    },
    {
      "ticker": "ETH",
      "asset": {
        "chainId": "urn:ocn:ethereum:1",
        "assetId": "native"
      },
      "aggregatedPrice": 2650.8500000000004,
      "updated": 1748534086273,
      "sources": [
        {
          "name": "binance",
          "sourcePrice": 2648.67
        },
        {
          "name": "coingecko",
          "sourcePrice": 2653.03
        }
      ]
    },
    {
      "ticker": "WETH",
      "asset": [
        {
          "chainId": "urn:ocn:ethereum:1",
          "assetId": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
        },
        {
          "chainId": "urn:ocn:polkadot:2004",
          "assetId": "0xab3f0245B83feB11d15AAffeFD7AD465a59817eD"
        }
      ],
      "aggregatedPrice": 2653.14,
      "updated": 1748534077990,
      "sources": [
        {
          "name": "coingecko",
          "sourcePrice": 2653.14
        }
      ]
    },
    {
      "ticker": "WBTC",
      "asset": [
        {
          "chainId": "urn:ocn:ethereum:1",
          "assetId": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599"
        },
        {
          "chainId": "urn:ocn:polkadot:2004",
          "assetId": "0xE57eBd2d67B462E9926e04a8e33f01cD0D64346D"
        }
      ],
      "aggregatedPrice": 107184.215,
      "updated": 1748534086273,
      "sources": [
        {
          "name": "binance",
          "sourcePrice": 107121.43
        },
        {
          "name": "coingecko",
          "sourcePrice": 107247
        }
      ]
    },
    {
      "ticker": "DAI",
      "asset": [
        {
          "chainId": "urn:ocn:ethereum:1",
          "assetId": "0x6b175474e89094c44da98b954eedeac495271d0f"
        },
        {
          "chainId": "urn:ocn:polkadot:2004",
          "assetId": "0x06e605775296e851ff43b4daa541bb0984e9d6fd"
        }
      ],
      "aggregatedPrice": 0.499983,
      "updated": 1748534086273,
      "sources": [
        {
          "name": "binance",
          "sourcePrice": 0
        },
        {
          "name": "coingecko",
          "sourcePrice": 0.999966
        }
      ]
    },
    {
      "ticker": "TBTC",
      "asset": {
        "chainId": "urn:ocn:ethereum:1",
        "assetId": "0x18084fba666a33d37592fa2633fd49a74dd93a88"
      },
      "aggregatedPrice": 107348,
      "updated": 1748534078727,
      "sources": [
        {
          "name": "coingecko",
          "sourcePrice": 107348
        }
      ]
    },
    {
      "ticker": "LINK",
      "asset": {
        "chainId": "urn:ocn:ethereum:1",
        "assetId": "0x514910771af9ca656af840dff83e8264ecf986ca"
      },
      "aggregatedPrice": 15.39,
      "updated": 1748534086273,
      "sources": [
        {
          "name": "binance",
          "sourcePrice": 15.37
        },
        {
          "name": "coingecko",
          "sourcePrice": 15.41
        }
      ]
    },
    {
      "ticker": "SKY",
      "asset": {
        "chainId": "urn:ocn:ethereum:1",
        "assetId": "0x56072c95faa701256059aa122697b133aded9279"
      },
      "aggregatedPrice": 0.069739,
      "updated": 1748534082195,
      "sources": [
        {
          "name": "coingecko",
          "sourcePrice": 0.069739
        }
      ]
    },
    {
      "ticker": "AAVE",
      "asset": {
        "chainId": "urn:ocn:ethereum:1",
        "assetId": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"
      },
      "aggregatedPrice": 255.62,
      "updated": 1748534086273,
      "sources": [
        {
          "name": "binance",
          "sourcePrice": 255.49
        },
        {
          "name": "coingecko",
          "sourcePrice": 255.75
        }
      ]
    },
    {
      "ticker": "LBTC",
      "asset": {
        "chainId": "urn:ocn:ethereum:1",
        "assetId": "0x8236a87084f8b84306f72007f36f2618a5634494"
      },
      "aggregatedPrice": 107205,
      "updated": 1748534083974,
      "sources": [
        {
          "name": "coingecko",
          "sourcePrice": 107205
        }
      ]
    },
    {
      "ticker": "GLMR",
      "asset": {
        "chainId": "urn:ocn:polkadot:2004",
        "assetId": "native"
      },
      "aggregatedPrice": 0.08836150000000001,
      "updated": 1748534086273,
      "sources": [
        {
          "name": "binance",
          "sourcePrice": 0.0883
        },
        {
          "name": "coingecko",
          "sourcePrice": 0.088423
        }
      ]
    },
    {
      "ticker": "ASTR",
      "asset": {
        "chainId": "urn:ocn:polkadot:2006",
        "assetId": "native"
      },
      "aggregatedPrice": 0.028566485,
      "updated": 1748534086273,
      "sources": [
        {
          "name": "binance",
          "sourcePrice": 0.02855
        },
        {
          "name": "coingecko",
          "sourcePrice": 0.02858297
        }
      ]
    },
    {
      "ticker": "ACA",
      "asset": {
        "chainId": "urn:ocn:polkadot:2000",
        "assetId": "native"
      },
      "aggregatedPrice": 0.0305,
      "updated": 1748534086273,
      "sources": [
        {
          "name": "binance",
          "sourcePrice": 0.0305
        }
      ]
    },
    {
      "ticker": "BNC",
      "asset": [
        {
          "chainId": "urn:ocn:polkadot:2030",
          "assetId": "native"
        },
        {
          "chainId": "urn:ocn:polkadot:2030",
          "assetId": "native:BNC"
        }
      ],
      "aggregatedPrice": 0.151365,
      "updated": 1748534075178,
      "sources": [
        {
          "name": "coingecko",
          "sourcePrice": 0.151365
        }
      ]
    },
    {
      "ticker": "HDX",
      "asset": [
        {
          "chainId": "urn:ocn:polkadot:2034",
          "assetId": "native"
        },
        {
          "chainId": "urn:ocn:polkadot:2034",
          "assetId": 0
        }
      ],
      "aggregatedPrice": 0.01240448,
      "updated": 1748534075896,
      "sources": [
        {
          "name": "coingecko",
          "sourcePrice": 0.01240448
        }
      ]
    },
    {
      "ticker": "MYTH",
      "asset": {
        "chainId": "urn:ocn:polkadot:3369",
        "assetId": "native"
      },
      "aggregatedPrice": 0.15646,
      "updated": 1748534076363,
      "sources": [
        {
          "name": "coingecko",
          "sourcePrice": 0.15646
        }
      ]
    },
    {
      "ticker": "CFG",
      "asset": {
        "chainId": "urn:ocn:polkadot:2031",
        "assetId": "native"
      },
      "aggregatedPrice": 0.218592,
      "updated": 1748534076353,
      "sources": [
        {
          "name": "coingecko",
          "sourcePrice": 0.218592
        }
      ]
    },
    {
      "ticker": "PHA",
      "asset": {
        "chainId": "urn:ocn:polkadot:2035",
        "assetId": "native"
      },
      "aggregatedPrice": 0.13604100000000002,
      "updated": 1748534086273,
      "sources": [
        {
          "name": "binance",
          "sourcePrice": 0.136
        },
        {
          "name": "coingecko",
          "sourcePrice": 0.136082
        }
      ]
    },
    {
      "ticker": "USDT",
      "asset": [
        {
          "chainId": "urn:ocn:polkadot:1000",
          "assetId": "1984"
        },
        {
          "chainId": "urn:ocn:polkadot:2004",
          "assetId": "0xc30E9cA94CF52f3Bf5692aaCF81353a27052c46f"
        }
      ],
      "aggregatedPrice": 1,
      "updated": 1748534079585,
      "sources": [
        {
          "name": "coingecko",
          "sourcePrice": 1
        }
      ]
    },
    {
      "ticker": "USDC",
      "asset": [
        {
          "chainId": "urn:ocn:polkadot:1000",
          "assetId": "1337"
        },
        {
          "chainId": "urn:ocn:polkadot:2004",
          "assetId": "0x931715fee2d06333043d11f658c8ce934ac61d0c"
        }
      ],
      "aggregatedPrice": 0.9996965,
      "updated": 1748534086273,
      "sources": [
        {
          "name": "binance",
          "sourcePrice": 0.9996
        },
        {
          "name": "coingecko",
          "sourcePrice": 0.999793
        }
      ]
    },
    {
      "ticker": "VDOT",
      "asset": {
        "chainId": "urn:ocn:polkadot:2030",
        "assetId": {
          "type": "VToken2",
          "value": 0
        }
      },
      "aggregatedPrice": 6.74,
      "updated": 1748533971679,
      "sources": [
        {
          "name": "coingecko",
          "sourcePrice": 6.74
        }
      ]
    },
    {
      "ticker": "VASTR",
      "asset": {
        "chainId": "urn:ocn:polkadot:2030",
        "assetId": {
          "type": "VToken2",
          "value": 3
        }
      },
      "aggregatedPrice": 0.03571494,
      "updated": 1748533922679,
      "sources": [
        {
          "name": "coingecko",
          "sourcePrice": 0.03571494
        }
      ]
    },
    {
      "ticker": "VGLMR",
      "asset": {
        "chainId": "urn:ocn:polkadot:2030",
        "assetId": {
          "type": "VToken2",
          "value": 1
        }
      },
      "aggregatedPrice": 0.115236,
      "updated": 1748482021937,
      "sources": [
        {
          "name": "coingecko",
          "sourcePrice": 0.115236
        }
      ]
    },
    {
      "ticker": "VMANTA",
      "asset": {
        "chainId": "urn:ocn:polkadot:2030",
        "assetId": {
          "type": "VToken2",
          "value": 8
        }
      },
      "aggregatedPrice": 0.482475,
      "updated": 1748534038765,
      "sources": [
        {
          "name": "coingecko",
          "sourcePrice": 0.482475
        }
      ]
    },
    {
      "ticker": "KSM",
      "asset": {
        "chainId": "urn:ocn:kusama:0",
        "assetId": "native"
      },
      "aggregatedPrice": 18.06,
      "updated": 1748534086273,
      "sources": [
        {
          "name": "binance",
          "sourcePrice": 18.04
        },
        {
          "name": "coingecko",
          "sourcePrice": 18.08
        }
      ]
    }
  ]
}

List all supported assets

Request
List Assets Request
curl \
  'https://api.ocelloids.net/query/steward' \
  -H "Authorization: Bearer ${OC_API_KEY}" \
  -H 'accept: application/json' \
  -H 'content-type: application/json' \
  -d '{
  "args":{
    "op":"tickers.list",
  }
}'
Response
{
  "items": [
    {
      "ticker": "DOT",
      "asset": {
        "chainId": "urn:ocn:polkadot:0",
        "assetId": "native"
      }
    },
    {
      "ticker": "ETH",
      "asset": {
        "chainId": "urn:ocn:ethereum:1",
        "assetId": "native"
      }
    },
    {
      "ticker": "WETH",
      "asset": [
        {
          "chainId": "urn:ocn:ethereum:1",
          "assetId": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
        },
        {
          "chainId": "urn:ocn:polkadot:2004",
          "assetId": "0xab3f0245B83feB11d15AAffeFD7AD465a59817eD"
        }
      ]
    },
    {
      "ticker": "WBTC",
      "asset": [
        {
          "chainId": "urn:ocn:ethereum:1",
          "assetId": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599"
        },
        {
          "chainId": "urn:ocn:polkadot:2004",
          "assetId": "0xE57eBd2d67B462E9926e04a8e33f01cD0D64346D"
        }
      ]
    },
    {
      "ticker": "DAI",
      "asset": [
        {
          "chainId": "urn:ocn:ethereum:1",
          "assetId": "0x6b175474e89094c44da98b954eedeac495271d0f"
        },
        {
          "chainId": "urn:ocn:polkadot:2004",
          "assetId": "0x06e605775296e851ff43b4daa541bb0984e9d6fd"
        }
      ]
    },
    {
      "ticker": "TBTC",
      "asset": {
        "chainId": "urn:ocn:ethereum:1",
        "assetId": "0x18084fba666a33d37592fa2633fd49a74dd93a88"
      }
    },
    {
      "ticker": "LINK",
      "asset": {
        "chainId": "urn:ocn:ethereum:1",
        "assetId": "0x514910771af9ca656af840dff83e8264ecf986ca"
      }
    },
    {
      "ticker": "SKY",
      "asset": {
        "chainId": "urn:ocn:ethereum:1",
        "assetId": "0x56072c95faa701256059aa122697b133aded9279"
      }
    },
    {
      "ticker": "LIDO",
      "asset": {
        "chainId": "urn:ocn:ethereum:1",
        "assetId": "0x5a98fcbea516cf06857215779fd812ca3bef1b32"
      }
    },
    {
      "ticker": "AAVE",
      "asset": {
        "chainId": "urn:ocn:ethereum:1",
        "assetId": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"
      }
    },
    {
      "ticker": "LBTC",
      "asset": {
        "chainId": "urn:ocn:ethereum:1",
        "assetId": "0x8236a87084f8b84306f72007f36f2618a5634494"
      }
    },
    {
      "ticker": "GLMR",
      "asset": {
        "chainId": "urn:ocn:polkadot:2004",
        "assetId": "native"
      }
    },
    {
      "ticker": "ASTR",
      "asset": {
        "chainId": "urn:ocn:polkadot:2006",
        "assetId": "native"
      }
    },
    {
      "ticker": "ACA",
      "asset": {
        "chainId": "urn:ocn:polkadot:2000",
        "assetId": "native"
      }
    },
    {
      "ticker": "BNC",
      "asset": [
        {
          "chainId": "urn:ocn:polkadot:2030",
          "assetId": "native"
        },
        {
          "chainId": "urn:ocn:polkadot:2030",
          "assetId": "native:BNC"
        }
      ]
    },
    {
      "ticker": "HDX",
      "asset": [
        {
          "chainId": "urn:ocn:polkadot:2034",
          "assetId": "native"
        },
        {
          "chainId": "urn:ocn:polkadot:2034",
          "assetId": 0
        }
      ]
    },
    {
      "ticker": "MYTH",
      "asset": {
        "chainId": "urn:ocn:polkadot:3369",
        "assetId": "native"
      }
    },
    {
      "ticker": "CFG",
      "asset": {
        "chainId": "urn:ocn:polkadot:2031",
        "assetId": "native"
      }
    },
    {
      "ticker": "PHA",
      "asset": {
        "chainId": "urn:ocn:polkadot:2035",
        "assetId": "native"
      }
    },
    {
      "ticker": "USDT",
      "asset": [
        {
          "chainId": "urn:ocn:polkadot:1000",
          "assetId": "1984"
        },
        {
          "chainId": "urn:ocn:polkadot:2004",
          "assetId": "0xc30E9cA94CF52f3Bf5692aaCF81353a27052c46f"
        }
      ]
    },
    {
      "ticker": "USDC",
      "asset": [
        {
          "chainId": "urn:ocn:polkadot:1000",
          "assetId": "1337"
        },
        {
          "chainId": "urn:ocn:polkadot:2004",
          "assetId": "0x931715fee2d06333043d11f658c8ce934ac61d0c"
        }
      ]
    },
    {
      "ticker": "VDOT",
      "asset": {
        "chainId": "urn:ocn:polkadot:2030",
        "assetId": {
          "type": "VToken2",
          "value": 0
        }
      }
    },
    {
      "ticker": "VASTR",
      "asset": {
        "chainId": "urn:ocn:polkadot:2030",
        "assetId": {
          "type": "VToken2",
          "value": 3
        }
      }
    },
    {
      "ticker": "VGLMR",
      "asset": {
        "chainId": "urn:ocn:polkadot:2030",
        "assetId": {
          "type": "VToken2",
          "value": 1
        }
      }
    },
    {
      "ticker": "VMANTA",
      "asset": {
        "chainId": "urn:ocn:polkadot:2030",
        "assetId": {
          "type": "VToken2",
          "value": 8
        }
      }
    },
    {
      "ticker": "KSM",
      "asset": {
        "chainId": "urn:ocn:kusama:0",
        "assetId": "native"
      }
    }
  ]
}