UNPKG

@copytrade/broker-shoonya

Version:

Shoonya (Finvasia) broker plugin for @copytrade/unified-broker

43 lines 1.39 kB
/** * Shoonya Broker Helper Functions * Utility functions specific to Shoonya broker integration */ import { OrderRequest } from '@copytrade/unified-broker'; import { ShoonyaOrderRequest } from './types'; /** * Transform unified order request to Shoonya format */ export declare function transformOrderRequest(orderRequest: OrderRequest, accountId: string): ShoonyaOrderRequest; /** * Format symbol for Shoonya API */ export declare function formatSymbol(symbol: string, exchange: string): string; /** * Map unified product type to Shoonya product type */ export declare function mapProductType(productType: string): string; /** * Map unified order type to Shoonya order type */ export declare function mapOrderType(orderType: string): string; /** * Map unified validity to Shoonya validity */ export declare function mapValidity(validity: string): string; /** * Parse Shoonya order status to unified format */ export declare function parseOrderStatus(shoonyaStatus: string): string; /** * Validate Shoonya credentials */ export declare function validateCredentials(credentials: any): boolean; /** * Generate TOTP if totpKey is provided */ export declare function generateTOTP(totpKey?: string): string | undefined; /** * Format error message from Shoonya response */ export declare function formatErrorMessage(response: any): string; //# sourceMappingURL=helpers.d.ts.map