Repository: ccxt/ccxt
File: ts/src/base/Exchange.ts (TypeScript)

Code before:
        throw new NotSupported (this.id + ' watchBidsAsks() is not supported yet');
    }

    async watchTickers (symbols: Strings = undefined, params = {}): Promise<Tickers> {
        throw new NotSupported (this.id + ' watchTickers() is not supported yet');
    }

    async unWatchTickers (symbols: Strings = undefined, params = {}): Promise<any> {
        throw new NotSupported (this.id + ' unWatchTickers() is not supported yet');
    }

    async fetchOrder (id: string, symbol: Str = undefined, params = {}): Promise<Order> {
        throw new NotSupported (this.id + ' fetchOrder() is not supported yet');
    }

    async fetchOrderWithClientOrderId (clientOrderId: string, symbol: Str = undefined, params = {}) {
        /**
         * @method
         * @name fetchOrderWithClientOrderId
         * @description create a market order by providing the symbol, side and cost
         * @param {string} clientOrderId client order Id
         * @param {string} symbol unified symbol of the market to create an order in
         * @param {object} [params] extra parameters specific to the exchange API endpoint
         * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
         */
        if (this.has['fetchOrderWithClientOrderId']) {
            params = this.extend (params, { 'clientOrderId': clientOrderId });
            return await this.fetchOrder ('', symbol, params);
        }
        throw new NotSupported (this.id + ' fetchOrderWithClientOrderId() is not supported yet');
    }

    async fetchOrderWs (id: string, symbol: Str = undefined, params = {}): Promise<Order> {
        throw new NotSupported (this.id + ' fetchOrderWs() is not supported yet');
    }

    async fetchOrderStatus (id: string, symbol: Str = undefined, params = {}): Promise<string> {
        // TODO: TypeScript: change method signature by replacing
        // Promise<string> with Promise<Order['status']>.
        const order = await this.fetchOrder (id, symbol, params);
        return order['status'];
    }

    async fetchUnifiedOrder (order, params = {}): Promise<Order> {
        return await this.fetchOrder (this.safeString (order, 'id'), this.safeString (order, 'symbol'), params);
    }

    async createOrder (symbol: string, type: OrderType, side: OrderSide, amount: number, price: Num = undefined, params = {}): Promise<Order> {
        throw new NotSupported (this.id + ' createOrder() is not supported yet');
    }


Review comment (refactor):
@AresArtemius right now no exchange has this flag set to true, you can either remove this check or add  this to `has` in the exchanges supporting these methods

Code after:

    async unWatchTickers (symbols: Strings = undefined, params = {}): Promise<any> {
        throw new NotSupported (this.id + ' unWatchTickers() is not supported yet');
    }

    async fetchOrder (id: string, symbol: Str = undefined, params = {}): Promise<Order> {
        throw new NotSupported (this.id + ' fetchOrder() is not supported yet');
    }

    /**
     * @method
     * @name fetchOrderWithClientOrderId
     * @description create a market order by providing the symbol, side and cost
     * @param {string} clientOrderId client order Id
     * @param {string} symbol unified symbol of the market to create an order in
     * @param {object} [params] extra parameters specific to the exchange API endpoint
     * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
     */
    async fetchOrderWithClientOrderId (clientOrderId: string, symbol: Str = undefined, params = {}) {
        const extendedParams = this.extend (params, { 'clientOrderId': clientOrderId });
        return await this.fetchOrder ('', symbol, extendedParams);
    }

    async fetchOrderWs (id: string, symbol: Str = undefined, params = {}): Promise<Order> {
        throw new NotSupported (this.id + ' fetchOrderWs() is not supported yet');
    }

    async fetchOrderStatus (id: string, symbol: Str = undefined, params = {}): Promise<string> {
        // TODO: TypeScript: change method signature by replacing
        // Promise<string> with Promise<Order['status']>.
        const order = await this.fetchOrder (id, symbol, params);
        return order['status'];
    }

    async fetchUnifiedOrder (order, params = {}): Promise<Order> {
        return await this.fetchOrder (this.safeString (order, 'id'), this.safeString (order, 'symbol'), params);
    }

    async createOrder (symbol: string, type: OrderType, side: OrderSide, amount: number, price: Num = undefined, params = {}): Promise<Order> {
        throw new NotSupported (this.id + ' createOrder() is not supported yet');
    }

    async createConvertTrade (id: string, fromCode: string, toCode: string, amount: Num = undefined, params = {}): Promise<Conversion> {
        throw new NotSupported (this.id + ' createConvertTrade() is not supported yet');
    }

    async fetchConvertTrade (id: string, code: Str = undefined, params = {}): Promise<Conversion> {
        throw new NotSupported (this.id + ' fetchConvertTrade() is not supported yet');
    }

    async fetchConvertTradeHistory (code: Str = undefined, since: Int = undefined, limit: Int = undefined, params = {}): Promise<Conversion[]> {