@copytrade/broker-fyers
Version:
Fyers broker plugin for @copytrade/unified-broker
35 lines • 1.47 kB
TypeScript
/**
* Fyers Service Adapter
* Adapts the existing FyersService to implement IBrokerService interface
*/
import { IBrokerService, BrokerCredentials, LoginResponse, OrderRequest, OrderResponse, OrderStatus, Position, Quote } from '@copytrade/unified-broker';
import { FyersService } from './fyersService';
export declare class FyersServiceAdapter extends IBrokerService {
private fyersService;
constructor();
login(credentials: BrokerCredentials): Promise<LoginResponse>;
logout(): Promise<boolean>;
validateSession(accountId?: string): Promise<boolean>;
placeOrder(orderRequest: OrderRequest): Promise<OrderResponse>;
getOrderStatus(accountId: string, orderId: string): Promise<OrderStatus>;
getOrderHistory(accountId: string): Promise<OrderStatus[]>;
getPositions(accountId: string): Promise<Position[]>;
getQuote(symbol: string, exchange: string): Promise<Quote>;
searchSymbols(query: string, exchange: string): Promise<any[]>;
getFyersService(): FyersService;
refreshToken(credentials?: any): Promise<{
success: boolean;
tokenInfo?: any;
message: string;
}>;
completeAuth(authCode: string): Promise<LoginResponse>;
private isRetryableError;
private categorizeError;
private transformErrorMessage;
private delay;
/**
* Look up standardized symbol from database
*/
private lookupStandardizedSymbol;
}
//# sourceMappingURL=FyersServiceAdapter.d.ts.map