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

Method safeBool

java/lib/src/main/java/io/github/ccxt/Exchange.java:4098–4113  ·  view source on GitHub ↗
(Object dictionaryOrList, Object key, Object... optionalArgs)

Source from the content-addressed store, hash-verified

4096 }
4097
4098 public Object safeBool(Object dictionaryOrList, Object key, Object... optionalArgs)
4099 {
4100 /**
4101 * @ignore
4102 * @method
4103 * @description safely extract boolean value from dictionary or list
4104 * @returns {bool | undefined}
4105 */
4106 Object defaultValue = Helpers.getArg(optionalArgs, 0, null);
4107 Object value = this.safeValue(dictionaryOrList, key, defaultValue);
4108 if (Helpers.isTrue((value instanceof Boolean)))
4109 {
4110 return value;
4111 }
4112 return defaultValue;
4113 }
4114
4115 public Object safeDictN(Object dictionaryOrList, Object keys, Object... optionalArgs)
4116 {

Callers 15

featuresMapperMethod · 0.95
safeCurrencyStructureMethod · 0.95
safeOrderMethod · 0.95
safeTradeMethod · 0.95
fetchWebEndpointMethod · 0.95
safeNetworkMethod · 0.95
parseLeverageTiersMethod · 0.95
handleParamBoolMethod · 0.95
buildOHLCVCMethod · 0.95
handlePostOnlyMethod · 0.95

Calls 3

getArgMethod · 0.95
safeValueMethod · 0.95
isTrueMethod · 0.95

Tested by 7

testSafeMethodsMethod · 0.76
testMarketMethod · 0.36
testFetchCurrenciesMethod · 0.36
testHasPropsMethod · 0.36