API Support Forum
User Profile

Viewing User Profile for: PNannis


About

Apr 16, 2014 11:44 AM

Jul 01, 2024 03:25 PM

Jul 01, 2024 03:25 PM



Post Statistics
PNannis has contributed to 17 posts out of 5677 total posts (0.30%) in 3871 days (0.00 posts per day).

20 most recent posts:

Market Data » Download Hisotrical Tick Data (GF API) Jul 01, 2024 @ 03:25 PM (Total replies: 6)

Yes, getting the same results, that explains why I wasn't seeing ticks last night. It would be SOOO much easier if you could adjust the design so that a user can request a bigger chunk (a full trading day) at a time and then received partial responses until the request is fulfilled or dropped. Especially since you have to create a new subscription for each 65536 tick chunk .. just a suggestion.
Peter Nannis


Market Data » Download Hisotrical Tick Data (GF API) Jul 01, 2024 @ 01:58 PM (Total replies: 6)

Tried the above again and got some ticks returned. Went back to my previous approach I initially posted (LastQuoteTime starts as the end of the range OR the earliest tick when repeating the requests). Now I get ticks returned back to 6.22 AM PT , prior to that no ticks get returned. (This is Dev environment, user is PNannisTM)

utcStart = ConvertChartTimeToGFTime(dataRequest.DownloadFromTime);
utcEnd = ConvertChartTimeToGFTime(dataRequest.LastQuoteTime);

GF.Api.Subscriptions.Duration duration = new GF.Api.Subscriptions.Duration(
utcStart,
utcEnd,
0,
GF.Api.Subscriptions.Continuity.OneTime);

dataRequest.TickSub = gfClient.Subscriptions.Ticks.Subscribe(contractId, duration);
Peter Nannis


Market Data » Download Hisotrical Tick Data (GF API) Jun 30, 2024 @ 09:35 PM (Total replies: 6)

So I've tried everything I can think of to make it work, I've been messing with combinations of your suggestions above to no avail. I'm just trying to download a simple time range and I've now dumbed it down to the snippet below.
I submit the request below and get 0 ticks in response, we're several hours into the globex session (Sunday 6.30 7.30PM Pacific). Why wouldn't the request below return any ticks?

DateTime utcStart = DateTime.UtcNow.AddHours(-1);
DateTime utcEnd = DateTime.UtcNow;

GF.Api.Subscriptions.Duration duration = new GF.Api.Subscriptions.Duration(
utcStart,
utcEnd,
0,
GF.Api.Subscriptions.Continuity.OneTime);

dataRequest.TickSub = gfClient.Subscriptions.Ticks.Subscribe(contractId, duration);
Peter Nannis


Market Data » Download Hisotrical Tick Data (GF API) Jun 21, 2024 @ 12:14 PM (Total replies: 6)

