def close_position(self, account_id, instrument, **params):
        endpoint = 'v1/accounts/%s/positions/%s' % (account_id, instrument)
        return self.request(endpoint, "DELETE", params=params)
Close an existing position
dataset/ETHPy150Open jamesmawm/Mastering-Python-for-Finance-source-codes/B03898_08_codes/oandapy.py/EndpointsMixin.close_position