Skip to content

kziya/CRYPTO-BOT

Repository files navigation

Crypto-bot

Made with Typescript & Telegraf.js

Before making ApiAdapter you must add your Exchange's name to the ExchangesEnum

enum ExchangesEnum {
  BINANCE = 'BINANCE',
}

After that you can add your own Exchange's api under IApiAdapter interface

interface IApiAdapter {
    $api: Axios;
    name: ExchangesEnum;

    getPrice(currency: string);
}

all.adapter.ts (Add ApiAdapter to the App)

export default (): IApiAdapter[] =>
  [new BinanceApiAdapter(axios.create(binanceConfig))];

You can also make your ApiAdapter's config in /src/adapters/config folder.