UNPKG

@node-dlc/messaging

Version:
45 lines (44 loc) 1.16 kB
/// <reference types="node" /> import { MessageType } from '../MessageType'; import { IDlcMessage } from './DlcMessage'; export type DlcParty = 'offeror' | 'acceptor' | 'neither'; /** * OrderPositionInfo message */ export declare class OrderPositionInfo implements IDlcMessage { static type: MessageType; /** * Deserializes an OrderPositionInfo message * @param buf */ static deserialize(buf: Buffer): OrderPositionInfo; /** * The type for OrderPositionInfo message */ type: MessageType; length: bigint; shiftForFees: DlcParty; fees: bigint; instrumentName: string | undefined; contractSize: bigint; direction: 'buy' | 'sell' | 'neither'; price: bigint; extraPrecision: number; /** * Converts OrderPositionInfo to JSON */ toJSON(): IOrderPositionInfoJSON; /** * Serializes the OrderPositionInfo message into a Buffer */ serialize(): Buffer; } export interface IOrderPositionInfoJSON { type: number; shiftForFees: string; fees: number; instrumentName: string; direction: string; price: number; extraPrecision: number; }