/* 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'; /** * * @export * @interface GeckoContract */ export interface GeckoContract { /** * * @type {string} * @memberof GeckoContract */ ticker_id: string; /** * * @type {string} * @memberof GeckoContract */ base_currency: string; /** * * @type {string} * @memberof GeckoContract */ target_currency: string; /** * * @type {number} * @memberof GeckoContract */ last_price: number; /** * * @type {number} * @memberof GeckoContract */ base_volume: number; /** * * @type {number} * @memberof GeckoContract */ target_volume: number; /** * * @type {number} * @memberof GeckoContract */ bid: number; /** * * @type {number} * @memberof GeckoContract */ ask: number; /** * * @type {number} * @memberof GeckoContract */ high: number; /** * * @type {number} * @memberof GeckoContract */ low: number; /** * * @type {string} * @memberof GeckoContract */ product_type: string; /** * * @type {number} * @memberof GeckoContract */ open_interest: number; /** * * @type {number} * @memberof GeckoContract */ open_interest_usd: number; /** * * @type {number} * @memberof GeckoContract */ index_price: number; /** * * @type {string} * @memberof GeckoContract */ index_name: string; /** * * @type {string} * @memberof GeckoContract */ index_currency: string; /** * * @type {number} * @memberof GeckoContract */ start_timestamp: number; /** * * @type {number} * @memberof GeckoContract */ end_timestamp: number; /** * * @type {number} * @memberof GeckoContract */ funding_rate: number; /** * * @type {number} * @memberof GeckoContract */ next_funding_rate: number; /** * * @type {number} * @memberof GeckoContract */ next_funding_rate_timestamp: number; /** * * @type {string} * @memberof GeckoContract */ contract_type: string; /** * * @type {string} * @memberof GeckoContract */ contract_price_currency: string; /** * * @type {number} * @memberof GeckoContract */ contract_price: number; } /** * Check if a given object implements the GeckoContract interface. */ export function instanceOfGeckoContract(value: object): value is GeckoContract { if (!('ticker_id' in value) || value['ticker_id'] === undefined) return false; if (!('base_currency' in value) || value['base_currency'] === undefined) return false; if (!('target_currency' in value) || value['target_currency'] === undefined) return false; if (!('last_price' in value) || value['last_price'] === undefined) return false; if (!('base_volume' in value) || value['base_volume'] === undefined) return false; if (!('target_volume' in value) || value['target_volume'] === undefined) return false; if (!('bid' in value) || value['bid'] === undefined) return false; if (!('ask' in value) || value['ask'] === undefined) return false; if (!('high' in value) || value['high'] === undefined) return false; if (!('low' in value) || value['low'] === undefined) return false; if (!('product_type' in value) || value['product_type'] === undefined) return false; if (!('open_interest' in value) || value['open_interest'] === undefined) return false; if (!('open_interest_usd' in value) || value['open_interest_usd'] === undefined) return false; if (!('index_price' in value) || value['index_price'] === undefined) return false; if (!('index_name' in value) || value['index_name'] === undefined) return false; if (!('index_currency' in value) || value['index_currency'] === undefined) return false; if (!('start_timestamp' in value) || value['start_timestamp'] === undefined) return false; if (!('end_timestamp' in value) || value['end_timestamp'] === undefined) return false; if (!('funding_rate' in value) || value['funding_rate'] === undefined) return false; if (!('next_funding_rate' in value) || value['next_funding_rate'] === undefined) return false; if (!('next_funding_rate_timestamp' in value) || value['next_funding_rate_timestamp'] === undefined) return false; if (!('contract_type' in value) || value['contract_type'] === undefined) return false; if (!('contract_price_currency' in value) || value['contract_price_currency'] === undefined) return false; if (!('contract_price' in value) || value['contract_price'] === undefined) return false; return true; } export function GeckoContractFromJSON(json: any): GeckoContract { return GeckoContractFromJSONTyped(json, false); } export function GeckoContractFromJSONTyped(json: any, ignoreDiscriminator: boolean): GeckoContract { if (json == null) { return json; } return { 'ticker_id': json['ticker_id'], 'base_currency': json['base_currency'], 'target_currency': json['target_currency'], 'last_price': json['last_price'], 'base_volume': json['base_volume'], 'target_volume': json['target_volume'], 'bid': json['bid'], 'ask': json['ask'], 'high': json['high'], 'low': json['low'], 'product_type': json['product_type'], 'open_interest': json['open_interest'], 'open_interest_usd': json['open_interest_usd'], 'index_price': json['index_price'], 'index_name': json['index_name'], 'index_currency': json['index_currency'], 'start_timestamp': json['start_timestamp'], 'end_timestamp': json['end_timestamp'], 'funding_rate': json['funding_rate'], 'next_funding_rate': json['next_funding_rate'], 'next_funding_rate_timestamp': json['next_funding_rate_timestamp'], 'contract_type': json['contract_type'], 'contract_price_currency': json['contract_price_currency'], 'contract_price': json['contract_price'], }; } export function GeckoContractToJSON(value?: GeckoContract | null): any { if (value == null) { return value; } return { 'ticker_id': value['ticker_id'], 'base_currency': value['base_currency'], 'target_currency': value['target_currency'], 'last_price': value['last_price'], 'base_volume': value['base_volume'], 'target_volume': value['target_volume'], 'bid': value['bid'], 'ask': value['ask'], 'high': value['high'], 'low': value['low'], 'product_type': value['product_type'], 'open_interest': value['open_interest'], 'open_interest_usd': value['open_interest_usd'], 'index_price': value['index_price'], 'index_name': value['index_name'], 'index_currency': value['index_currency'], 'start_timestamp': value['start_timestamp'], 'end_timestamp': value['end_timestamp'], 'funding_rate': value['funding_rate'], 'next_funding_rate': value['next_funding_rate'], 'next_funding_rate_timestamp': value['next_funding_rate_timestamp'], 'contract_type': value['contract_type'], 'contract_price_currency': value['contract_price_currency'], 'contract_price': value['contract_price'], }; }