UNPKG

@copytrade/broker-fyers

Version:
47 lines 1.49 kB
/** * Fyers Broker Helper Functions * Utility functions specific to Fyers broker integration */ import { OrderRequest } from '@copytrade/unified-broker'; import { FyersOrderRequest } from './types'; /** * Transform unified order request to Fyers format */ export declare function transformOrderRequest(orderRequest: OrderRequest): FyersOrderRequest; /** * Format symbol for Fyers API */ export declare function formatSymbol(symbol: string, exchange: string): string; /** * Map unified order type to Fyers order type */ export declare function mapOrderType(orderType: string): number; /** * Map unified order action to Fyers side */ export declare function mapOrderSide(action: string): number; /** * Map unified product type to Fyers product type */ export declare function mapProductType(productType: string): string; /** * Map unified validity to Fyers validity */ export declare function mapValidity(validity: string): string; /** * Parse Fyers order status to unified format */ export declare function parseOrderStatus(fyersStatus: number): string; /** * Validate Fyers credentials */ export declare function validateCredentials(credentials: any): boolean; /** * Generate Fyers auth URL - Fixed to use actual login page */ export declare function generateAuthUrl(appId: string, redirectUri: string): string; /** * Format error message from Fyers response */ export declare function formatErrorMessage(response: any): string; //# sourceMappingURL=helpers.d.ts.map