MCPcopy Index your code
hub / github.com/ccxt/ccxt / parseOptionChain

Method parseOptionChain

java/lib/src/main/java/io/github/ccxt/Exchange.java:13732–13747  ·  view source on GitHub ↗
(Object response, Object... optionalArgs)

Source from the content-addressed store, hash-verified

13730 }
13731
13732 public Object parseOptionChain(Object response, Object... optionalArgs)
13733 {
13734 Object currencyKey = Helpers.getArg(optionalArgs, 0, null);
13735 Object symbolKey = Helpers.getArg(optionalArgs, 1, null);
13736 Object optionStructures = new java.util.HashMap<String, Object>() {{}};
13737 for (var i = 0; Helpers.isLessThan(i, Helpers.getArrayLength(response)); i++)
13738 {
13739 Object info = Helpers.GetValue(response, i);
13740 Object currencyId = this.safeString(info, currencyKey);
13741 Object currency = this.safeCurrency(currencyId);
13742 Object marketId = this.safeString(info, symbolKey);
13743 Object market = this.safeMarket(marketId, null, null, "option");
13744 Helpers.addElementToObject(optionStructures, Helpers.GetValue(market, "symbol"), this.parseOption(info, currency, market));
13745 }
13746 return optionStructures;
13747 }
13748
13749 public Object parseMarginModes(Object response, Object... optionalArgs)
13750 {

Callers 4

fetchOptionChainMethod · 0.45
fetchOptionChainMethod · 0.45
fetchOptionChainMethod · 0.45
fetchOptionChainMethod · 0.45

Calls 9

getArgMethod · 0.95
isLessThanMethod · 0.95
getArrayLengthMethod · 0.95
GetValueMethod · 0.95
safeStringMethod · 0.95
safeCurrencyMethod · 0.95
safeMarketMethod · 0.95
addElementToObjectMethod · 0.95
parseOptionMethod · 0.95

Tested by

no test coverage detected