/* 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 AccountMarginStats */ export interface AccountMarginStats { /** * * @type {string} * @memberof AccountMarginStats */ collateral: string; /** * * @type {string} * @memberof AccountMarginStats */ portfolio_value: string; /** * * @type {string} * @memberof AccountMarginStats */ leverage: string; /** * * @type {string} * @memberof AccountMarginStats */ available_balance: string; /** * * @type {string} * @memberof AccountMarginStats */ margin_usage: string; /** * * @type {string} * @memberof AccountMarginStats */ buying_power: string; } /** * Check if a given object implements the AccountMarginStats interface. */ export function instanceOfAccountMarginStats(value: object): value is AccountMarginStats { if (!('collateral' in value) || value['collateral'] === undefined) return false; if (!('portfolio_value' in value) || value['portfolio_value'] === undefined) return false; if (!('leverage' in value) || value['leverage'] === undefined) return false; if (!('available_balance' in value) || value['available_balance'] === undefined) return false; if (!('margin_usage' in value) || value['margin_usage'] === undefined) return false; if (!('buying_power' in value) || value['buying_power'] === undefined) return false; return true; } export function AccountMarginStatsFromJSON(json: any): AccountMarginStats { return AccountMarginStatsFromJSONTyped(json, false); } export function AccountMarginStatsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountMarginStats { if (json == null) { return json; } return { 'collateral': json['collateral'], 'portfolio_value': json['portfolio_value'], 'leverage': json['leverage'], 'available_balance': json['available_balance'], 'margin_usage': json['margin_usage'], 'buying_power': json['buying_power'], }; } export function AccountMarginStatsToJSON(value?: AccountMarginStats | null): any { if (value == null) { return value; } return { 'collateral': value['collateral'], 'portfolio_value': value['portfolio_value'], 'leverage': value['leverage'], 'available_balance': value['available_balance'], 'margin_usage': value['margin_usage'], 'buying_power': value['buying_power'], }; }