TT® REST API 2.0

Migrating from TT REST 1.0 to 2.0

TT REST API 1.0 was deprecated on June 30, 2021. The following can help with migrating applications to TT REST API 2.0.

A restructuring of the original version of the TT REST API was undertaken to improve its underlying design. As a result, a new version was created in which the names of the individual services were changed so as to differentiate it from the original version. Furthermore, the “RISK” service offered in the original version has been split up into several smaller services in the new version.

TT REST API Services 1.0 TT REST API Services 2.0
ttid
    ttid
  • /keyusage, /usersprovision
PDS
    ttpds
  • /currencyrates
  • /instrument, /instrumentdata, /instruments
  • /markets, /micodes, /mics
  • /product, /products, /productdata, /productfamilies, /productfamily
LEDGER
    ttledger
  • /fills
  • /orderdata, /orders
  • /postitionmodifications, /tradingaccountfills
MONITOR
    ttmonitor
  • /adminfill, /creditutilization
  • /position, /sod
RISK
    ttsetup
  • /commondata, /company
  • /ordertagdefaults, /organizations
  • /report, /ttcommondata, /connections
    ttaccount
  • /account, /accounts, /accountuser, /accountusers

However, the new version presents an interface which closely mimics that of the original version to minimize migration efforts. The following is a list of the changes that were made to the interface which may impact your application. Fields and endpoints that are marked as deprecated will remain in the new version until the original version is no longer available.

NOTE: As a product, TT REST API 1.0 will be deprecated on June 30, 2021. Until then, TT REST API 1.0 will remain a fully supported production product, however, no additional enhancements will be made to it.

Key to Interface Changes

The tables below use the following colors to represent each interface change impact:

  • The highlighted changes have a high impact to the interface. These changes require most users to modify their code to reflect the change.
  • The highlighted changes have a medium impact to the interface. These changes may impact fewer users but require all users to verify their code can adapt to the change.
  • The highlighted changes have a low impact to the interface. These changes impact the fewer number of users. All users should verify their code can adapt to the change.

Interface Changes - ttid

No interface changes.

Interface Changes - PDS

ttpds

ttpds - GET

Method Endpoint Changes
GET /currencyrates
  • The currency_rate object is returned when only one rate is requested. The currency_rates array is returned when more than one rate is requested.
GET /instruments
  • Changed the type of the lastPage field from a boolean to a string.

Interface Changes - Ledger

TTLEDGER

TTLEDGER - GET

Method Endpoint Changes
GET /fills
  • Changed the type of the aggressorIndicator and externallyCreated fields from a string to a boolean.
  • Changed the type of the exchLeavesQty from a string to a number.
GET /tradingaccountfills
  • Changed the type of the aggressorIndicator and externallyCreated fields from a string to a boolean.
  • Changed the type of the exchLeavesQty from a string to a number.

Interface Changes - Monitor

TTMONITOR

TTMONITOR - GET

Method Endpoint Changes
GET /position
  • Changed the type of the lastPage field from a boolean to a string.
  • Deprecated the productPosition query parameter and replaced with two new endpoints called: /productposition and /productposition/{accountId}.

Interface Changes - Risk

TTSETUP

TTSETUP - GET

Method Endpoint Changes
GET /commondata
  • Deprecated the /commondata endpoint and replaced with a new endpoint called /ttcommondata.
GET /ordertagdefaults/fields
  • The value of the lastPage field was changed from True to true.

TTSETUP - POST

Method Endpoint Changes
POST /company/productmargin
  • Deprecated the /company/productmargin endpoint and replaced with a new endpoint called /company/productmargins.
POST /ordertagdefaults/profiles
  • Deprecated the customerId field and replaced with a new field called profileId.

TTSETUP - DELETE

Method Endpoint Changes
DELETE /company/productmargin
  • Deprecated the /company/productmargin endpoint and replaced with a new endpoint called /company/productmargins.

TTUSER

TTUSER - GET

Method Endpoint Changes
GET /user
  • Changed the type of the PrimaryPhoneExt field from an integer to a string.
  • Changed the type of the SecPhoneExt field from an integer to a string.
GET /user/accesslines
  • Changed the type of the revision field from a string to an integer.
GET /user/privatelines
  • Deprecated the /user/privatelines endpoint and replaced with a new endpoint called /user/accesslines.
GET /user/{userId}
  • Deprecated the last_page field and replaced with a new field called lastPage.
  • Deprecated the next_page_key field and replaced with a new field called nextPageKey.
GET /user/{userId}/risklimits
  • Deprecated the /user/{userId}/risklimits endpoint and replaced with an existing endpoint called /user/{userId}/limits.
GET /user/{userId}/marketdata
  • Deprecated the last_page field and replaced with a new field called lastPage.
