TT CORE SDK

Deploying An Algo Definition

Deploying An Algo Definition

Once you have created the metadata file for your algo, you must deploy it to make it visible in the TT user interface. Deploying it is accomplished by executing the Python script named “deploy.py” that is provided as part of the TT Core SDK.


$ python deploy.py -f <metadata xml file> -s <appkey:secret> -e <environment>

where “<appkey:secret>” is an application key that you have created and “<environment>” is either “ext-uat-cert”, “ext-prod-sim”, or “ext-prod-live”. For example:


$ python deploy.py -f myalgo.xml -s 
00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000 -e ext-prod-live

You can undeploy a previously deployed algo using the Python script named “undeploy.py” that is provided as part of the TT Core SDK as follows:


$ python undeploy.py -a <algo id> -s <appkey:secret> -e <environment>

where “<appkey:secret>” is an application key that you have created and “<<environment>” is either “ext-uat-cert”, “ext-prod-sim”, or “ext-prod-live”. For example:


$ python undeploy.py -a 14003993766928758006 -s 
00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000 -e ext-prod-live
        

You can share a previously deployed algo using the Python script named “share.py” that is provided as part of the TT Core SDK as follows:


$ python share.py -a <algo id> -s <appkey:secret> -e <environment> -m <email>
        

where “<appkey:secret>” is an application key that you have created, “<email>” is the email address of the user with whom you want to share the algo and “<environment>” is either “ext-uat-cert”, “ext-prod-sim”, or “ext-prod-live”. For example:


$ python share.py -a 14003993766928758006 -s 
00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000 -e ext-prod-live 
-m bob.smith@mycompany.com
            

*** IMPORTANT: All algos must be shared with the user who will be running the TT Application Server. Furthermore, the user running the TT Application Server must have at least the same permissions as the user who launches an algo in terms of market data, etc.

You can unshare a previously deployed algo using the Python script named “unshare.py” that is provided as part of the TT Core SDK as follows:


$ python unshare.py -a <algo id>-e <environment> -m <email>
        

where “<appkey:secret>” is an application key that you have created, “<email>” is the email address of the user with whom you want to unshare the algo and “<environment>” is either “ext-uat-cert”, “ext-prod-sim”, or “ext-prod-live”. For example:


$ python unshare.py -a 14003993766928758006 -s 
00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000 -e ext-prod-live 
-m bob.smith@mycompany.com