I’m trying to request the Tick data for one historical trading day at a time. I have one live price feed subscription like this (just to receive live prices without and backfill (ESU24, in the development environment, username is PNannisTM).
GF.Api.Subscriptions.Duration duration = new GF.Api.Subscriptions.Duration(DateTime.UtcNow, null, 0, GF.Api.Subscriptions.Continuity.Continuous);
GF.Api.Subscriptions.Ticks.ITickSubscription pTickSub = gfClient.Subscriptions.Ticks.Subscribe(e.Contracts[0].ID, duration);

Then when the platform wants to pull a day of tick data I submit a new request like this (where LastQuoteTime is initialized to the end time of the range requested):

GF.Api.Subscriptions.Duration duration = new GF.Api.Subscriptions.Duration(
ConvertChartTimeToGFTime(dataRequest.DownloadFromTime),
ConvertChartTimeToGFTime(dataRequest.LastQuoteTime),
65536,
GF.Api.Subscriptions.Continuity.OneTime);
dataRequest.TickSub = gfClient.Subscriptions.Ticks.Subscribe(contractId, duration);

which results in the last 65536 ticks from the end time of the requested range. So then I re-submit the same request above but adjust the LastQuoteTime to one second earlier than the first tick received in the response.

The response is again 65536 ticks but the range is just a huge overlap with the previous received range with the first tick in the response a few minutes earlier or the same as the LastQuoteTime and the last tick received a few minutes earlier or the same as the last tick received.

What could be the problem here and is there any easier way to download a previous day's tick data (not far back, just one or two days) ?

?Peter
Peter Nannis


API Support » Block account position problem/bug ? Jan 21, 2020 @ 10:26 AM (Total replies: 1)

Got a simple block account "BWT" under username PNannisTM using with 2 accounts using 3 contracts per block trade (1 for API002704 and 2 for API00320)

I place ONE block trade and then add manually ONE contract to one of the accounts that is part of the block (API002704) i.e. block account BWT=+3 and account API002704=+2. Now the gfPosition.Net.Volume value on the block account is showing +4 i.e. includes the additional manual trade that was made outside the block account. This is also reported the same on OECTrader. Shouldn't the block account position exclude the manual position that was added?

I'm currently using the Sourcefill Comments field (value = "AB") to identify and separate the block fills from the manual fills when re-syncing but it gets confusing when sanity checking the position against the API reported position which is different.

I'll leave it like this for today's session (1/21) of you want to check it out.

Version, GF.Api 4.0.3.12 , GF.Api.Impl 4.0.3.16, GF.Api.Values 4.0.3.5, GF.Api.Common 4.0.3.1
Peter Nannis


API Support » New GF API Market Orders Jan 16, 2020 @ 12:49 PM (Total replies: 1)

Figured it out .. please ignore.
Peter Nannis


API Support » New GF API Market Orders Jan 15, 2020 @ 03:42 PM (Total replies: 1)

I'm getting a "Nullable object must have a value" exception when trying to send a Market Order. Limit, Stop and StopLimit orders are working fine. Not getting any Validation errors and the exception occurs at gfClient.Orders.SendOrder(newOrderDraft) . I've tried stripping it down to only using the fields you use in the online order examples but getting same result.

The order draft is set as below and builds fine.

newOrderDraft = new GF.Api.Orders.Drafts.OrderDraftBuilder()
.WithSide(tType)
.WithContractID(newOrderContract.ID)
.WithComments(tmpOrderID)
.WithAccountID(account.ID)
.WithAllocationBlock(allocationBlock)
.WithQuantity(quantity)
.WithOrderType(oType)
.WithFlags(goodTill)
.WithSubmissionType(GF.Api.Values.Orders.SubmissionType.Manual);

Version, GF.Api 4.0.3.12 , GF.Api.Impl 4.0.3.16, GF.Api.Values 4.0.3.5, GF.Api.Common 4.0.3.1
Peter Nannis


API Support » Re-syncing carried position on Allocation Block(s) Mar 08, 2018 @ 12:38 PM (Total replies: 2)

for username PNannisTM in the Development environment.

I left yesterday's session with
Block "BWT", ESH8 +3@2707 and ZBH8 -3@143.12
Block "BW Block", ESH8 -5@2721.50 and ZBH8 +5@143.03

In OEC Trader (as well as my platform) I get for today's session
Block "BWT", ESH8 -2@2721.50 and ZBH8 +2@143.03
Block "BW Block", ESH8 -2@2721.50 and ZBH8 +2@143.03

which is the summary of the NET positions for the underlying accounts. Is there a way to re-construct the initial block positions I left the previous session with?
Peter Nannis


API Support » Re-syncing carried position on Allocation Block(s) Mar 07, 2018 @ 10:41 PM (Total replies: 2)

During the trading session the Allocation Block orders are maintained so you can properly report the total position for the Allocation Block. However after the End-Of-Day processing these orders disappears and only the net position for the underlying accounts are reported. If you only had ONE allocation block then you could add the sub account positions together to calculate it, BUT if you have 2 allocation blocks with separate positions including the same underlying accounts there is no way to re-construct the position for the block accounts (since you only get the net position for each underlying account). How is this supposed to be done?
Peter Nannis


API Support » Allocation Blocks not saving to Server Feb 28, 2018 @ 12:45 PM (Total replies: 4)

That was it .. knew it was something simple. Thanks.
Peter Nannis


API Support » Allocation Blocks not saving to Server Feb 28, 2018 @ 11:26 AM (Total replies: 4)

username is PNannisTM, on the Development environment. I'm using API 3.5.14.41 (latest stable) and OE Trader 3.5.15.398.

I've added an Allocation Block (BWT, Wash account=peterblock) in my software and placed & cancelled a limit buy which I can see on OEC Trader correctly listed under the BWT allocation block with 3 Limit orders. If I look at the Allocation Block Manager in OEC Trader there is no BWT block (even after re-login) and same thing on my end, i.e. the BWT Block doesn't save.

You should be able to see the limit order I placed for reference.
Peter Nannis


API Support » Allocation Blocks not saving to Server Feb 26, 2018 @ 08:41 PM (Total replies: 4)

Got most of it working and I can create and modify allocation blocks locally and place orders that generate the block as it should. However, the allocation blocks I create doesn’t save and get re-created when I exit and log back in again. They don’t show on the OEC client side either (even after re-login).

If I create them on the OEC client it works ok and the blocks saves and I can see those changes on my end when I login as well.

No obvious “save” function and I thought it was automatically done when I disconnected (oecClient.Disconnect())

How do I get the Allocation Blocks to save ?
Peter Nannis


Market Data » Overnight Position Prices Jul 07, 2014 @ 03:10 PM (Total replies: 3)

That's what I am doing but for Overnight position the "SourceFill" is set to null and the price is an Average Price and not each partial fill of a position.

So where to a get each individual fill for a position that is carried across sessions?

?Peter

Peter Nannis

Market Data » Overnight Position Prices Jun 30, 2014 @ 11:01 AM (Total replies: 3)

I noticed that when I carry a position across sessions the price in the position record reflects the average fill price not and not each open fill that made up the open position.

Is there any way to get the price & quantity of each individual fill of a carried position?

I need it to properly calculate P&L when closing the position.

Peter Nannis

Market Data » How to differentiate between ticks(trades) and bid/ask updates Jun 30, 2014 @ 10:57 AM (Total replies: 4)

I figured it out so I am posting this reply so that others with the same issue may benefit.

To get a true streaming tick feed you need to subscribe to the price feed using the "SubscribeTicks" method (not "Subscribe") and then handle the "OnTicksReceived" event (not "OnPriceTick")

Peter Nannis

Market Data » How to differentiate between ticks(trades) and bid/ask updates Jun 26, 2014 @ 04:20 PM (Total replies: 4)

So between multiple 1 lot trades at the same time and price the only field that would change would be the total volume count between the events?

I tried to derive them that way but the the total volume is still being under reported.

Is the feed throttled down? (I am using the OnPriceTick event)

Please explain how I should properly identify each tick in the example above

Thanks/Peter

Peter Nannis

Market Data » How to differentiate between ticks(trades) and bid/ask updates Jun 25, 2014 @ 11:30 AM (Total replies: 4)

In the OnPriceTick event handler how do I differentiate a "trade" (tick) vs a bid/ask update. I want an non-aggregated tick by tick feed. Just treating each callback as a tick doesn't work and ends up over-reporting the number of ticks.

Peter Nannis