Skip to content
markpaper

src/session/index.ts

v0.1.0 · 992 B

Download file
import {
  createTradeSessionInternal,
  type QfexSessionOptions as InternalOptions,
  type TradeSessionOptions as InternalTradeOptions,
  type TradeSession,
} from './session.js';

export {
  type AddOrderWire,
  buildAddOrderFrame,
  type CancelResult,
  decodeRestOpenOrders,
  type QfexNotSentWhy,
  type QfexOrdersRead,
  type QfexRateLimitedSuspect,
  type QfexSessionClock,
  QfexSessionError,
  type QfexSessionErrorEvent,
  type QfexSessionErrorKind,
  type QfexSessionHealth,
  type QfexSubmitOptions,
  realSessionClock,
  type SessionState,
  type SubmitResult,
  type TradeSession,
} from './session.js';
export type QfexSessionOptions = Omit<InternalOptions, 'authMode'>;
export type TradeSessionOptions = Omit<InternalTradeOptions, 'authMode'>;
/** Published query-string API-key handshake plus an authenticated frame. */
export function createTradeSession(options: TradeSessionOptions): TradeSession {
  return createTradeSessionInternal({ ...options, authMode: 'query' });
}
All files