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

Code before:
    }

    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'] || (this.has['fetchOrderWithClientOrderId'] && this.has['fetchOrderWithClientOrderId'])) {
            return await this.cancelOrder (clientOrderId, 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');
    }

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

Review comment (suggestion):
That's not how we do it. In this case you have to provide a random id like an empty string and provide the clientOrderId in `params`, that's how `cancelOrder` reads it 

Code after:
    async watchBidsAsks (symbols: Strings = undefined, params = {}): Promise<Tickers> {
        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');
    }

    /**
     * @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');