Blockstream Enterprise
ReferenceAPI ReferenceAssets

List Asset Exchange Rates Assets

List Asset Exchange Rates Assets.

Request

AssetsListAssetExchangeRatesRequest
interface AssetsListAssetExchangeRatesRequest {
  action: 'get'
  resource: string
  details?: {
    limit: number | undefined
    offset: number | undefined
    sort_by: 'updated_at' | 'currency' | undefined
    sort: 'asc' | 'desc' | undefined
    filters: {
      quote_currencies: string[] | undefined
      as_of: string | undefined
      from_timestamp: string | undefined
      to_timestamp: string | undefined
      asset_ids: string[] | undefined
    }
  } | undefined
}

Prop

Type

Response

AssetsListAssetExchangeRatesResponse_success
interface AssetsListAssetExchangeRatesResponse_success {
  status: 'success'
  error_code?: '-1' | '-2' | '-3' | '-4' | '-5' | '-6' | '-7' | '-8' | '-9' | '-10' | '-11' | '-12' | '-13' | undefined
  message?: string | undefined
  details: {
    currency: string
    rate: string
    asset_id: string
    coingecko_id: string
    updated_at: string
  } []
  metadata: {
    total_count: number
  }
}

Prop

Type

AssetsListAssetExchangeRatesResponse_failed | pending | unauthorized | rejected
interface AssetsListAssetExchangeRatesResponse_failed | pending | unauthorized | rejected {
  status: 'failed' | 'pending' | 'unauthorized' | 'rejected'
  error_code?: '-1' | '-2' | '-3' | '-4' | '-5' | '-6' | '-7' | '-8' | '-9' | '-10' | '-11' | '-12' | '-13' | undefined
  message?: string | undefined
}

Prop

Type

Example

Example
import { resourceSchema } from '@blockstream/ecs-js-sdk'
import { broadcastRequest } from './broadcaster'

const response = await broadcastRequest<
  typeof resourceSchema.shape.assets.shape.listAssetExchangeRates
>(
  {
    action: 'get',
    resource: '/assets/exchange-rates',
    details: {
      // TODO: fill in required fields
    },
  },
  blockstream,
)

On this page