开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Fee Rate via API


 

Is the hard to borrow fee available via the API? It is vieable in TWS under Short Selling -> Fee Rate

ib.reqMktData(contract, tick_list=236) returns the number of shares available to short, but doesn't return the fee rate. I know it is available via FTP, but sometimes it is missing there and I would prefer to keep it up-to-date via the API. I tried searching the docs, but was unable to find it.


 


 

Thanks for the pointer, I was able to get that to work. I was hoping I could just use a market data subscription to keep it up-to-date as with shares available to short. It seems very odd that they only provide historical data for fee rate and not the current value, but at least the data is available via the API, I can request a 1-minute bar from the last minute.


 

Not sure whether it works for FEE_RATE (you could easily try it), but has parameter keepUpToDate that, if set to TRUE, continues sending you real-time-like updates after the initial historical bars have been delivered.

There are a few caveats (such as you may have to resubscribe under certain conditions and you might get multiple partial updates in some periods), but you should be able to create a reliable regular update service (say once a minute) assuming updates are available for FEE_RATE.

闯ü谤驳别苍

?

On Fri, Jan 3, 2025 at 01:04 PM, Scott Kister wrote:

Thanks for the pointer, I was able to get that to work. I was hoping I could just use a market data subscription to keep it up-to-date as with shares available to short. It seems very odd that they only provide historical data for fee rate and not the current value, but at least the data is available via the API, I can request a 1-minute bar from the last minute.


 

On Fri, Jan 3, 2025 at 09:03 PM, 闯ü谤驳别苍 Reinold wrote:

parameter keepUpToDate

They really should be redirecting people away from the old docs (see attached).