fixparser
Version:
FIX.Latest / 5.0 SP2 Parser / AI Agent Trading
92 lines (91 loc) • 2.94 kB
TypeScript
import type { EnumType } from '../enums/EnumType.ts';
import type { ISpecDatatypes } from '../spec/SpecDatatypes.ts';
import type { FIXValue } from '../util/util.ts';
import type { CategoryType } from './categories/CategoryType.ts';
import type { SectionType } from './sections/SectionType.ts';
/**
* Field is a predefined data element, identified by a unique tag number,
* that represents a specific piece of information within a message
* (such as price, quantity, or order ID).
*
* @public
*/
export declare class Field {
/** The unique tag number identifying this field */
tag: number;
/** The value of the field */
value: FIXValue;
/** The name of the field */
name: string | undefined;
/** A description of what the field represents */
description: string | undefined;
/** The data type of the field */
type: ISpecDatatypes | undefined;
/** The category this field belongs to */
category: CategoryType | undefined;
/** The section this field belongs to */
section: SectionType | undefined;
/** The enumeration type if this field is an enumerated value */
enumeration: EnumType | undefined;
/**
* Creates a new Field instance with the specified tag and value.
*
* @param {number} tag - The unique tag number identifying this field
* @param {FIXValue} value - The value to be stored in this field
*/
constructor(tag: number, value: FIXValue);
/**
* Sets the tag number for this field.
*
* @param {number} tag - The new tag number
*/
setTag(tag: number): void;
/**
* Sets the value for this field.
*
* @param {FIXValue} value - The new value
*/
setValue(value: FIXValue): void;
/**
* Sets the name for this field.
*
* @param {string} name - The new name
*/
setName(name: string): void;
/**
* Sets the description for this field.
*
* @param {string} description - The new description
*/
setDescription(description: string): void;
/**
* Sets the data type for this field.
*
* @param {ISpecDatatypes | undefined} type - The new data type
*/
setType(type: ISpecDatatypes | undefined): void;
/**
* Sets the category for this field.
*
* @param {CategoryType} category - The new category
*/
setCategory(category: CategoryType): void;
/**
* Sets the section for this field.
*
* @param {SectionType} section - The new section
*/
setSection(section: SectionType): void;
/**
* Sets the enumeration type for this field.
*
* @param {EnumType} enumeration - The new enumeration type
*/
setEnumeration(enumeration: EnumType): void;
/**
* Returns a string representation of the field in FIX format (tag=value).
*
* @returns {string} The string representation of the field
*/
toString(): string;
}