/* tslint:disable */ /* eslint-disable */ /** * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { mapValues } from '../runtime'; import type { OrderBookStats } from './OrderBookStats'; import { OrderBookStatsFromJSON, OrderBookStatsFromJSONTyped, OrderBookStatsToJSON, } from './OrderBookStats'; /** * * @export * @interface ExchangeStats */ export interface ExchangeStats { /** * * @type {number} * @memberof ExchangeStats */ code: number; /** * * @type {string} * @memberof ExchangeStats */ message?: string; /** * * @type {number} * @memberof ExchangeStats */ total: number; /** * * @type {Array} * @memberof ExchangeStats */ order_book_stats: Array; /** * * @type {number} * @memberof ExchangeStats */ daily_usd_volume: number; /** * * @type {number} * @memberof ExchangeStats */ daily_trades_count: number; } /** * Check if a given object implements the ExchangeStats interface. */ export function instanceOfExchangeStats(value: object): value is ExchangeStats { if (!('code' in value) || value['code'] === undefined) return false; if (!('total' in value) || value['total'] === undefined) return false; if (!('order_book_stats' in value) || value['order_book_stats'] === undefined) return false; if (!('daily_usd_volume' in value) || value['daily_usd_volume'] === undefined) return false; if (!('daily_trades_count' in value) || value['daily_trades_count'] === undefined) return false; return true; } export function ExchangeStatsFromJSON(json: any): ExchangeStats { return ExchangeStatsFromJSONTyped(json, false); } export function ExchangeStatsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExchangeStats { if (json == null) { return json; } return { 'code': json['code'], 'message': json['message'] == null ? undefined : json['message'], 'total': json['total'], 'order_book_stats': ((json['order_book_stats'] as Array).map(OrderBookStatsFromJSON)), 'daily_usd_volume': json['daily_usd_volume'], 'daily_trades_count': json['daily_trades_count'], }; } export function ExchangeStatsToJSON(value?: ExchangeStats | null): any { if (value == null) { return value; } return { 'code': value['code'], 'message': value['message'], 'total': value['total'], 'order_book_stats': ((value['order_book_stats'] as Array).map(OrderBookStatsToJSON)), 'daily_usd_volume': value['daily_usd_volume'], 'daily_trades_count': value['daily_trades_count'], }; }