Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 1x 1x 1x 1x 1x 1x 2x 2x 1x 1x 1x | import { Controller } from '@nestjs/common'; import { MessagePattern, Payload } from '@nestjs/microservices'; @Controller() export class CatalogController { @MessagePattern('catalog.exchanges.list') listExchanges() { return [ { id: 'bybit', name: 'Bybit' }, { id: 'binance', name: 'Binance' }, ]; } @MessagePattern('catalog.symbols.list') listSymbols(@Payload() data: { exchangeId: string }) { const { exchangeId } = data; if (exchangeId === 'bybit') { return [ { id: 'BTCUSDT', base: 'BTC', quote: 'USDT' }, { id: 'ETHUSDT', base: 'ETH', quote: 'USDT' }, ]; } Iif (exchangeId === 'binance') { return [ { id: 'BTCUSDT', base: 'BTC', quote: 'USDT' }, { id: 'SOLUSDT', base: 'SOL', quote: 'USDT' }, ]; } return []; } } |