API¶
quantopian¶
A collection of functions for automating actions on the Quantopian platform.
Author
Author Email
-
quantopian.__license__= u'BSD'¶ License
-
quantopian.__maintainer__= u'Derek Miller'¶ Maintainer
-
quantopian.__maintainer_email__= u'derek@gitlit.io'¶ Maintainer Email
-
quantopian.__pkg_name__= u'quantopian'¶ Package Name
-
quantopian.__project_description__= u'A collection of functions for automating actions on the Quantopian platform.'¶ Project Description
-
quantopian.__project_name__= u'Quantopian API'¶ Project Name
-
quantopian.__project_url__= u'https://github.com/Gitlitio/quantopian-api'¶ Project URL
-
quantopian.__release_date__= u'09/03/2016'¶ Release Date
-
quantopian.__version__= u'0.0.1a0'¶ Version
quantopian.algorithms¶
quantopian.backtests¶
quantopian.exceptions¶
Sessions handle the details of authentication and transporting requests.
quantopian.helpers¶
quantopian.schema¶
-
class
quantopian.schema.CustomValidator(*args, **kwargs)[source]¶ Bases:
cerberus.validator.ValidatorValidator class. Normalizes and/or validates any mapping against a validation-schema which is provided as an argument at class instantiation or upon calling the
validate(),validated()ornormalized()method. An instance itself is callable and executes a validation.All instantiation parameters are optional.
There are the introspective properties
types,validators,coercers,default_setters,rules,normalization_rulesandvalidation_rules.The attributes reflecting the available rules are assembled considering constraints that are defined in the docstrings of rules’ methods and is effectively used as validation schema for
schema.Parameters: - schema (any mapping) – See
schema. Defaults toNone. - ignore_none_values (
bool) – Seeignore_none_values. Defaults toFalse. - allow_unknown (
boolor any mapping) – Seeallow_unknown. Defaults toFalse. - purge_unknown (
bool) – Seepurge_unknown. Defaults to toFalse. - error_handler (class or instance based on
BaseErrorHandlerortuple) – The error handler that formats the result oferrors. When given as two-value tuple with an error-handler class and a dictionary, the latter is passed to the initialization of the error handler. Default:BasicErrorHandler.
- schema (any mapping) – See
quantopian.securities¶
-
quantopian.securities.lookup_sid(sid)[source]¶ Lookup a security by id.
>>> lookup_sid(45149) {u'symbol': u'HTBX', u'name': u'HEAT BIOLOGICS INC', u'sid': 45149} >>> lookup_sid(1111111) # Returns None of no security is found
Parameters: sid (int) – Security id.
Returns: A dictionary containing the security’s name, sid, and symbol or
Noneif no security is found.Return type: Raises: - quantopian.exceptions.RequestError – If the request to the quantopian server failed.
- quantopian.exceptions.ResponseValidationError – If the response from the quantopian server is not of the format expected.
quantopian.session¶
Sessions handle the details of authentication and transporting requests.
quantopian.settings¶
Settings for the project. All settings can be configured in the environment.