API Support Forum
User Profile

Viewing User Profile for: JBerrojalbiz381


About

Apr 06, 2011 08:41 AM

Nov 22, 2023 08:36 AM

Nov 22, 2023 08:36 AM



Post Statistics
JBerrojalbiz381 has contributed to 9 posts out of 5593 total posts (0.16%) in 4766 days (0.00 posts per day).

20 most recent posts:

API Support » stop receiving Trader class from Order class Nov 22, 2023 @ 08:36 AM (Total replies: 0)

Hi, we have stopped receiving Trader info from Order class since 14th november, before this date we were receiving Trader info in the order class but now in Trader we received null. Have you made any change in this information?
Jon Berrojalbiz


API Support » Location Mar 03, 2020 @ 03:46 AM (Total replies: 2)

Thank you very much, it was an error with my intellisense, i reloaded visual studio and now i can see WithSenderLocation.
Jon Berrojalbiz


API Support » Location Mar 02, 2020 @ 09:35 AM (Total replies: 2)

How can i set the location property when i create a new order? i can´t figure out how to do it using OrderDraftBuilder()
Thank you very much.
Jon Berrojalbiz


API Support » DataFeedEntitlementSubscriptionType Feb 24, 2020 @ 04:05 AM (Total replies: 1)

In the previous api we used a class called DataFeedEntitlement, in this class there were 2 boolean properties DOM and TopOfBook, in gf.API i see there is an enumeration called DataFeedEntitlementSubscriptionType with these two names but i don't see any way to access to this enumeration, at least from Exchanges.GetEntitlements(). Could you please help me to find a way to access to this enumeration?
Jon Berrojalbiz


API Support » Market or contract status Apr 27, 2016 @ 11:08 AM (Total replies: 1)

i´ve read in your faq this :
I’m getting “Action not supported for instrument status” (or "Trading suspended"). What does it mean?
Market closed: an order was sent between trading sessions or at maintenance period. Normally maintenance period on workdays is 17:30 – 18:00 EST

my question is , is there any event or property in which i can see the market status or contract status before sending an order.
thanks
Jon Berrojalbiz


API Support » GetInvalidParts always false when using allocationBlock Nov 25, 2015 @ 10:40 AM (Total replies: 7)

Sorry Chris where could i find this new release? in nuget i don't see this new version.

thanks in advance


Jon Berrojalbiz
Edited by JBerrojalbiz381 on Nov 26, 2015 at 08:34:23

API Support » GetInvalidParts always false when using allocationBlock Nov 12, 2015 @ 04:14 AM (Total replies: 7)


OEC.API.NewOrderDraft draft = OecApiClient.CreateDraft();
draft.Account = null;
foreach (var ab in OecApiClient.AllocationBlocks)
{
if (ab.Name == allocationBlock)
{
draft.AllocationBlock = ab;
}
}

OrderParts res = draft.GetInvalidParts();

if (res != OEC.API.OrderParts.None)
throw new Exception(string.Format("Invalid values in {0}", res));


And the method GetInvalidParts gives this error:
AllocationBlock
I've decompiled the api and in this method in NewOrderDraft (derived from OrderDraft), i see this code in the api:
public NewOrderDraft CreateDraft()
{
return new NewOrderDraft((OECClient) null);
}

internal NewOrderDraft(OECClient client = null)
: base(client)
{
this.Order = new Order(-1);
this.Version = new Version(this.Order);
}


That´s why i think when in the method GetInvalidParts :
if (this.AllocationBlock != null)
{
if (this.Account != null && this.Client.WashAccounts[this.Account.ID] == null)
orderParts |= OrderParts.AllocationBlock;
else if (this.AllocationBlock.Items.Count <= 0)
{
orderParts |= OrderParts.AllocationBlock;
}
else
{
foreach (AllocationBlockItem allocationBlockItem in this.AllocationBlock.Items)
{
if (!this.Client.Accounts.ContainsKey(allocationBlockItem.Account.ID))
{
orderParts |= OrderParts.AllocationBlock;
break;
}
}
if (this.Quantity > this.AllocationBlock.TotalLots && this.Quantity % this.AllocationBlock.TotalLots != 0)
orderParts |= OrderParts.Quantity | OrderParts.AllocationBlock;
}
}

give me this error :
AllocationBlock, because the client is null.

Jon Berrojalbiz

API Support » GetInvalidParts always false when using allocationBlock Nov 11, 2015 @ 10:10 AM (Total replies: 7)

When i try to create an order using allocationblock instead of account, always receive an error when calling GetInvalidParts of the NewOrderDraft object, in my opinion is a generic problem because NewOrderDraft.CreateDraft sets OECClient to null and that implies that (!this.Client.Accounts.ContainsKey(allocationBlockItem.Account.ID)) this condition return an error.

could you please help me with this error

Jon Berrojalbiz

API Support » OECClient in other thread May 19, 2011 @ 06:00 PM (Total replies: 6)

Hi Victor,

Could you provide some advice or code sample for doing this? >> "You need to add Windows message pump to your non-main thread with OECAPI"

Thanks in advance,
Jon.

Jon Berrojalbiz