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_createSetuptools
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_createTests
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
| Class | Method | HTTP request | Description |
|---|---|---|---|
| MainStrategyApi | create_custom_trade_strategy | POST /MainStrategy/createCustomTradeStrategy | Create Custom Trade Strategy |
| MainStrategyApi | create_indicator_strategy | POST /MainStrategy/createIndicatorStrategy | Create Indicator Strategy |
| MainStrategyApi | create_multi_leg_call_put_strategy | POST /MainStrategy/createMultiLegCallPutStrategy | Create Multi Leg Call Put Strategy |
| MainStrategyApi | create_scalping_strategy | POST /MainStrategy/createScalpingStrategy | Create Scalping Strategy |
Documentation For Models
- BuildStrategyDto
- BuildStrategySubDto
- CreateCustomTradeStrategy200Response
- CreateIndicatorStrategy401Response
- CreateIndicatorStrategyDto
- CustomTradeDto
- CustomTradeResponseDto
- CustomTradeSubDto
- Indicator
- IndicatorParameter
- IndicatorSubDto
- ResponseDto
- ScalpingDto
- TradingSymbol
Documentation For Authorization
Authentication schemes defined for the API:
bearerAuth
- Type: Bearer authentication (JWT)