Giter Site home page Giter Site logo

ibrokers's People

Watchers

 avatar

ibrokers's Issues

duplicate order IDs

I have some problems with order IDs.

placeOrder sometimes works, sometimes does not and I cannot find out why.

I think it has to do with the duplicate order IDs, which is the message I get 
when running portfolio <- 
twsPortfolioValue(reqAccountUpdates(tws),zero.pos=FALSE).

However I do not understand how those duplicate IDs can exist, if I am always 
using this sequence for the order creation:
"
  id <- reqIds(tws)
  placeOrder(tws, future.NameTrade, twsOrder(id, action = "SELL", totalQuantity = noFut, orderType = "MKT", goodAfterTime = "22:14:00 CET")) 
"

Thus, I always create new id. 

Once the duplicate order message appears, there is no way to execute orders 
programmatically from R, and I have to go manually to either Gateway or TWS and 
"reset API order id sequence".

Is there a programmatic way from R to reset API order id sequence? Or how to 
get from this situation? I would like everything to run automatically and not 
have to manually reset orders ever.

Thank you for a reply,

Jozef

Original issue reported on code.google.com by [email protected] on 5 Oct 2012 at 9:09

Connot connect with tws

What steps will reproduce the problem?
1. run tws. API opened.
2. tws<-twsConnect()
3.

