mm-strategy-create

API for creating and managing various trading strategies including Indicator, Scalping, Custom Trade, and Multi Leg Call Put strategies

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Generator version: 7.17.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://marketmaya.com

Requirements.

Python 3.9+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import mm_strategy_create

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import mm_strategy_create

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:


import mm_strategy_create
from mm_strategy_create.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.marketmaya.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = mm_strategy_create.Configuration(
    host = "https://api.marketmaya.com/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): bearerAuth
configuration = mm_strategy_create.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)


# Enter a context with an instance of the API client
with mm_strategy_create.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mm_strategy_create.MainStrategyApi(api_client)
    custom_trade_dto = mm_strategy_create.CustomTradeDto() # CustomTradeDto | 

    try:
        # Create Custom Trade Strategy
        api_response = api_instance.create_custom_trade_strategy(custom_trade_dto)
        print("The response of MainStrategyApi->create_custom_trade_strategy:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling MainStrategyApi->create_custom_trade_strategy: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.marketmaya.com/api

ClassMethodHTTP requestDescription
MainStrategyApicreate_custom_trade_strategyPOST /MainStrategy/createCustomTradeStrategyCreate Custom Trade Strategy
MainStrategyApicreate_indicator_strategyPOST /MainStrategy/createIndicatorStrategyCreate Indicator Strategy
MainStrategyApicreate_multi_leg_call_put_strategyPOST /MainStrategy/createMultiLegCallPutStrategyCreate Multi Leg Call Put Strategy
MainStrategyApicreate_scalping_strategyPOST /MainStrategy/createScalpingStrategyCreate Scalping Strategy

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication (JWT)

Author