Topics

Incorrect Mintick


Joel Gross
 

When I run reqContractDetails for the stock symbol DGLY, I get a mintick back of 0.0001. However, in active trading I am only able to trade with 0.01. This throws off my code as I am trusting what TWS is telling me with the mintick. Any idea on what could be going wrong?


Nick
 

I don't know about this specific symbol but some instruments have a variable tick size based on current price.


On 9/11/2020 8:00 PM, Joel Gross wrote:
When I run reqContractDetails for the stock symbol DGLY, I get a mintick back of 0.0001. However, in active trading I am only able to trade with 0.01. This throws off my code as I am trusting what TWS is telling me with the mintick. Any idea on what could be going wrong?


 

Joel

 

Each contract details contains a list of market rule ids, one for each exchange in the 'valid exchanges' list. A market rule tells you exactly how the minimum tick varies by price. You get the details of the market rule from the reqMarketRule() function.

 

For example, for DGLY the market rule for all exchanges is the same and has id 557. Calling reqMarketRule(557) in my API test program returns the following:

 

20200912 14:53:36.070   ==== Market Rule Begin (marketRuleId=557) ====

LowEdge=0, Increment=0.0001

LowEdge=1, Increment=0.01

==== Market Rule End (marketRuleId=557) ====

 

This shows that for price >= 0 and < 1, the min tick increment is 0.0001. For prices >=1 it is 0.001.

 

A very handy mechanism!

 

Richard

 

 

From: twsapi@groups.io <twsapi@groups.io> On Behalf Of Nick
Sent: 12 September 2020 11:12
To: twsapi@groups.io
Subject: Re: [TWS API] Incorrect Mintick

 

I don't know about this specific symbol but some instruments have a variable tick size based on current price.

 

On 9/11/2020 8:00 PM, Joel Gross wrote:

When I run reqContractDetails for the stock symbol DGLY, I get a mintick back of 0.0001. However, in active trading I am only able to trade with 0.01. This throws off my code as I am trusting what TWS is telling me with the mintick. Any idea on what could be going wrong?

 


 

Oops! I meant to say:

 

For prices >=1 it is 0.01.

 

 

From: twsapi@groups.io <twsapi@groups.io> On Behalf Of Richard L King
Sent: 12 September 2020 15:58
To: twsapi@groups.io
Subject: Re: [TWS API] Incorrect Mintick

 

Joel

 

Each contract details contains a list of market rule ids, one for each exchange in the 'valid exchanges' list. A market rule tells you exactly how the minimum tick varies by price. You get the details of the market rule from the reqMarketRule() function.

 

For example, for DGLY the market rule for all exchanges is the same and has id 557. Calling reqMarketRule(557) in my API test program returns the following:

 

20200912 14:53:36.070   ==== Market Rule Begin (marketRuleId=557) ====

LowEdge=0, Increment=0.0001

LowEdge=1, Increment=0.01

==== Market Rule End (marketRuleId=557) ====

 

This shows that for price >= 0 and < 1, the min tick increment is 0.0001. For prices >=1 it is 0.001.

 

A very handy mechanism!

 

Richard

 

 

From: twsapi@groups.io <twsapi@groups.io> On Behalf Of Nick
Sent: 12 September 2020 11:12
To:
twsapi@groups.io
Subject: Re: [TWS API] Incorrect Mintick

 

I don't know about this specific symbol but some instruments have a variable tick size based on current price.

 

On 9/11/2020 8:00 PM, Joel Gross wrote:

When I run reqContractDetails for the stock symbol DGLY, I get a mintick back of 0.0001. However, in active trading I am only able to trade with 0.01. This throws off my code as I am trusting what TWS is telling me with the mintick. Any idea on what could be going wrong?

 


Joel Gross
 

Thank you very much Richard, this solves my issue!


On Sat, Sep 12, 2020 at 7:58 AM Richard L King <rlking@...> wrote:

Joel

 

Each contract details contains a list of market rule ids, one for each exchange in the 'valid exchanges' list. A market rule tells you exactly how the minimum tick varies by price. You get the details of the market rule from the reqMarketRule() function.

 

For example, for DGLY the market rule for all exchanges is the same and has id 557. Calling reqMarketRule(557) in my API test program returns the following:

 

20200912 14:53:36.070   ==== Market Rule Begin (marketRuleId=557) ====

LowEdge=0, Increment=0.0001

LowEdge=1, Increment=0.01

==== Market Rule End (marketRuleId=557) ====

 

This shows that for price >= 0 and < 1, the min tick increment is 0.0001. For prices >=1 it is 0.001.

 

A very handy mechanism!

 

Richard

 

 

From: twsapi@groups.io <twsapi@groups.io> On Behalf Of Nick
Sent: 12 September 2020 11:12
To: twsapi@groups.io
Subject: Re: [TWS API] Incorrect Mintick

 

I don't know about this specific symbol but some instruments have a variable tick size based on current price.

 

On 9/11/2020 8:00 PM, Joel Gross wrote:

When I run reqContractDetails for the stock symbol DGLY, I get a mintick back of 0.0001. However, in active trading I am only able to trade with 0.01. This throws off my code as I am trusting what TWS is telling me with the mintick. Any idea on what could be going wrong?