code: def all_api_methods(cls):
          
          return [
              fn for fn in itervalues(vars(cls))
              if getattr(fn, 'is_api_method', False)
          ]
docs: Return a list of all the TradingAlgorithm API methods.