Keyboard Shortcuts
Likes
- Twsapi
- Messages
Search
Re: TWS API Linux - Segmentation fault - __bid64_to_string
I strongly recommend to use a containerized setup for tws/ib-gateway in wsl.
If you chose ubuntu as host for wsl, then lxd (sudo snap install lxd) should do it. There is an automated setup for a trading-environment in a lxd-container:? If needed, you can just copy the instance to a cloud-instance or a ?real? ubuntu-machine. hartmut |
Re: TWS API Linux - Segmentation fault - __bid64_to_string
Only reason really have windows installed on this machine is the wife and kids use it - however - running a few strategies on python / c++ - cpu usuage was about 8%. So using linux here on VM maybe wont slow too much BUT there is a whole GUI with ubuntu to the point i dont think my wife and kids would get lost for general browing of the internet. Dual boot maybe - lets see if i can get this whole thing up and running on linux.?
|
Re: How is auction price calculated?
¿ªÔÆÌåÓýJust thought it worth adding that different exchanges will employ different methods for calculating the auction price given the state of the order book. If you want to know the exact method you will need to look it up for each exchange individually on the exchanges website. Usually they publish the method somewhere.?Also, some exchanges don¡¯t publish the auction price, volume, imbalance, or some combination, for general retail users (as near as I can tell). If they do publish for retail users then Level 1 data for the exchange should give you access. On 9 Jan 2023, at 3:33 am, cactus74@... wrote:
|
Re: TWS API Linux - Segmentation fault - __bid64_to_string
Thanks for looking into this with me.?
root@flare9x:~/IBJts/source/cppclient/client/lib# g++ -dumpmachine ?I just recently installed WLS as per instruction from ubuntu - they have you download it from Microsoft store. I can check to make sure its as intended.? When I installed everything inside the WSL, ubuntu? sudo apt-get update sudo apt-get install -y xterm or package here Well I got TWS offline version installed? installed javaFX and?xterm installed and configured IBC? TWS - current/latest version works OK when loaded? TWS Offline works just fine running it via IBC? using IDE?KDevelop I can make a simple hello_world.cpp and run it with g++? I installed?g++-multilib root@flare9x:~/IBJts/source/cppclient/client/lib# dpkg -s gcc-multilib
Package: gcc-multilib
Status: install ok installed
Priority: optional
Section: devel
Installed-Size: 8
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@...>
Architecture: amd64
its amd64 architecture? I mean I thought i'd give 32 bit a go since the same code was running OK on windows when i did that, it seemed like the libraries that came with the linux version are setup for 64bit vs 32bit which is fine.? Ok leaning towards VM and ubuntu. One last check of WSL install.? |
Re: TWS API Linux - Segmentation fault - __bid64_to_string
Do you have the 64-bit versions of gcc and the standard libs installed via apt?? Also, I believe that there is something wrong with WSL somehow.? Possibly your specific setup (wrong libs installed?) or possibly some issue with how the libraries are getting loaded (maybe you need some sort of WSL specific thing).? No idea but I strongly suggest you stop trying to get WSL to work.? Unless you are professional C++ dev and are pretty good at it, it is going to be tough going for you.? Just download a Ubuntu VM and fire up VMWare or some other VM and run Ubuntu properly.? Or run it natively as a dual boot.? Or run Ubuntu inside of Docker.? Trying to make it work via WSL is just making your life difficult for no real good reason. Hunter
On Sunday, January 8, 2023 at 02:49:18 PM PST, <bannerman1985@...> wrote:
Yeah - loading project file in Microsoft visual studio - it defaults to win32. On windows I couldn't get it to compile on 64bit.? I tried both 32 and 64bit here - indeed running 32bit on this architecture - threw the lib error. Context of the lib directory? ``` root@flare9x:~/IBJts/source/cppclient/client/lib# ls
eula.txt? libbid.a? libbid.so
``` When i run objdump -f libbid.a ``` root@flare9x:~/IBJts/source/cppclient/client/lib# objdump -f libbid.a
In archive libbid.a:
?
bid64_acos.o:? ? ?file format pe-x86-64
architecture: i386:x86-64, flags 0x00000039:
HAS_RELOC, HAS_DEBUG, HAS_SYMS, HAS_LOCALS
start address 0x0000000000000000
?
?
bid64_acosh.o:? ? ?file format pe-x86-64
architecture: i386:x86-64, flags 0x00000039:
HAS_RELOC, HAS_DEBUG, HAS_SYMS, HAS_LOCALS
start address 0x0000000000000000
``` When i run objdump -f libbid.so ``` root@flare9x:~/IBJts/source/cppclient/client/lib# objdump -f libbid.so
?
libbid.so:? ? ?file format pei-x86-64
architecture: i386:x86-64, flags 0x0000013b:
HAS_RELOC, EXEC_P, HAS_DEBUG, HAS_SYMS, HAS_LOCALS, D_PAGED
start address 0x0000000489e94a60
``` |
Re: TWS API Linux - Segmentation fault - __bid64_to_string
Yeah - loading project file in Microsoft visual studio - it defaults to win32. On windows I couldn't get it to compile on 64bit.?
I tried both 32 and 64bit here - indeed running 32bit on this architecture - threw the lib error. Context of the lib directory? ``` root@flare9x:~/IBJts/source/cppclient/client/lib# ls
eula.txt? libbid.a? libbid.so
``` When i run objdump -f libbid.a ``` root@flare9x:~/IBJts/source/cppclient/client/lib# objdump -f libbid.a
In archive libbid.a:
?
bid64_acos.o:? ? ?file format pe-x86-64
architecture: i386:x86-64, flags 0x00000039:
HAS_RELOC, HAS_DEBUG, HAS_SYMS, HAS_LOCALS
start address 0x0000000000000000
?
?
bid64_acosh.o:? ? ?file format pe-x86-64
architecture: i386:x86-64, flags 0x00000039:
HAS_RELOC, HAS_DEBUG, HAS_SYMS, HAS_LOCALS
start address 0x0000000000000000 ``` When i run objdump -f libbid.so ``` root@flare9x:~/IBJts/source/cppclient/client/lib# objdump -f libbid.so
?
libbid.so:? ? ?file format pei-x86-64
architecture: i386:x86-64, flags 0x0000013b:
HAS_RELOC, EXEC_P, HAS_DEBUG, HAS_SYMS, HAS_LOCALS, D_PAGED
start address 0x0000000489e94a60
``` |
Re: Standard deviation for strike
¿ªÔÆÌåÓýI don't understand what you mean by "std deviation of strike". The underlying (i.e. stock price) has a std deviation, so the color coding just shows how far, in terms of std deviation, the underlying would need to move for the option to become
in the money. I believe your formula is correct assuming you start from annual IV.
On Jan 8, 2023 at 7:32 AM -0800, leonid.dmitricenko via groups.io <leonid.dmitricenko@...>, wrote:
|
Re: TWS API Linux - Segmentation fault - __bid64_to_string
The static library to which you are linking is compiled for a different CPU architecture (specifically it is compiled for x86-64):
Running ubuntu.? Running Cpp sample client out of the box. I receive a segmentation fault.
Have sourced this function to client file to?
This may have something to do with the floating point library that the API documentation mentions: Intel? Decimal Floating-Point Math Library I have checked if this is installed on my ubuntu version, using WSL Ubuntu 20.04.05
Looking at the makefile:
The interesting part - I can compile the exact same code on Windows, VScode in win32. I have tried to enforce 32bit with gcc. adding -m32. When doing this compiler shows numerous complaints:
I commented out these functions which include %lu as do not need them in main application. Compile again, this time we have errors with the librarys that are packaged with the TWS API - the Intel decimal floating point math library, these libs come with the original TWS installation and locate:
win32 runs this just fine vscode. running with ```gcc -m64`` Obtain seg fault again:
Not sure what it could be at this point - WSL and running ubuntu on windows - that process manages memory? is ubuntu clashing with windows. At this point - what else can I check / troubleshoot? Thanks |
TWS API Linux - Segmentation fault - __bid64_to_string
Running ubuntu.?
Running Cpp sample client out of the box. I receive a segmentation fault.
Have sourced this function to client file to?
This may have something to do with the floating point library that the API documentation mentions: Intel? Decimal Floating-Point Math Library I have checked if this is installed on my ubuntu version, using WSL Ubuntu 20.04.05
Looking at the makefile:
The interesting part - I can compile the exact same code on Windows, VScode in win32. I have tried to enforce 32bit with gcc. adding -m32. When doing this compiler shows numerous complaints:
I commented out these functions which include %lu as do not need them in main application. Compile again, this time we have errors with the librarys that are packaged with the TWS API - the Intel decimal floating point math library, these libs come with the original TWS installation and locate:
win32 runs this just fine vscode. running with ```gcc -m64`` Obtain seg fault again:
Not sure what it could be at this point - WSL and running ubuntu on windows - that process manages memory? is ubuntu clashing with windows. At this point - what else can I check / troubleshoot? Thanks |
Standard deviation for strike
Hello! I want to ask how to calculate standard deviation for strike which is shown in option chains as popup on mouse cursor hover on strike: I found that 1 standard deviation = stock price * volatility * square root of days to expiration/365. But in case of strike STD, stock price should be replaced with strike and what volatility should be used? IV? Thanx ? |
Re: Request Historical Data with Keep up to date set to true
I think you have led me to a solution. I am using an older version of the ewrapper from an older version of the API. I have been working in VS2015 just because it is what I had installed. I can't open the newer samples with it, so I am downloading a new version of Visual Studio. I have a slow internet connection, so it may be a while? before I can look and see for sure. Thanks for your help. |
Re: IBKR API: ERROR -1 1100 Connectivity between IB and Trader Workstation has been lost.
They will definitely occur in case your internet connection is flaky. But We get them every night during the scheduled reset period (see ) Wednesday night we received
All times are US/Central. ´³¨¹°ù²µ±ð²Ô |
Re: IBKR API: ERROR -1 1100 Connectivity between IB and Trader Workstation has been lost.
When do you experience the 1100 errors, oho? During the IBKR maintenance windows and on weekends? Take a look at the section of the TWS API Reference Guide. At the top of that section you'll find a little more detail about connection errors. When we receive 1100 errors, we shortly after that receive code 1102 "Connectivity between IB and TWS has been restored- data maintained." so that nothing really needs to be done. The connection between our clients and TWS./IBGW is never impacted so that the clients do not have to restart. We have never seen code 1101 "Connectivity between IB and TWS has been restored- data lost.". In case your client gets this message code, simply resubmit the market data requests your client had active before error 1100. ´³¨¹°ù²µ±ð²Ô On Thu, Jan 5, 2023 at 11:34 AM, <autotest890@...> wrote:Hi, |
Re: Main app in new process vs new thread (Python)
On Thu, Jan 5, 2023 at 11:30 PM, GreenGreen wrote:
Yeah, well... give it time and that stuff will become obvious. I was just taking an educated guess but if you're really curious you can actually read through the Python code for multiprocessing . Look inside process.py and subsequently context.py to get the final word on exactly what's happening "under the hood". Have fun :-) |