Author |
Topic: Option Chain noy returning strikes above ATM (7 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
MPhillips8718 Posts: 11 Joined: Feb 09, 2017 |
When I try to get an option chain, I don;t seem to get strikes with a price higher than the current ATM.
For ESU8, for example, I get strikes 2305 - 2700 (as of 6/29/2018) I have tried setting the min and max strike price, but that doesn't seem to do anything. Any idea of what I need to do? C++ code below: OEC::API::SymbolLookupCriteria^ criteria = gcnew OEC::API::SymbolLookupCriteria; criteria->ParentContract = contract; criteria->SearchText = "*"; criteria->ContractKinds->Add(OEC::Data::ContractKind::Option); criteria->MinStrikePrice = 0; criteria->MaxStrikePrice = 1000000000; criteria->DesiredResultCount = 99999; OEC::API::OECClient::Global->SymbolLookup(criteria); |
||||
VPfau Moderator Posts: 164 Joined: |
MPhillips8718,
Because there are many contracts on our servers we cannot upload all contracts in one chunk. Moreover, the contracts we already sent (withing one session) will be skipped in follow results By your code: criteria->MinStrikePrice = 0; if you will not specify these values we will use a widest range possible. criteria->DesiredResultCount = 99999; it does not mean that you will get back 99999 contracts; The amount depends on different things including contract relations and adjustable limit server setting. Please try to paginate your requests. Thank you Vitaliy Pfau
|
||||
MPhillips8718 Posts: 11 Joined: Feb 09, 2017 |
I removed the strike prices and DesiredResultCount.
Now I get the same 163 options every time I make the request. Can you give me a concrete example of how to paginate the request? Sending the same criteria gets me the same results. |
||||
VPfau Moderator Posts: 164 Joined: |
Quick adjustment of exists snippet (https://bitbucket.org/snippets/GainFuturesDev/7oLd4/options-lookup) gives a working version of paginated requests https://bitbucket.org/snippets/GainFuturesDev/6eg47K/paginated-options-lookup
Vitaliy Pfau
|
||||
MPhillips8718 Posts: 11 Joined: Feb 09, 2017 |
I tried the pagination like in the example.
It did work better, but it leaves huge gaps in the strike prices. Below is just the output segment for symbols starting OESU8. Other expirations have the same problem. You can see there is a gap from 2025 to 3005 - right where the ATM strikes are. Am I doing something wrong? Request Code: void GainBridgeImpl::RequestOptionList(OEC::API::Contract^ contract) { OEC::API::SymbolLookupCriteria^ criteria = gcnew OEC::API::SymbolLookupCriteria; criteria->ParentContract = contract; criteria->SearchText = "*"; criteria->ContractKinds->Add(OEC::Data::ContractKind::Option); criteria->MinStrikePrice = 1; criteria->MaxStrikePrice = 500; OEC::API::OECClient::Global->SymbolLookup(criteria); } Symbol Looup Event: void GainBridgeImpl::SymbolLookup(OEC::API::SymbolLookupCriteria^ criteria, OEC::API::ContractList^ contracts) { if (criteria->ParentContract != nullptr) { if (criteria->MinStrikePrice ParentContract->CurrentPrice->LastPrice * 2)) { criteria->MinStrikePrice += 500; criteria->MaxStrikePrice += 500; OEC::API::OECClient::Global->SymbolLookup(criteria); } else { OptionListReceived(criteria->ParentContract); } } Listing of parent->Options for just OESU8: OESU8 C100 OESU8 P100 OESU8 C500 OESU8 P500 OESU8 C1000 OESU8 P1000 OESU8 C1480 OESU8 P1480 OESU8 C1485 OESU8 P1485 OESU8 C1490 OESU8 P1490 OESU8 C1495 OESU8 P1495 OESU8 C1500 OESU8 P1500 OESU8 C1980 OESU8 P1980 OESU8 C1985 OESU8 P1985 OESU8 C1990 OESU8 P1990 OESU8 C1995 OESU8 P1995 OESU8 C2000 OESU8 P2000 OESU8 C2405 OESU8 P2405 OESU8 C2410 OESU8 P2410 OESU8 C2415 OESU8 P2415 OESU8 C2420 OESU8 P2420 OESU8 C2425 OESU8 P2425 OESU8 C2505 OESU8 P2505 OESU8 C2510 OESU8 P2510 OESU8 C2515 OESU8 P2515 OESU8 C2520 OESU8 P2520 OESU8 C2525 OESU8 P2525 OESU8 C3005 OESU8 P3005 OESU8 C3010 OESU8 P3010 OESU8 C3015 OESU8 P3015 OESU8 C3020 OESU8 P3020 OESU8 C3025 OESU8 P3025 OESU8 C3505 OESU8 P3505 OESU8 C3525 OESU8 P3525 OESU8 C3550 OESU8 P3550 OESU8 C3575 OESU8 P3575 OESU8 C3600 OESU8 P3600 OESU8 C4025 OESU8 P4025 OESU8 C4050 OESU8 P4050 OESU8 C4075 OESU8 P4075 OESU8 C4100 OESU8 P4100 OESU8 C4125 OESU8 P4125 |
||||
VPfau Moderator Posts: 164 Joined: |
OESU8 is parent contract not only to OES contracts. Try to restrict your requests more.
Vitaliy Pfau
|
||||
MPhillips8718 Posts: 11 Joined: Feb 09, 2017 |
I am still unable to get a complete list of options.
If I limit my request to just the OESU8 options I get the following list. As you can see, there is a huge area where no Puts are returned. When I run the example code you provided, there are strike gaps for every expiration. Is there anyway to get a complete list of available options for a contract? OESU8 C100 OESU8 P100 OESU8 C500 OESU8 P500 OESU8 C1000 OESU8 P1000 OESU8 C1025 OESU8 P1025 OESU8 C1050 OESU8 P1050 OESU8 C1075 OESU8 P1075 OESU8 C1100 OESU8 P1100 OESU8 C1125 OESU8 P1125 OESU8 C1150 OESU8 P1150 OESU8 C1175 OESU8 P1175 OESU8 C1200 OESU8 P1200 OESU8 C1225 OESU8 P1225 OESU8 C1250 OESU8 P1250 OESU8 C1275 OESU8 P1275 OESU8 C1300 OESU8 P1300 OESU8 C1325 OESU8 P1325 OESU8 C1350 OESU8 P1350 OESU8 C1375 OESU8 C1400 OESU8 C1405 OESU8 C1410 OESU8 C1415 OESU8 C1420 OESU8 C1425 OESU8 C1430 OESU8 C1435 OESU8 C1440 OESU8 C1445 OESU8 C1450 OESU8 C1455 OESU8 C1460 OESU8 C1465 OESU8 C1470 OESU8 C1475 OESU8 C1480 OESU8 C1485 OESU8 C1490 OESU8 C1495 OESU8 C1500 OESU8 C1505 OESU8 C1510 OESU8 C1515 OESU8 C1520 OESU8 C1525 OESU8 C1530 OESU8 C1535 OESU8 C1540 OESU8 C1545 OESU8 C1550 OESU8 C1555 OESU8 C1560 OESU8 C1565 OESU8 C1570 OESU8 C1575 OESU8 C1580 OESU8 C1585 OESU8 C1590 OESU8 C1595 OESU8 C1600 OESU8 C1605 OESU8 C1610 OESU8 C1615 OESU8 C1620 OESU8 C1625 OESU8 C1630 OESU8 C1635 OESU8 C1640 OESU8 C1645 OESU8 C1650 OESU8 C1655 OESU8 C1660 OESU8 C1665 OESU8 C1670 OESU8 C1675 OESU8 C1680 OESU8 C1685 OESU8 C1690 OESU8 C1695 OESU8 C1700 OESU8 C1705 OESU8 C1710 OESU8 C1715 OESU8 C1720 OESU8 C1725 OESU8 C1730 OESU8 C1735 OESU8 C1740 OESU8 C1745 OESU8 C1750 OESU8 C2005 OESU8 C2010 OESU8 C2015 OESU8 C2020 OESU8 C2025 OESU8 C2030 OESU8 C2035 OESU8 C2040 OESU8 C2045 OESU8 C2050 OESU8 C2055 OESU8 C2060 OESU8 C2065 OESU8 C2070 OESU8 C2075 OESU8 C2080 OESU8 C2085 OESU8 C2090 OESU8 C2095 OESU8 C2100 OESU8 C2105 OESU8 C2110 OESU8 C2115 OESU8 C2120 OESU8 C2125 OESU8 C2130 OESU8 C2135 OESU8 C2140 OESU8 C2145 OESU8 C2150 OESU8 C2155 OESU8 C2160 OESU8 C2165 OESU8 C2170 OESU8 C2175 OESU8 C2180 OESU8 C2185 OESU8 C2190 OESU8 C2195 OESU8 C2200 OESU8 C2205 OESU8 C2210 OESU8 C2215 OESU8 C2220 OESU8 C2225 OESU8 C2230 OESU8 C2235 OESU8 C2240 OESU8 C2245 OESU8 C2250 OESU8 C2505 OESU8 C2510 OESU8 C2515 OESU8 C2520 OESU8 C2525 OESU8 C2530 OESU8 C2535 OESU8 C2540 OESU8 C2545 OESU8 C2550 OESU8 C2555 OESU8 C2560 OESU8 C2565 OESU8 C2570 OESU8 C2575 OESU8 C2580 OESU8 C2585 OESU8 C2590 OESU8 C2595 OESU8 C2600 OESU8 C2605 OESU8 C2610 OESU8 C2615 OESU8 C2620 OESU8 C2625 OESU8 C2630 OESU8 C2635 OESU8 C2640 OESU8 C2645 OESU8 C2650 OESU8 C2655 OESU8 C2660 OESU8 C2665 OESU8 C2670 OESU8 C2675 OESU8 C2680 OESU8 C2685 OESU8 C2690 OESU8 C2695 OESU8 C2700 OESU8 C2705 OESU8 C2710 OESU8 C2715 OESU8 C2720 OESU8 C2725 OESU8 C2730 OESU8 C2735 OESU8 C2740 OESU8 C2745 OESU8 C2750 OESU8 C3005 OESU8 C3010 OESU8 C3015 OESU8 C3020 OESU8 C3025 OESU8 C3030 OESU8 C3035 OESU8 C3040 OESU8 C3045 OESU8 C3050 OESU8 C3055 OESU8 C3060 OESU8 C3065 OESU8 C3070 OESU8 C3075 OESU8 C3080 OESU8 C3085 OESU8 C3090 OESU8 C3095 OESU8 C3100 OESU8 C3105 OESU8 C3110 OESU8 C3115 OESU8 C3120 OESU8 C3125 OESU8 C3130 OESU8 C3135 OESU8 C3140 OESU8 C3145 OESU8 C3150 OESU8 C3155 OESU8 C3160 OESU8 C3165 OESU8 C3170 OESU8 C3175 OESU8 C3180 OESU8 C3185 OESU8 C3190 OESU8 C3195 OESU8 C3200 OESU8 C3205 OESU8 C3210 OESU8 C3215 OESU8 C3220 OESU8 C3225 OESU8 C3230 OESU8 C3235 OESU8 C3240 OESU8 C3245 OESU8 C3250 OESU8 C3505 OESU8 C3510 OESU8 C3515 OESU8 C3520 OESU8 C3525 OESU8 C3530 OESU8 C3535 OESU8 C3540 OESU8 C3545 OESU8 C3550 OESU8 C3555 OESU8 C3560 OESU8 C3565 OESU8 C3570 OESU8 C3575 OESU8 C3580 OESU8 C3585 OESU8 C3590 OESU8 C3595 OESU8 C3600 OESU8 C3605 OESU8 C3610 OESU8 C3615 OESU8 C3620 OESU8 C3625 OESU8 C3630 OESU8 C3635 OESU8 C3640 OESU8 C3645 OESU8 C3650 OESU8 C3655 OESU8 C3660 OESU8 C3665 OESU8 C3670 OESU8 C3675 OESU8 C3680 OESU8 C3685 OESU8 C3690 OESU8 C3695 OESU8 C3700 OESU8 C3705 OESU8 C3710 OESU8 C3715 OESU8 C3720 OESU8 C3725 OESU8 C3730 OESU8 C3735 OESU8 C3740 OESU8 C3745 OESU8 C3750 OESU8 C4025 OESU8 P4025 OESU8 C4050 OESU8 P4050 OESU8 C4075 OESU8 P4075 OESU8 C4100 OESU8 P4100 OESU8 C4125 OESU8 P4125 OESU8 C4150 OESU8 P4150 OESU8 C4175 OESU8 P4175 OESU8 C4200 OESU8 P4200 OESU8 C4225 OESU8 P4225 |
||||