Invalid Time In Force
The provided timeInForce value is invalid. The timeInForce field must be one of the following values: day, gtc, gtd, opg, cls, ioc, or fok.
This message indicates that the timeInForce value provided in the request is invalid. TradersPost requires that the timeInForce parameter be one of the following values: day, gtc, gtd, opg, cls, ioc, or fok. Any other value will be considered invalid, and the request will not be processed.
- If you send a time in force that is not supported by your broker, TradersPost will fallback to the time in force configured in your strategy settings.
The timeInForce parameter specifies how long the order will remain active before it is executed or canceled. The following are the values accepted by webhook validation:
day- The order is valid for the trading day and will be canceled if not executed by the end of the trading day.gtc- The order is good until canceled and will remain active until it is executed or canceled.gtd- Accepted as an enum value for compatibility (and when mapping orders returned by brokers), but TradersPost does not support creating Good Until Date orders because there is no way to supply the expiration date. Preferdayorgtc.opg- The order is valid for the opening of the market and will be canceled if not executed at the market open.cls- The order is valid for the closing of the market and will be canceled if not executed at the market close.ioc- The order is immediate or canceled, meaning it must be executed immediately or canceled.fok- The order is fill or kill, meaning it must be executed immediately in its entirety or canceled.
Invalid timeInForce example:
{
"ticker": "AAPL",
"action": "buy",
"orderType": "limit",
"limitPrice": 150,
"timeInForce": "invalid"
}
Valid timeInForce example:
{
"ticker": "AAPL",
"action": "buy",
"orderType": "limit",
"limitPrice": 150,
"timeInForce": "day"
}
In the above examples, a valid timeInForce value ensures that the request meets the required parameters for processing.
Ready to put Invalid Time In Force to work?
Free 7-day trial
Set-up in 3 minutes
Paper account for testing
By continuing, you agree to the TradersPost Terms of Service and Privacy Policy. This site is protected by reCAPTCHA.