/* 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 PositionFunding */ export interface PositionFunding { /** * * @type {number} * @memberof PositionFunding */ timestamp: number; /** * * @type {number} * @memberof PositionFunding */ market_id: number; /** * * @type {number} * @memberof PositionFunding */ funding_id: number; /** * * @type {string} * @memberof PositionFunding */ change: string; /** * * @type {string} * @memberof PositionFunding */ rate: string; /** * * @type {string} * @memberof PositionFunding */ position_size: string; /** * * @type {string} * @memberof PositionFunding */ position_side: PositionFundingPositionSideEnum; /** * * @type {string} * @memberof PositionFunding */ discount: string; } /** * @export */ export const PositionFundingPositionSideEnum = { Long: 'long', Short: 'short' } as const; export type PositionFundingPositionSideEnum = typeof PositionFundingPositionSideEnum[keyof typeof PositionFundingPositionSideEnum]; /** * Check if a given object implements the PositionFunding interface. */ export function instanceOfPositionFunding(value: object): value is PositionFunding { if (!('timestamp' in value) || value['timestamp'] === undefined) return false; if (!('market_id' in value) || value['market_id'] === undefined) return false; if (!('funding_id' in value) || value['funding_id'] === undefined) return false; if (!('change' in value) || value['change'] === undefined) return false; if (!('rate' in value) || value['rate'] === undefined) return false; if (!('position_size' in value) || value['position_size'] === undefined) return false; if (!('position_side' in value) || value['position_side'] === undefined) return false; if (!('discount' in value) || value['discount'] === undefined) return false; return true; } export function PositionFundingFromJSON(json: any): PositionFunding { return PositionFundingFromJSONTyped(json, false); } export function PositionFundingFromJSONTyped(json: any, ignoreDiscriminator: boolean): PositionFunding { if (json == null) { return json; } return { 'timestamp': json['timestamp'], 'market_id': json['market_id'], 'funding_id': json['funding_id'], 'change': json['change'], 'rate': json['rate'], 'position_size': json['position_size'], 'position_side': json['position_side'], 'discount': json['discount'], }; } export function PositionFundingToJSON(value?: PositionFunding | null): any { if (value == null) { return value; } return { 'timestamp': value['timestamp'], 'market_id': value['market_id'], 'funding_id': value['funding_id'], 'change': value['change'], 'rate': value['rate'], 'position_size': value['position_size'], 'position_side': value['position_side'], 'discount': value['discount'], }; }