API Support Forum
User Profile

Viewing User Profile for: DmitriyG


About

Oct 26, 2011 10:36 AM

Apr 16, 2013 11:21 AM

Apr 29, 2013 02:03 PM



Post Statistics
DmitriyG has contributed to 9 posts out of 5677 total posts (0.16%) in 4775 days (0.00 posts per day).

20 most recent posts:

API Support » Weekly options Apr 16, 2013 @ 11:21 AM (Total replies: 3)

To get all option bases for your contract you can use OECAPI SymbolLookup method with parameters specified:

criteria.DesiredResultCount = 1;
criteria.SearchText = "*";
criteria.ParentContract = Underlying;

where Underlying is your contract instance. Ensure in OnSymbolLookupReceived handler that you get response. Results contain one option contract of each option base. Use them to request all other available options using RequestContracts. ContractsChanged handler can be used to monitor results for that operation.


Dmitriy Gorbachyov
Edited by DmitriyG on Apr 16, 2013 at 11:23:49

API Support » Seeking options best practices or example Apr 13, 2012 @ 02:01 PM (Total replies: 12)

RequestContracts is not a subscription request. And it generates only one request to server.
OnContractsChanged is fired every time list of contracts has been changed for some base.

Use SymbolLookup to get option base and RequestContracts to get the option chain

Throttle Subscribe/Unsubscribe requests by timer to avoid overloading of the server.

Dmitriy Gorbachyov

API Support » Seeking options best practices or example Apr 09, 2012 @ 03:40 PM (Total replies: 12)

You can also increase subscription limit by sending an email to support@openecry.com with username and environment

Dmitriy Gorbachyov

API Support » Seeking options best practices or example Apr 09, 2012 @ 12:00 PM (Total replies: 12)

Currently, there is no way to do bulk-load of price snapshots.
I suggest to reduce number of API request.

Trader Option chain window subscribe all visible contracts one-by one without unsubscribing them, for user to monitor options prices. It unsubscribe contracts when they became invisible. All calls are in main UI thread.

Dmitriy Gorbachyov

API Support » Seeking options best practices or example Apr 05, 2012 @ 05:00 PM (Total replies: 12)

Try something like:

var criteria = new API.SymbolLookupCriteria();
criteria.DesiredResultCount = 1;
criteria.Mode = SymbolLookupMode.ExactMatch;
criteria.OptionsRequired = true;
criteria.SearchText = "ES";
OECClient.Global.SymbolLookup(criteria);


Dmitriy Gorbachyov

API Support » Seeking options best practices or example Apr 05, 2012 @ 03:57 PM (Total replies: 12)

Just subscribe to OECClient.OnContractsChanged and check if needed option base is updated.

Dmitriy Gorbachyov

API Support » Too many requests Apr 05, 2012 @ 02:56 PM (Total replies: 4)

API can send other requests, you can switch the API logging to more detailed to monitor subscriptions.

If you implement UI with OEC API you probably need to introduce some restrictions to reduce API resource usage, for example:
- Throttle price subscriptions/unsubscriptions or other API message flow by timer
- Use paging or other technique and subscribe only to visible items

Dmitriy Gorbachyov

API Support » Seeking options best practices or example Apr 05, 2012 @ 02:22 PM (Total replies: 12)

Yes, you understand the logic right.

API does not subscribe automatically to option chain prices for requested base, you need to manage it manually.

Dmitriy Gorbachyov

API Support » Too many requests Apr 04, 2012 @ 03:35 PM (Total replies: 4)

Quote: What kinds of API actions may trigger this and what rate or amount is considered too many?

Almost all API requests will cause that. Restriction is 5000 request per hour, but it can be changed in future.

Quote: What does the server or local API do in response to this condition?

Nothing, except sending the error message. Request will be ignored.

Quote: What is required to clear the state?

Not sending requests for some time (less than one hour)

Quote: It seems like we can still do new history requests and subscribe to new bar and tick stream…

Price-related requests goes to different server but it has same restriction and you will get the same error in case of very frequent requests.

Dmitriy Gorbachyov