#NEWLINE# def close_position( self , account_id , instrument , **params ) : #NEWLINE# #INDENT# ' Close an existing position\n        Docs: http://developer.oanda.com/docs/v1/positions/#close-an-existing-position\n        ' #NEWLINE# endpoint = ( 'v1/accounts/%s/positions/%s' % ( account_id , instrument ) ) #NEWLINE# return self . request ( endpoint , 'DELETE' , params = account_id )