GET /user/{userId}/profile
  • Deprecated the last_page field and replaced with a new field called lastPage.

TTUSER - POST

Method Endpoint Changes
POST /users/limits/contract
  • Deprecated the userContractRiskLimits object and replaced with a new object called contractLimits.
POST /users/limits/ipspread
  • Deprecated the userIPSpreadRiskLimits object and replaced with a new object called interProductLimits.
POST /users/limits/product
  • Deprecated the userProductRiskLimits object and replaced with a new object called productLimits.
POST /users/limits/limitsettings
  • Deprecated the userRiskLimitSettings object and replaced with a new object called riskLimitSettings.
POST /user/risklimit/contract
  • Deprecated the /user/risklimit/contract endpoint and replaced with a new endpoint called /users/limits/contract.
POST /user/risklimit/ipspread
  • Deprecated the /user/risklimit/ipspread endpoint and replaced with a new endpoint called /users/limits/ipspread.
POST /user/risklimit/product
  • Deprecated the /user/risklimit/product endpoint and replaced with a new endpoint called /users/limits/product.

REQUEST and RESPONSE

  • Deprecated the productLimits-->outright_rejectOrderExceedingLevelDepth field and replaced with a new field called productLimits-->rejectOrderExceedingLevelDepth.
  • Deprecated the productLimits-->outright_marketDepthCheck field and replaced with a new field called productLimits-->marketDepthCheck.
  • Deprecated the productLimits-->outright_maxChildSliceSize field and replaced with a new field called productLimits-->maxChildSliceSize.
POST /user/risklimitsettings
  • Deprecated the /user/risklimitsettings endpoint and replaced with a new endpoint called /users/limits/limitsettings.

TTUSER - DELETE

Method Endpoint Changes
DELETE /user/risklimit
  • Changed the deleted field to isDeleted.

TTACCOUNT

TTACCOUNT - GET

Method Endpoint Changes
GET /accounts
  • Deprecated the parentId field and replaced with a new field called parentAccountId.
GET /account/{accountId}
  • Changed the type of the riskSettings->dailyCreditLimit field from a string to a number.
  • Removed the default value of the riskSettings->positionResetTime field and set it to 0.
  • Removed the default value for the riskSettings->positionResetTimeZone field and set it to None.
GET /account/{accountId}/children
  • The value of the lastPage field was changed from True to true.
  • Deprecated the parentId field and replaced with a new field called parentAccountId.
GET /account/{accountId}/limits
  • Deprecated the productLimits-->outright_rejectOrderExceedingLevelDepth field and replaced with a new field called productLimits-->rejectOrderExceedingLevelDepth.
  • Deprecated the productLimits-->outright_marketDepthCheck field and replaced with a new field called productLimits-->marketDepthCheck.
  • Deprecated the productLimits-->outright_maxChildSliceSize field and replaced with a new field called productLimits-->maxChildSliceSize.
GET /account/{accountId}/risksettings
  • Changed the type of the riskSettings->dailyCreditLimit field from a string to a number.
  • Removed the default value of the riskSettings->positionResetTime field and set it to 0.
  • Removed the default value of the riskSettings->positionResetTimeZone field and set it to None.
GET /accountuser
  • Changed the name of the LastPage variable to lastPage.

TTACCOUNT - POST

Method Endpoint Changes
POST /accounts/risklimits/contract
  • Deprecated the /accounts/risklimits/contract endpoint and replaced with a new endpoint called /account/limits/contract.
POST /accounts/risklimits/ipspread
  • Deprecated the /accounts/risklimits/ipspread endpoint and replaced with a new endpoint called /account/limits/ipspread.
POST /accounts/risklimits/product
  • Deprecated the /accounts/risklimits/product endpoint and replaced with a new endpoint called /account/limits/product.
POST /accounts/limits/contract
  • Deprecated the accountContractRiskLimits field and replaced with a new field called contractLimits.
POST /accounts/limits/ipspread
  • Deprecated the accountIPSpreadRiskLimits field and replaced with a new field called interProductLimits.
POST /accounts/limits/product
  • Deprecated the accountProductRiskLimits field and replaced with a new field called productLimits.
POST /accounts/limits/limitsettings
  • Deprecated the accountRiskLimitSettings field and replaced with a new field called riskLimitSettings.
POST /account/risklimit/contract
  • (RESPONSE) Removed the trailing space in the outright_priceDriftCheckIntervalLifetimePct field.
  • Deprecated the /account/risklimit/contract endpoint and replaced with a new endpoint called /accounts/limits/contract.
POST /account/risklimit/ipspread
  • Deprecated the /account/risklimit/ipspread endpoint and replaced with a new endpoint called /accounts/limits/ipspread.
