(Object chain, Object... optionalArgs)
| 9687 | } |
| 9688 | |
| 9689 | public Object parseOption(Object chain, Object... optionalArgs) |
| 9690 | { |
| 9691 | // |
| 9692 | // { |
| 9693 | // "instType": "OPTION", |
| 9694 | // "instId": "BTC-USD-241227-60000-P", |
| 9695 | // "last": "", |
| 9696 | // "lastSz": "0", |
| 9697 | // "askPx": "", |
| 9698 | // "askSz": "0", |
| 9699 | // "bidPx": "", |
| 9700 | // "bidSz": "0", |
| 9701 | // "open24h": "", |
| 9702 | // "high24h": "", |
| 9703 | // "low24h": "", |
| 9704 | // "volCcy24h": "0", |
| 9705 | // "vol24h": "0", |
| 9706 | // "ts": "1711176035035", |
| 9707 | // "sodUtc0": "", |
| 9708 | // "sodUtc8": "" |
| 9709 | // } |
| 9710 | // |
| 9711 | Object currency = Helpers.getArg(optionalArgs, 0, null); |
| 9712 | Object market = Helpers.getArg(optionalArgs, 1, null); |
| 9713 | Object marketId = this.safeString(chain, "instId"); |
| 9714 | market = this.safeMarket(marketId, market); |
| 9715 | Object timestamp = this.safeInteger(chain, "ts"); |
| 9716 | final Object finalMarket = market; |
| 9717 | return new java.util.HashMap<String, Object>() {{ |
| 9718 | put( "info", chain ); |
| 9719 | put( "currency", null ); |
| 9720 | put( "symbol", Helpers.GetValue(finalMarket, "symbol") ); |
| 9721 | put( "timestamp", timestamp ); |
| 9722 | put( "datetime", OkxCore.this.iso8601(timestamp) ); |
| 9723 | put( "impliedVolatility", null ); |
| 9724 | put( "openInterest", null ); |
| 9725 | put( "bidPrice", OkxCore.this.safeNumber(chain, "bidPx") ); |
| 9726 | put( "askPrice", OkxCore.this.safeNumber(chain, "askPx") ); |
| 9727 | put( "midPrice", null ); |
| 9728 | put( "markPrice", null ); |
| 9729 | put( "lastPrice", OkxCore.this.safeNumber(chain, "last") ); |
| 9730 | put( "underlyingPrice", null ); |
| 9731 | put( "change", null ); |
| 9732 | put( "percentage", null ); |
| 9733 | put( "baseVolume", OkxCore.this.safeNumber(chain, "volCcy24h") ); |
| 9734 | put( "quoteVolume", null ); |
| 9735 | }}; |
| 9736 | } |
| 9737 | |
| 9738 | /** |
| 9739 | * @method |
no test coverage detected