I.Introduction
Before Ticker Tocker, we understand that many traders have a platform of their choice when create strategies and execute trades. With Ticker Tocker’s release, we make it easy for you to keep your current strategies in your existing platforms and send buy and sell signals generated from your existing strategies.
In this document, we will cover how you can send to Ticker Tocker buy and sell signals from your current platforms.
II. Support 3rd Party Platforms
TradeStation (via email only)
NinjaTrader
Sierra Chart
MetaTrader5
Quantopian
Note, as long as your current platform allows you to send HTTP POST request or send email from your custom strategies, then you can send your signals to Ticker Tocker.
III. Assumptions
This documentation assumes that you are familiar with one or more supported 3rd party platforms and that you have custom strategies created in one or more of these existing platforms. Creating custom strategies in the list of supported platforms is out of the scope of this documentation.
While Ticker Tocker’s strategy creator Drag & Drop requires no knowledge of coding, we assume that if you or your team has created custom strategies using any of the supported 3rd party platforms, you have basic knowledge of coding required for the rest of the documentation. We have sample code written in the respective languages (ninjascript, mq5…etc) of the supported 3rd party platforms.
IV. Submitting Trade Signals to Ticker Tocker
There are two ways to submit your trade signals to Ticker Tocker:
1. Through email
2. Through REST API
a. Email format for sending trade signals to Ticker Tocker
To enable this, please make sure you first configure your Ticker Tocker account, detailed in section IV.c.
To send your trade signal through email, please make sure you do the following when emailing:
Send To Address: ttexternalsignals@tickertocker.com
Subject Line: Strategy=<YOUR UDID>
Trade fields to be in body:
StrategyUUID=alpha-numeric
Symbol=alpha-numeric
Quantity=double
OrderSide=<0,1,2,3>
OrderType=<0,1,2,3>
TimeInForce=<1,3,5>
LimitPrice=double
StopPrice=double
TargetPrice=double
StopLossPrice=double
Where:
OrderType Values:
Market=0,
Limit=1,
StopMarket=2,
StopLimit=3
OrderSide Values:
Buy=0,
Sell=1,
SellShort=4,
BuyToCover=6
TimeInForce Values:
DayRegularSession = 1,
GoodTillCancelRegularSession = 2,
GoodTillDate = 5
In the email body, each line represents 1 trade signal.
Examples:
StrategyUUID=B764310E-5C9C-4012-8A5FD46F37E9258D,Symbol=QQQ,Quantity=100.00,OrderSide=0,OrderType=0,LimitPr ice=0,StopPrice=0,TargetPrice=161.0840,StopLossPrice=160.0160,TimeInForce=1
b. Through REST API
Other than email, Ticker Tocker also supports sending trade signals using proper formed JSON over HTTPS through POST.
REST API URL: https://prod-signals-api.tickertocker.com
Swagger: https://prod-signals-api.tickertocker.com/swagger/ui/index
POST /signals/login
The request payload requires the following information
• secretKey - this is the text that you got in step IV.b above
• leaderUserName - this is your Ticker Tocker user name
• leaderPassword - this is your Ticker Tocker password
A successful request will respond with a session token. You need to add this session token as http header with the key "Security" on the succeeding request. The session token will expire in 14 days and you need to login again to call renew_token to get a new session token.
Request Payload:
{
"secretKey": "string",
"leaderUserName": "string",
"leaderPassword": "string"
}
Response (Status 200)
{
"data": {
"sessionToken": "string"
},
"message": "string",
"errorCode": 0
}
POST /signals/new
With this API call, you need to have “Authorization” in the HTTP header. The value for “Authorization” field is the sessionToken you get from /signals/login or /signals/renew_token
Request Payload
{
"StrategyUUID": "string",
"Symbol": "string",
"Quantity": 0,
"OrderSide": 0,
"OrderType": 0,
"LimitPrice": 0,
"StopPrice": 0,
"TargetPrice": 0,
"StopLossPrice": 0,
"TimeInForce": 1,
"Expiry": "2018-12-12T01:18:01.529Z"
}
Valid Value for Payload Parameters:
OrderType Values:
Market=0,
Limit=1,
StopMarket=2,
StopLimit=3
OrderSide Values:
Buy=0,
Sell=1,
SellShort=4,
BuyToCover=6
TimeInForce Values:
DayRegularSession = 1,
GoodTillCancelRegularSession = 2,
GoodTillDate = 5
AssetClass Values:
Equity = 1,
Currency = 3,
Futures = 5
Response (Status 200)
{
"data":
{
"sessionToken": "string"
},
"message": "string",
"errorCode": 0
}
Validation Errors:
ErrorCode: 8016, Message: Object is empty
ErrorCode: 1404, Message: Object not found
ErrorCode: 2404, Message: Account not found
ErrorCode: 2000, Message: Account is not yet authorized by your broker to trade using TickerTocker's FIX connection. If you already submitted all required documents and is awaiting approval from the broker, please try again in a later time.
ErrorCode: 2005, Message: Account token is expired. User should reauthenticate to brokerage account.
ErrorCode: 10404, Message: Instrument not found
ErrorCode: 8003, Message: Symbol is empty
ErrorCode: 8006, Message: Order side is incorrect
ErrorCode: 8007, Message: Order type is incorrect
ErrorCode: 8008, Message: Time in force is incorrect
ErrorCode: 8009, Message: Quantity cannot be negative or zero
ErrorCode: 8010, Message: Account id cannot be negative or zero
ErrorCode: 8012, Message: Limit price cannot be negative or zero
ErrorCode: 8013, Message: Target price cannot be negative or zero
ErrorCode: 8014, Message: Stop price cannot be negative or zero
ErrorCode: 8018, Message: Limit price is not provided
ErrorCode: 8025, Message: Expiry is empty
ErrorCode: 8026, Message: Expiry should be future dateC:\knowvera\TTWebAPI\Controllers\IndicatorsController.cs
ErrorCode: 8027, Message: Target price is empty
ErrorCode: 8033, Message: You can't trade a continuous contract. Please submit an explicit contract to trade
ErrorCode: 8035, Message: There are no positions to close
ErrorCode: 8036, Message: Various messages based on scenario
ErrorCode: 8047, Message: Boxed Positions are not allowed
ErrorCode: 10002, Message: Market is not trading
ErrorCode: 2001, Message: This account does not support chosen Symbol
ErrorCode: 8053, Message: Stop loss price must be less than market price
ErrorCode: 8054, Message: Take profit price must be greater than market price
ErrorCode: 8055, Message: Stop loss price must be greater than market price
ErrorCode: 8056, Message: Take profit price must be less than market price
ErrorCode: 8057, Message: Stop loss price must be less than limit price
ErrorCode: 8058, Message: Take profit price must be greater than limit price
ErrorCode: 8059, Message: Stop loss price must be greater than limit price
ErrorCode: 8060, Message: Take profit price must be less than limit price
ErrorCode: 8061, Message: Stop price must be greater or equal to market price
ErrorCode: 8062, Message: Stop price must be less or equal to market price
ErrorCode: 8063, Message: Stop price is not provided
ErrorCode: 8064, Message: Stop loss price must be greater than stop price
ErrorCode: 8065, Message: Take profit price must be less than stop price
ErrorCode: 8066, Message: Stop loss price must be less than stop price
ErrorCode: 8067, Message: Take profit price must be greater than stop price
ErrorCode: 8068, Message: Limit price must be greater than stop price
ErrorCode: 8069, Message: Limit price must be less than stop price
ErrorCode: 8070, Message: Limit price must be less or equal to market price
ErrorCode: 8071, Message: Limit price must be greater or equal to market price
ErrorCode: 10012, Message: Explicit contract is not active
ErrorCode: 8072, Message: You are choosing to exit a position that has an existing working order. You need to cancel your existing order before placing your new order.
ErrorCode: 8074, Message: User can't create close on end of session positions
ErrorCode: 5066, Message: Strategy is not external
POST /signals/renew_token
Request Payload
{ "secretKey": "string" }
Response (Status 200)
{
"data":
{
"sessionToken": "string"
},
"message": "string",
"errorCode": 0
}
POST /signals/strategyPositions
- Returns a list of open positions generated by a strategy
Request Parameter:
strategyUUID: string
Response (Status 200)
{
"data":[
{
"Id":0,
"PersonId":0,
"AccountId":0,
"BrokerAccountNumber":"string",
"InstrumentId":0,
"InstrumentDescription":"string",
"RunningSetId":0,
"TradeSignalId":0,
"PositionCreationTime":"2019-05-31T17:11:32.461Z",
"StrategyName":"string",
"TradePriceMultiplier":0,
"InstrumentType":0,
"TickerSymbol":"string",
"ContractSize":0,
"CurrencyConversionRate":0,
"EntrySide":0,
"TotalEntryQuantity":0,
"PositionEntryTime":"2019-05-31T17:11:32.461Z",
"TotalEntryValue":0,
"TotalExitQuantity":0,
"PositionExitTime":"2019-05-31T17:11:32.461Z",
"TotalExitValue":0,
"PositionStatus":0,
"AdjustedSignalPrice":0,
"PriceBasedAreActualValues":true,
"PriceBasedAverageEntryPrice":0,
"PriceBasedPositionEntryTime":"2019-05-31T17:11:32.461Z",
"PriceBasedTotalEntryQuantity":0,
"PriceBasedTotalEntryValue":0,
"IntendedEntryQuantity":0,
"EntryOrderType":0,
"EntryOrderLimitPrice":0,
"ExitOrderType":0,
"ExitOrderLimitPrice":0,
"ExitOrderTif":0,
"IsVerifiedTrade":true,
"LastPrice":0,
"PreviousClosePrice":0,
"StrategyUuid":"string",
"Side":0,
"TIF":0,
"AvgPriceOut":0,
"OpenQty":0,
"Performance":0,
"AccountTradeInRoundLotRequired":true,
"AccountOrderSizeInLots":true,
"AccountRoundLotSize":0,
"CancelOnTargetHit":true,
"CloseEndNextSession":true,
"Leverage":0
}
],
"message":"string",
"errorCode":0
}
POST /signals/positionOrders
- Returns a list of all orders associated to a given position.
Request Parameter:
"positionId": long
Response (Status 200)
{
"data":[
{
"AccountId":0,
"BrokerAccountId":"string",
"CreationTime":"2019-05-06T14:22:36.131Z",
"CustomerOrderId":"string",
"DiscretionOffset":0,
"DollarCostPerUnit":0,
"ExecutionVenueName":"string",
"InstrumentId":0,
"IsPositionOpenOrder":true,
"LastTradePrice":0,
"LimitPrice":0,
"LinkedId":"string",
"MarketSession":0,
"OrderSide":0,
"OrderSourceDestinationName":"string",
"OrderType":0,
"PersonId":0,
"RoutingDestination":"string",
"TimeInForce":0,
"TimeToLiveMinutes":0,
"TradeSignalId":0,
"CumQty":0,
"ExecutorOrderId":"string",
"Id":0,
"LeavesQty":0,
"OrderQty":0,
"OrderState":0,
"PositionId":0,
"RejectText":"string",
"ReplacementOrderId":0,
"Symbol":"string",
"BarCloseTime":"2019-05-06T14:22:36.132Z",
"OrderDescription":"string",
"StrategyUUID":"string",
"StrategyName":"string",
"AllocatedCapital":0
}
],
"message":"string",
"errorCode":0
}
Validation errors:
ErrorCode: 8060, Message: Invalid positionId or position not found
ErrorCode: 1404, Message: No open orders for this position
POST /signals/replaceOrder
- This call allows you to replace an existing unfilled (stop or limit) order.
Request Parameters:
"orderId": long
"newQuantity": long
"newPrice": double
Response (Status 200)
{ "data": "string", "message": "string", "errorCode": 0 }
Validation errors:
ErrorCode: 8060, Message: Invalid orderId or order not found
ErrorCode: 1404, Message: Too late to replace
POST /signals/{uuid}/performance
- This call allows you to retrieve the performance information of your strategy
Request Parameter:
"uuid": string
Response (Status 200)
{
"data":{
"LongOpenPositionCount":0,
"LongClosedPositionCount":0,
"LongPositionCount":0,
"ShortOpenPositionCount":0,
"ShortClosedPositionCount":0,
"ShortPositionCount":0,
"TotalOpenPositionCount":0,
"TotalClosedPositionCount":0,
"TotalPositionCount":0,
"AvailableFunds":0,
"InitialFunds":0,
"UnrealizedPerformance":0,
"UnrealizedPerformancePercentage":0,
"RealizedPerformance":0,
"RealizedPerformancePercentage":0,
"TotalPerformance":0,
"TotalPerformancePercentage":0,
"LongExposureDollars":0,
"ShortExposureDollars":0,
"LongPerformance":0,
"ShortPerformance":0,
"StrategyType":0,
"PercentReturnOnInitialCapital":0,
"CapitalChange":0,
"AccountBalance":0,
"VerifiedTradeMDDailyReturn":0
},
"message":"string",
"errorCode":0
}
Validation errors:
ErrorCode: 1000, Provided id is not GUID
ErrorCode: 5013, Strategy perfomance not found
Comments
0 comments
Article is closed for comments.