POST /account/risklimit/product
  • Deprecated the /account/risklimit/product endpoint and replaced with a new endpoint called /accounts/limits/product.
  • Deprecated the productLimits-->outright_rejectOrderExceedingLevelDepth field and replaced with a new field called productLimits-->rejectOrderExceedingLevelDepth.
  • Deprecated the productLimits-->outright_marketDepthCheck field and replaced with a new field called productLimits-->marketDepthCheck.
  • Deprecated the productLimits-->outright_maxChildSliceSize field and replaced with a new field called productLimits-->maxChildSliceSize.
POST /account/risklimitsettings
  • Deprecated the /account/risklimitsettings endpoint and replaced with a new endpoint called /accounts/limits/limitsettings.
POST /account/risksettings
  • (REQUEST) Changed the type of the riskSettings->dailyCreditLimit field from a string to a number.
  • (RESPONSE) Changed type of the riskSettings->dailyCreditLimit field from a string to a number.
  • (RESPONSE) Removed the default value of the riskSettings->positionResetTime field and set it to 0.
  • (RESPONSE) Removed the default value of the riskSettings->positionResetTimeZone field and set it to None.
POST /accountuser
  • Deprecated the /accountuser endpoint and replaced with a new endpoint called /accountusers.

TTACCOUNT - DELETE

Method Endpoint Changes
DELETE /account/{accountId}
  • Changed the type of the isDeleted field from an integer to a boolean.
DELETE /account/risklimit
  • Changed the deleted field to isDeleted.
DELETE /accountuser/{Id}
  • (RESPONSE) Changed the name of the account field to accountuser.

TTGROUP

TTGROUP - GET

Method Endpoint Changes
GET /riskgroups
  • Removed the productLimits->environment field.
  • Changed the type of the riskSettings->dailyCreditLimit field from a string to a number.
GET /riskgroups/{riskgroupid}/limits
  • Removed the productLimits->environment field.
  • Changed the type of the riskSettings->dailyCreditLimit field from a string to a number.
  • Removed the empty string default value for the interProductLimits->productid field.
  • Removed the empty string default value from the contractLimits->instrumentMaturity field.
  • Changed the type of the contractLimits->instrumentMaturity field from an integer to a string.
GET /usergroups/{userGroupId}
  • Removed the privateLines and settings objects.
GET /usergroups/{userGroupId}/connectivity
  • Removed the /usergroups/{userGroupId}/connectivity endpoint.
GET /usergroups/{userGroupId}/settings
  • Removed the /usergroups/{userGroupId}/settings endpoint.

TTGROUP - POST

Method Endpoint Changes
POST /riskgroups/riskgrouprisklimits/contract
  • Deprecated the /riskgroups/riskgrouprisklimits/contract endpoint and replaced with a new endpoint called /riskgroups/limits/contract.
POST /riskgroups/riskgrouprisklimits/ipspread
  • Deprecated the /riskgroups/riskgrouprisklimits/ipspread endpoint and replaced with a new endpoint called /riskgroups/limits/ipspread.
POST /riskgroups/riskgrouprisklimits/product
  • (REQUEST) Changed the type of the riskSettings->dailyCreditLimit field from a string to a number.
  • (REQUEST) Changed the type of the contractLimits->instrumentMaturity field from an integer to a string.
  • (RESPONSE) Changed the type of the riskSettings->dailyCreditLimit field from a string to a number.
  • (RESPONSE) Changed the type of the contractLimits->instrumentMaturity field from an integer to a string.
  • (RESPONSE) Changed the type of the contractLimits->instrumentMaturity field from an integer to a string.
  • Deprecated the /riskgroups/riskgrouprisklimits/product endpoint and replaced with a new endpoint called /riskgroups/limits/product.
POST /riskgroups/riskgrouprisklimitsettings
  • Deprecated the /riskgroups/riskgrouprisklimitsettings endpoint and replaced with a new endpoint called /riskgroups/limits/limitsettings.
POST /usergroups/connectivity/privatelines
  • Removed the /usergroups/connectivity/privatelines endpoint.
POST /usergroups/connectivity/settings
  • Removed the /usergroups/connectivity/settings endpoint.

TTGROUP - DELETE

Method Endpoint Changes
DELETE /riskgroups/{riskgroupid}
  • Changed the type of the isDeleted field from an integer to a boolean.
DELETE /riskgroups/riskgroupaccounts
  • Changed the type of the isDeleted field from an integer to a boolean.
DELETE /riskgroups/riskgrouprisklimits
  • Changed the isDeleted field from integer to boolean.
DELETE /usergroups/connectivity/privatelines
  • Removed the /usergroups/connectivity/privatelines endpoint.
DELETE /usergroups/users/{userId}
  • Deprecated the /usergroups/users/{userId} endpoint and replaced with a new endpoint called /usergroups/users.