TT® REST API

Introduction to TT REST API

The TT REST API gives you the tools you need to leverage the power of the TT platform within your own applications. You can access the same product information services, risk management and market connectivity used by the TT platform - all through an easy-to-use REST API.

The TT REST API provide a number of resources:

  • TTID: Authenticate and authorize applications to access the resources of the TT platform.
  • PDS: Request information pertaining to exchanges, products and instruments.
  • Ledger: View transaction details and historical record.
  • Monitor: View positions and SOD records for a given account.
  • Risk: Manage risk, limits and permissions.

Getting Started

All requests to the TT REST API require the inclusion of an application key in their header. In addition, some services, such as Risk, also require a token.

The application key and the application key secret used to generate the token must be created in Setup.

Using the TT REST API requires you to select a usage plan for the application key that can incur additional costs. For more information about the costs associated with the usage plans, contact TT Customer Success.

  • Free: Allows you to develop and test TT REST applications in UAT only.
  • Low: Allows you to run TT REST applications in the Live environment with limits of 5 requests per second and 15,000 requests per day.
  • Medium: Allows you to run TT REST applications in the Live environment with limits of 10 requests per second and 30,000 requests per day.
  • High: Allows you to run TT REST applications in the Live environment with limits of 25 requests per second and 75,000 requests per day.

Note: The application key and token are also used to make test requests from within the TT REST API documentation.

Getting an Application Key and Application Secret

Note: Creating TT REST API application keys requires company administrators to enable the Can create TT Rest API key setting for the user.

Users can create application keys and receive their application secret from within Setup in the TT Platform:

  • Log into the UAT environment (ext_uat_cert) to create app keys for development.
  • Log into the Live environment (ext_prod_live) to create app keys for accessing live data.

To create an application key:

  1. Click Users in the left navigation panel and select your username in the data grid.
  2. Click the App Keys tab.
  3. In the title bar of the App Keys data grid, click New.

  4. In the Create New Application Key dialog:
    1. Enter a user-defined name in the Application Key Name field.

      The key name must be unique.

    2. In the Application Key Type type drop-down, select TT REST API.
    3. Select the desired usage plan in the Application Key Usage Plan drop-down.

      Note: In the UAT testing environment, only the free plan is available. In the Live environment, only the Low, Medium and High plans are available.
  5. Click Create.

    The application key is generated and the application secret is displayed in the Secret field.

  6. Click Copy Secret to Clipboard and then paste this application secret somewhere on your machine.

    Warning: This is the only time you will be able to copy your new key's secret.

  7. To exit and close the Create New Application Key screen, click Ok.
  8. Back in your list of app keys, the string in the Value column will be used as the application key in your request headers. Record it for use with your the application secret from earlier.

You can now use this application key to make requests to the TT REST API from your application as well as use the application secret to generate a token.

URLs - Directing your Response

Requests to the TT REST API use the following base URL: apigateway.trade.tt/<service>/<environment>.

  • The value for <service> is documentated on each service's page.
  • The testing environment can be reached by using the following value: ext_uat_cert
  • The production environment used when deploying your application can be reached by using: ext_prod_live

Message Limits

TT REST places the following limits on messages:

  • UAT environment: 3 requests per second, with an unlimited number of requests per day.
  • Production environment provides the following usage plans:
    • Low: 5 requests per second, with a 15,000 requests per day limit.
    • Medium: 10 requests per second, with a 30,000 requests per day limit.
    • High: 25 requests per second, with a 75,000 requests per day limit.

Contacting TT Support

If you need help with TT REST API issues, you can submit a support ticket. To submit a support ticket, visit TT Support Center page in Resources section of the TT website and click Submit Incident.

Generating a Token

To get a token, you send your application key and application secret within a POST request to generate a token. Expand the '/token' documentation below to view the required parameters for generating a token.

You can send a test request by clicking the "Try it out" button, entering your application key (Fig. 1) and application secret (Fig. 2) where prompted, and then clicking "Execute."

Note: Tokens are set to expire after a given period of time. This period of time is communicated in the response including your token as the "seconds_until_expiry" value. Your application will need to generate a new token before its token expires.