-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using the test code places order with 200 BMW shares #36
Comments
Because it's running a test case. Please say you did not run this against
your real account without running against your paper account first.
…On Thu, Sep 1, 2022 at 3:45 AM Yves ***@***.***> wrote:
Thank you for your work,
I just simply imported your crate and used this demo code you provided:
It placed an order of 200 shares of BMW, now I know you like the cars but
I can't find in this code where this is the case, I am running TWS version
Build 10.17 why is this sending orders out of the blue? Thanks!
`use std::sync::{Arc, Mutex};
use std::thread;
use std::time::Duration;
use twsapi::core::client::EClient;
use twsapi::core::errors::IBKRApiLibError;
use twsapi::core::streamer::{Streamer, TcpStreamer};
use twsapi::examples::test_helpers::TestWrapper;
fn main() -> Result<(), IBKRApiLibError> {
let wrapper = Arc::new(Mutex::new(TestWrapper::::new()));
let app = Arc::new(Mutex::new(EClient::new(wrapper.clone())));
println!("getting connection...");
wrapper.lock().expect("Wrapper mutex was poisoned").client = Option::from(app.clone());
//use port 7497 for TWS or 4002 for IB Gateway, depending on the port you have set
app.lock()
.expect("EClient mutex was poisoned")
.connect("127.0.0.1", 7496, 0)?;
//4002
thread::sleep(Duration::new(18600, 0));
Ok(())
}`
—
Reply to this email directly, view it on GitHub
<#36>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANSKV5GI7ZIYIAKSMPLOR33V4BNJLANCNFSM6AAAAAAQCCPKHY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
No of course it was on paper account login, but please remove that test case from just importing your crate and runnig your sample code, this doesn't make any sense at all. Thanks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for your work,
I just simply imported your crate and used this demo code you provided:
It placed an order of 200 shares of BMW, now I know you like the cars but I can't find in this code where this is the case, I am running TWS version Build 10.17 why is this sending orders out of the blue? When just running the below? Thanks!
The text was updated successfully, but these errors were encountered: