Keyboard Shortcuts
Likes
- Twsapi
- Messages
Search
Re: TWS API earning dates..
Hi, ? with Wall Street Horizon subscription, reqFundamentalData(reqId:10000001, Contract:<XOM>, FundamentalType.CalendarReport) gives:
|
Re: TWS API earning dates..
hi Robbo , I tried the same, not getting results, Do I need WSJ subs? I tried it with that too. but not getting
<Annual endMonth="12" fYear="2021" fyNum="0" periodLength="12" periodUnit="MNS"> <Interim endCalYear="2021" endMonth="3" periodLength="3" periodNum="1" periodUnit="MNS" type="Q"/>
<Interim endCalYear="2021" endMonth="6" periodLength="3" periodNum="2" periodUnit="MNS" type="Q"/>
<Interim endCalYear="2021" endMonth="9" periodLength="3" periodNum="3" periodUnit="MNS" type="Q"/>
<Interim endCalYear="2021" endMonth="12" periodLength="3" periodNum="4" periodUnit="MNS" type="Q"/>
? |
Re: The 'EtradeOnly' order attribute is not supported.
Nick
开云体育If TWS allows a connection from your version of the API then the
attributes themselves are supported. It's particular values of the
attributes that are no longer accepted so setting to False is the
right thing to do. On 4/30/2021 3:55 PM,
neil@... wrote:
This is untested, but since the two attributes are unsupported, I feel comfortable just setting them to False when I create the order object. |
Re: The 'EtradeOnly' order attribute is not supported.
This is untested, but since the two attributes are unsupported, I feel comfortable just setting them to False when I create the order object.
``` order_object = self.create_order(order) order_object.eTradeOnly = False order_object.firmQuoteOnly = False ``` The error messages went away. |
Re: Long on the stock, want to exit but: Order rejected The contract is not available for short sale
开云体育Ace, my experience of the paper-trading system, which I actively use all day every trading day, would lead me to suggest that it's unlikely that what you describe indicates a flaw in the system. My bet would be that there's something you've overlooked in your program. ? As a ?general suggestion, I'd say that if you cannot prove from your logs that your position was exactly what you think it was and that your closing order was for exactly that quantity, then you're probably not logging enough information. ? And if you can prove it from your logs, then you should raise it with IB because I'm quite certain that they'd be keen to know of such a flaw. ? Richard ? ? From: [email protected] <[email protected]> On Behalf Of Ace
Sent: 30 April 2021 18:48 To: [email protected] Subject: Re: [TWS API] Long on the stock, want to exit but: Order rejected The contract is not available for short sale ? Hi Peter, |
Re: Long on the stock, want to exit but: Order rejected The contract is not available for short sale
A,? If it's in your paper account, welcome to IB..
If it's production, check that the contractID is the same, and the exchange is right (SMART, or whatever came on the Position record itself). If IB were to think it was a different security, your sell would be from a basis of 0 making it a short. Otherwise report it IB, and send in your logs. -Peter |
Re: Long on the stock, want to exit but: Order rejected The contract is not available for short sale
Is your algorithm trying to sell more shares than what the position holds? Maybe the fill quantity was slightly smaller than what the algorithm had ordered?
toggle quoted message
Show quoted text
JR On Thu, Apr 29, 2021 at 09:02 PM, Ace wrote: Hi, |
Long on the stock, want to exit but: Order rejected The contract is not available for short sale
Hi,
My algo took a long position on a stock and when target was reached and wanted to exit I got this message: 201 Order rejected - reason:The contract is not available for short sale. I'm aware of? this message if I want to go short on a stock. But if I bought and own the shares why does this happen? The algo runs in paper trading account so is it related? Can this really happen live? Thanks A |
Re: Custom Scanners?
Patrick, Re: "we cannot pull our already made scanners in TWS into Python?" No, we can not, but we can look inside the already made scanner?to get all the associated attributes names etc. Click on the floppy-disk icon in the top-right corner of the TWS classic scanner window and choose "Save template": and store the file, then look inside that file and you'll see "internals" of your custom scanner: Another place to have a sneak-peek inside your TWS scanners is to analyze TWS log lines around the time when you sent the scanner request. It will be serialized to one loong string with all the parameters and their values. Cheers, Dmitry Shevkoplyas On Thu, Apr 29, 2021 at 3:14 PM hymagik via <hymagik=[email protected]> wrote: On Thu, Apr 29, 2021 at 07:08 AM, Despair wrote: |
Re: CANNOT COMPILE C++ CODE WITH VISUAL STUDIO 2017
The project come with default SDK /Plateform settings (generally Win 8.1) Like below
|
Re: Do I need to create a GUI for using the IBAPI sample program TestCppClient. Thanks.
Yes! In case you want to dig UI like, run the C# version (if you have VS STudio), it have some UI that may give a seed for something assuming you know or will master a little of C# Not sure how official is this shell |
Re: Custom Scanners?
On Thu, Apr 29, 2021 at 07:08 AM, Despair wrote:
Look what you look for. In case you consider it, the answer is something like a series or entries alike this single one below (for STK) Sorry the "Past" remove some '>' and '<' but you should get the idea.
|
Re: Can a bracket order have two take profit orders to exit a position at two different profit levels?
Yeah, AFAIK it's not possible to set different sizes in a simple bracket order so it's pretty perplexing that IB support would suggest that. It is possible with the pair-trade variety of the bracket order but even then the sizes are not set independently but using a beta-ratio.
|
Re: Custom Scanners?
In addition here are the some specific filters:
ScannerSubscription scannerSubsctiption = new ScannerSubscription();
?
scannerSubsctiption.numberOfRows(scannerResultRows);
scannerSubsctiption.scanCode("HOT_BY_PRICE");
scannerSubsctiption.instrument("STK");
scannerSubsctiption.locationCode("STK.US.MAJOR");
scannerSubsctiption.stockTypeFilter("ALL");
scannerSubsctiption.abovePrice(abovePrice);
scannerSubsctiption.belowPrice(belowPrice); ? ? ? ? ? ? ? ? List<TagValue> scannerTagValues?= Arrays.asList(new TagValue("volumeRateAbove", "2000")); ? ? ? ? ? ? ? ? socket.reqScannerSubscription(scannerId, scannerSubsctiption, null,? scannerTagValues); |
Re: Can a bracket order have two take profit orders to exit a position at two different profit levels?
Forgot to attached a couple screen grabs.
First the five orders. Please note that 23.1 was placed with a quantity of 500.via the API. Attempt to change quantity of 23.1 via API fails without error and TWS quanitty field is greyed out. |