What is the expected output? What do you see instead?
Error in structure(list(s, clientId = clientId, port = port, server.version
= SERVER_VERSION,  : 
  object "SERVER_VERSION" not found


What version of the product are you using? On what operating system?
Windows Vista, R 2.7.2

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 12 Nov 2008 at 5:48

IBrokers hangs R execution environment

If IBrokers encounters any error, it hangs the RKWard.  Not sure if this is a 
bug in RKWard or IBrokers, but my guess would be IBrokers.

What steps will reproduce the problem?
1. Run the script below in RKWard two times in a row

What is the expected output? What do you see instead?
If you look in the bottom righthand corner it says "R engine busy" in red.  
Functionality such as viewing variable contents no longer works.

What version of the product are you using? On what operating system?
RKWard 0.5.3 on Linux.


Offending script:
library(IBrokers)
tws <- twsConnect()
aapl <- reqHistoricalData(tws, twsEquity("AAPL"), "20100911 16:00:00", barSize 
= "1 min", duration = "1 D")
twsDisconnect(tws)

Original issue reported on code.google.com by [email protected] on 13 Aug 2010 at 3:20

reqHistoricalData: tzone argument does not seem to work correctly

What steps will reproduce the problem?

My local timezone is GMT+2. However, I want to use America/Chicago for 
subsequent operations. Which works with standard time operations like 
Sys.time(). Here is the discrepancy.

> Sys.timezone()
[1] "America/Chicago"
> spy =  reqHistoricalData(tws, twsEquity("SPY"), barSize="5 mins", 
duration="600 S", tzone="America/Chicago")
TWS Message: 2 -1 2100 API client has been unsubscribed from account data. 
waiting for TWS reply on SPY .... done.
> spy
                    SPY.Open SPY.High SPY.Low SPY.Close SPY.Volume SPY.WAP SPY.hasGaps SPY.Count
2014-08-08 00:40:00   192.22   192.30  192.19    192.26       3793 192.233      
     0       757
2014-08-08 00:45:00   192.26   192.36  192.19    192.21       4364 192.286      
     0       743
2014-08-08 00:50:00   192.19   192.27  192.14    192.22       3420 192.211      
     0       673
> Sys.time()
[1] "2014-08-07 18:54:58.144836 CDT"
> index(spy)
[1] "2014-08-08 00:40:00 CDT" "2014-08-08 00:45:00 CDT" "2014-08-08 00:50:00 
CDT"
> spy =  reqHistoricalData(tws, twsEquity("SPY"), barSize="5 mins", 
duration="600 S")
waiting for TWS reply on SPY .... done.
> spy
                    SPY.Open SPY.High SPY.Low SPY.Close SPY.Volume SPY.WAP SPY.hasGaps SPY.Count
2014-08-08 00:45:00   192.26   192.36  192.19    192.21       4364 192.286      
     0       743
2014-08-08 00:50:00   192.19   192.27  192.14    192.18       3898 192.208      
     0       751
2014-08-08 00:55:00   192.19   192.22  192.13    192.15       2483 192.174      
     0       445

What is the expected output? What do you see instead?

It seems like you're trying to diff the time, but that doesn't seem to work. I 
couldn't find a way to fix this yet.

It seems to think that GMT+1 (?) is equal to America/Chicago. Completely 
unexpected at any rate. Somehow time zone information is lost.

> Sys.setenv(TZ="Europe/Istanbul")
> Sys.time()
[1] "2014-08-08 03:01:04.078636 EEST"

What version of the product are you using? On what operating system?

0.9-10 on OS X

Please provide any additional information below.

You can mail me privately if you'd like. Cheers!

Original issue reported on code.google.com by [email protected] on 8 Aug 2014 at 12:01

Connection problem

What steps will reproduce the problem?
1. tws <- twsConnect()

What is the expected output? What do you see instead?
Error in structure(list(s, clientId = clientId, port = port, 
server.version = SERVER_VERSION,  : 
  object 'SERVER_VERSION' not found

What version of the product are you using? On what operating system?
R version 2.10.0 (2009-10-26)
Ibrokers 0.2-4 (2009-08-11)
OS: Debian Testing

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 12 Jan 2010 at 12:49

Bug gettion option info

I use IBrokers on Linux

Simple code and its output:

opt <- twsOption(expiry="20130315", strike="21",local="", right="C", 
symbol="INTC")
reqMktData(tws, opt)


<20130315 15:59:12.920284> id=1 symbol=INTC lastSize: 20 
<20130315 15:59:12.920680> id=1 symbol=INTC Volume: 8449 
<20130315 15:59:12.921341> id=1 symbol=INTC highPrice: 0.65 
<20130315 15:59:12.921747> id=1 symbol=INTC lowPrice: 0.28 
<20130315 15:59:12.922291> id=1 symbol=INTC closePrice: 0.65 
<20130315 15:59:12.922644> id=1 symbol=INTC lastTimestamp: 1363377492 
<20130315 15:59:12.922978> id=1 symbol=INTC Halted: 0.0 
TWS Message: 2 -1 2119 Market data farm is connecting:usopt 
<20130315 15:59:13.174221> id=1 symbol=INTC modelOption: impVol:  
0.1956849992275238  delta: 0.999999999999999  modelPrice:  0.3600011338569562  
pvDiv:  0.0  gamma:  -4.009075294604543E-11  vega:  1.5483198888680883E-14  
theta:  -1.6327539756222365E-4  undPrice:  21.36 
TWS Message: 2 -1 2104 Market data farm connection is OK:usopt 
<20130315 15:59:13.486186> id=1 symbol=INTC closePrice: 0.65 
<20130315 15:59:13.486725> id=1 symbol=INTC Volume: 8457 
<20130315 15:59:13.487112> id=1 symbol=INTC highPrice: 0.65 
<20130315 15:59:13.487522> id=1 symbol=INTC lowPrice: 0.28 
<20130315 15:59:13.487965> id=1 symbol=INTC lastTimestamp: 1363377550 
<20130315 15:59:13.488381> id=1 symbol=INTC lastPrice: 0.37 
<20130315 15:59:13.488759> id=1 symbol=INTC lastSize: 5 
<20130315 15:59:13.489135> id=1 symbol=INTC bidPrice: 0.35  bidSize: 494 
<20130315 15:59:13.489541> id=1 symbol=INTC askPrice: 0.37  askSize: 3406 
<20130315 15:59:13.489936> id=1 symbol=INTC bidSize: 494 
<20130315 15:59:13.490294> id=1 symbol=INTC askSize: 3406 
<20130315 15:59:13.621428> id=1 symbol=INTC optionCallOpenInterest: 42602 
<20130315 15:59:13.621836> id=1 symbol=INTC optionPutOpenInterest: 0 
<20130315 15:59:13.922365> id=1 symbol=INTC bidSize: 513 
<20130315 15:59:13.922732> id=1 symbol=INTC askSize: 3380 
<20130315 15:59:14.003092> id=1 symbol=INTC bidOption: -1 -2 
<20130315 15:59:14.003583> id=1 symbol=INTC askOption: 2.826760735226004 
0.9184333627898871 
<20130315 15:59:14.004014> id=1 symbol=INTC lastOption: 2.826760735226004 
0.9184333627898871 
<20130315 15:59:14.005832> id=1 symbol=INTC modelOption: impVol:  
2.826760735226004  delta: 0.9184333627898871  modelPrice:  0.370000000001884  
pvDiv:  0.0  gamma:  0.5760957620536729  vega:  1.4796454132893913E-4  theta:  
-2.877241331844451  undPrice:  21.36 
<20130315 15:59:14.925486> id=1 symbol=INTC bidSize: 594 
<20130315 15:59:16.629393> id=1 symbol=INTC bidSize: 658 
<20130315 15:59:16.629796> id=1 symbol=INTC askSize: 3358 
<20130315 15:59:17.731887> id=1 symbol=INTC bidSize: 691 
<20130315 15:59:17.732255> id=1 symbol=INTC askSize: 3107 
<20130315 15:59:17.784939> id=1 symbol=INTC modelOption: impVol:  
2.826760735226004  delta: 0.9117902345558202  modelPrice:  0.3609915971320222  
pvDiv:  0.0  gamma:  0.6098849008489783  vega:  1.5586516089414836E-4  theta:  
-3.043136018620518  undPrice:  21.35 
<20130315 15:59:18.035754> id=1 symbol=INTC bidOption: -1 -2 
<20130315 15:59:18.036185> id=1 symbol=INTC askOption: 3.379444579514946 
0.8736280563971375 
<20130315 15:59:18.036636> id=1 symbol=INTC lastOption: 3.379444579514946 
0.8736280563971375 
<20130315 15:59:18.633736> id=1 symbol=INTC bidSize: 626 
<20130315 15:59:18.634130> id=1 symbol=INTC askSize: 2723 
<20130315 15:59:19.001366> id=1 symbol=INTC modelOption: impVol:  
2.826760735226004  delta: 0.9184333627898871  modelPrice:  0.370000000001884  
pvDiv:  0.0  gamma:  0.5760957620536729  vega:  1.4796454132893913E-4  theta:  
-2.877241331844451  undPrice:  21.36 

Please check option implied volatility and other Greeks, the first time it is 
correct (0.1956849992275238), the second and following times 
(2.826760735226004) it is not correct, please suggest how to fix it?



Original issue reported on code.google.com by [email protected] on 15 Mar 2013 at 8:07

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.