# Waves.Exchange Exchange Specification # # Auto-generated by: mix ccxt.extract wavesexchange # CCXT version: 4.5.42 # Spec format version: 2 # # Review before use: # - signing: Detected from sign() method, verify with testnet # - endpoints: Raw paths extracted, map to unified API as needed # - exceptions: Extracted (exact, broad, HTTP status codes) # - features/options: Extracted from describe() # - classification: Set to :supported initially, promote after validation # %{ api_param_requirements: nil, certified: false, classification: :supported, comment: nil, countries: [ "CH" ], currencies: %{ "WX" => %{ "code" => "WX", "fees" => %{}, "id" => "EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc", "limits" => %{ "deposit" => %{}, "withdraw" => %{} }, "networks" => %{}, "precision" => 1.0e-8 } }, currency_aliases: %{ "BCHSV" => "BSV", "EGG" => "Waves Ducks", "XBT" => "BTC" }, dex: true, enable_rate_limit: true, endpoint_extraction_stats: %{ "capturedMethods" => 10, "coveragePercent" => 100, "enabledMethods" => 22, "excluded" => [ %{ "method" => "editOrder", "reason" => "emulated (returns cached data, no HTTP call)" }, %{ "method" => "fetchDepositWithdrawFee", "reason" => "emulated (returns cached data, no HTTP call)" } ], "excludedMethods" => 2, "extractableMethods" => 20, "failures" => [ %{ "error" => "wavesexchange apiKey must be a base58 encoded public key", "method" => "cancelOrder" }, %{ "error" => "wavesexchange apiKey must be a base58 encoded public key", "method" => "createLimitOrder" }, %{ "error" => "wavesexchange apiKey must be a base58 encoded public key", "method" => "createMarketOrder" }, %{ "error" => "wavesexchange apiKey must be a base58 encoded public key", "method" => "createOrder" }, %{ "error" => "wavesexchange apiKey must be a base58 encoded public key", "method" => "fetchBalance" }, %{ "error" => "Unknown letter: \"_\". Allowed: 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", "method" => "fetchClosedOrders" }, %{ "error" => "Unknown letter: \"_\". Allowed: 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", "method" => "fetchDepositAddress" }, %{ "error" => "Unknown letter: \"_\". Allowed: 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", "method" => "fetchOpenOrders" }, %{ "error" => "wavesexchange apiKey must be a base58 encoded public key", "method" => "fetchOrder" }, %{ "error" => "wavesexchange apiKey must be a base58 encoded public key", "method" => "fetchOrders" } ] }, endpoints: [ %{ api_section: "private", auth: true, cost: 1, expects: :list, market_type: :spot, method: :get, name: :fetch_deposit_withdraw_fees, param_mappings: %{}, params: [ :codes ], path: "/deposit/currencies", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "matcher", auth: false, base_url: "https://matcher.wx.network", cost: 1, default_params: %{ "baseId" => "BTC", "quoteId" => "USDT" }, expects: :single, market_type: :spot, method: :get, name: :fetch_l2_order_book, param_mappings: %{}, params: [ :symbol, :limit ], path: "/matcher/orderbook/{baseId}/{quoteId}", response_transformer: {:extract_path_unwrap, ["data"]}, source: :intercepted }, %{ api_section: "market", auth: false, base_url: "https://wx.network/api/v1/forward/marketdata/api/v1", cost: 1, expects: :list, market_type: :spot, method: :get, name: :fetch_markets, param_mappings: %{}, params: [], path: "/tickers", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "node", auth: false, base_url: "https://nodes.wx.network", cost: 5, default_params: %{ "publicKey" => "dummy_api_key_for_interception" }, expects: :list, market_type: :spot, method: :get, name: :fetch_my_trades, param_mappings: %{}, params: [ :symbol, :since, :limit ], path: "/addresses/publicKey/{publicKey}", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, default_params: %{ "baseId" => "BTC", "quoteId" => "USDT", "timeEnd" => "1704427200000", "timeStart" => "1704067200000" }, expects: :list, market_type: :spot, method: :get, name: :fetch_ohlcv, param_mappings: %{ "timeframe" => "interval" }, params: [ :symbol, :timeframe, :since, :limit ], path: "/candles/{baseId}/{quoteId}", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "matcher", auth: false, base_url: "https://matcher.wx.network", cost: 1, default_params: %{ "baseId" => "BTC", "quoteId" => "USDT" }, expects: :single, market_type: :spot, method: :get, name: :fetch_order_book, param_mappings: %{}, params: [ :symbol, :limit ], path: "/matcher/orderbook/{baseId}/{quoteId}", response_transformer: {:extract_path_unwrap, ["data"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, expects: :single, market_type: :spot, method: :get, name: :fetch_ticker, param_mappings: %{ "symbol" => "pairs" }, params: [ :symbol ], path: "/pairs", response_transformer: {:extract_path_unwrap, ["data"]}, source: :intercepted }, %{ api_section: "market", auth: false, base_url: "https://wx.network/api/v1/forward/marketdata/api/v1", cost: 1, expects: :list, market_type: :spot, method: :get, name: :fetch_tickers, param_mappings: %{}, params: [ :symbols ], path: "/tickers", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, default_params: %{ "amountAsset" => "BTC", "priceAsset" => "USDT" }, expects: :list, market_type: :spot, method: :get, name: :fetch_trades, param_mappings: %{ "since" => "timeStart" }, params: [ :symbol, :since, :limit ], path: "/transactions/exchange", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :single, market_type: :spot, method: :get, name: :withdraw, param_mappings: %{}, params: [ :code, :amount, :address, :tag ], path: "/withdraw/currencies", response_transformer: {:extract_path_unwrap, ["data"]}, source: :intercepted } ], error_code_details: %{ 1048577 => %{ description: nil, type: :invalid_parameters }, 1051904 => %{ description: nil, type: :invalid_credentials }, 106954752 => %{ description: nil, type: :invalid_credentials }, 106954769 => %{ description: nil, type: :invalid_credentials }, 106957828 => %{ description: nil, type: :invalid_credentials }, 106960131 => %{ description: nil, type: :invalid_credentials }, 106981137 => %{ description: nil, type: :invalid_credentials }, 112 => %{ description: nil, type: :insufficient_balance }, 13 => %{ description: nil, type: :network_error }, 14 => %{ description: nil, type: :network_error }, 3145733 => %{ description: nil, type: :access_restricted }, 3147270 => %{ description: "https://github.com/wavesplatform/matcher/wiki/List-of-all-errors", type: :insufficient_balance }, 3148040 => %{ description: nil, type: :invalid_order }, 3148801 => %{ description: nil, type: :invalid_credentials }, 4 => %{ description: nil, type: :exchange_error }, 9437184 => %{ description: "The order is invalid: SpendAmount should be > 0", type: :invalid_parameters }, 9437193 => %{ description: nil, type: :order_not_found }, 9440512 => %{ description: nil, type: :invalid_credentials }, 9440771 => %{ description: nil, type: :invalid_order }, 9441026 => %{ description: nil, type: :invalid_order }, 9441282 => %{ description: nil, type: :invalid_order }, 9441286 => %{ description: nil, type: :invalid_order }, 9441295 => %{ description: nil, type: :invalid_order }, 9441540 => %{ description: nil, type: :invalid_order }, 9441542 => %{ description: nil, type: :invalid_order } }, error_codes: %{ 1048577 => :invalid_parameters, 1051904 => :invalid_credentials, 106954752 => :invalid_credentials, 106954769 => :invalid_credentials, 106957828 => :invalid_credentials, 106960131 => :invalid_credentials, 106981137 => :invalid_credentials, 112 => :insufficient_balance, 13 => :network_error, 14 => :network_error, 3145733 => :access_restricted, 3147270 => :insufficient_balance, 3148040 => :invalid_order, 3148801 => :invalid_credentials, 4 => :exchange_error, 9437184 => :invalid_parameters, 9437193 => :order_not_found, 9440512 => :invalid_credentials, 9440771 => :invalid_order, 9441026 => :invalid_order, 9441282 => :invalid_order, 9441286 => :invalid_order, 9441295 => :invalid_order, 9441540 => :invalid_order, 9441542 => :invalid_order }, exceptions: nil, exchange_options: %{ "accessToken" => nil, "allowedCandles" => 1440, "createMarketBuyOrderRequiresPrice" => true, "createOrderDefaultExpiry" => 2419200000, "defaultNetworkCodeReplacements" => %{ "BRC20" => %{ "BRC20" => "BTC" }, "CRO" => %{ "CRC20" => "CRONOS" }, "ETH" => %{ "ERC20" => "ETH" }, "TRX" => %{ "TRC20" => "TRX" } }, "matcherPublicKey" => nil, "messagePrefix" => "W", "networks" => %{ "BEP20" => "BSC", "ERC20" => "ETH" }, "networksById" => %{ "BSC" => "BEP20", "ETH" => "ERC20" }, "quotes" => nil, "wavesAddress" => nil, "wavesPrecision" => 1.0e-8, "withdrawFeeUSDN" => 7420, "withdrawFeeWAVES" => 100000 }, extended_metadata: %{ limits: %{ "amount" => %{}, "cost" => %{}, "leverage" => %{}, "price" => %{} }, logo_url: "https://user-images.githubusercontent.com/1294454/84547058-5fb27d80-ad0b-11ea-8711-78ac8b3c7f31.jpg" }, extracted_metadata: %{ ccxt_version: "4.5.42" }, features: %{ future: %{}, spot: %{ create_order: %{ hedged: false, iceberg: false, leverage: false, margin_mode: false, market_buy_by_cost: false, market_buy_requires_price: true, self_trade_prevention: false, stop_loss_price: false, take_profit_price: false, time_in_force: %{ fok: false, gtd: true, ioc: false, po: false }, trailing: false, trigger_direction: false, trigger_price: true }, fetch_closed_orders: %{ days_back: 100000, days_back_canceled: 1, limit: 100, margin_mode: false, symbol_required: false, trailing: false, trigger: false, until_days: 100000 }, fetch_my_trades: %{ days_back: 100000, limit: 100, margin_mode: false, symbol_required: false, until_days: 100000 }, fetch_ohlcv: %{}, fetch_open_orders: %{ limit: 100, margin_mode: false, symbol_required: false, trailing: false, trigger: false }, fetch_order: %{ margin_mode: false, symbol_required: false, trailing: false, trigger: false }, fetch_orders: %{ limit: 100, margin_mode: false, symbol_required: true, trailing: false, trigger: false }, sandbox: true }, swap: %{} }, fees: nil, forward_aliases: %{ spot: %{ "BNB" => "66a1br3BrkoaJgP7yEar9hJcSTvJPoH6PYBLqscXcMGo", "BONK" => "6vi1PbdGJtXJFv9WhXa45Va3cwVGDHgCR26Vs8VR55Th", "CRV-ERC20" => "FmsB2B21fVVetWvZm7Q48cC2Bvs2hEZtft49TBn3guV1", "DOGE" => "E5T5m8A6AC2NKetty2aSPF2gXLbZnQuPWPq1bijH4zhp", "ETH" => "3VuV5WTmDz47Dmdn3QpcYjzbSdipjQE4JMdNe1xZpX13", "GOAT" => "Ea9Qxq3uM5MUwg7yEbvJ6aebVAi3yHaoHMtYj6zaRkWo", "L2MP" => "7scqyYoVsNrpWbTAc78eRqNVcYLxMPzZs8EQfX7ruJAg", "MELANIA" => "441TtKJnEWsUzD7C4mCkNX6H58w1as4tCVjj89WnB97Z", "PETE" => "GAzAEjApmjMYZKPzri2g2VUXNvTiQGF7KDYZFFsP3AEq", "POPCAT" => "7mz6dZVfmHATbpFnuzj5iVrVPFh1BU7fvoyKgPxAHo5s", "PUZZLE" => "HEB8Qaw9xrWpWs8tHsiATYGBWDBtP2S7kcPALrMu43AS", "PWR" => "2thsACuHmzDMuNezPM32wg9a3BwUzBWDeSKakgz3cw21", "ROME" => "AP4Cb5xLYGH6ZigHreCZHoXpQTWDkPsG2BHqfDUx6taJ", "SHIB" => "5biEgTRSShGKfAq2Znv1xzyT7SEddymajpBgYfQj2xq4", "SWOP" => "Ehie5xYpeN8op1Cctc6aGUrqx8jq3jtf1DSjXDbfm7aT", "TRUMP" => "97nUwSbdKLtzvduu3wdxP8kTQeSWwBTHL81L2FVPL9Hy", "UNIT0" => "GjwAHMjqWzYR4LgoNy91CxUKAGJN79h2hseZoae4nU8t", "USDC" => "EbTKFzaVrrc4ZTdybxt6xVN4iNVmMUzxMrxKzBiaihU8", "USDC-PPT" => "3ayH3PhWMkhFsySsUVcC8BvFf1QyxGB5BZuTPyVtmP4v", "USDT" => "B45iYkZVC9cudR2yxrsJnrM75StiTrwphbfQ7xkyisip", "USDT-PPT" => "G5WWWzzVsWRyzGf32xojbnfp7gXbWrgqJT8RcVWEfLmC", "WBTC" => "CPhNn4f754kvEvt7UFbC5NScGT7BNWuZivuEwPF2BpPY", "WBTC-PPT" => "2Fge5HEBRD3XTeg7Xg3FW5yiB9HVJFQtMXiWMQo72Up6", "WEST" => "4LHHvYGNKJUg5hj65aGD5vgScvCBmLpdRFtjokvCjSL8", "WETH" => "AEvGpbS2BkKMtvpQAe2fdKVKg3yampiMvrNVLPXy25ML", "WX" => "Atqv59EYzjFGuitKVnMRk6H8FukjoV3ktPorbEys25on", "Waves Ducks" => "59muEkmqg3qLUkrwSD7L7ZYhVuoDuqkeono4FvDFHv84", "XTN" => "DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p" } }, handle_content_type_application_zip: nil, handle_errors_source: "handleErrors(code, reason, url, method, headers, body, response, requestHeaders, requestBody) {\n const errorCode = this.safeString(response, 'error');\n const success = this.safeBool(response, 'success', true);\n const Exception = this.safeValue(this.exceptions, errorCode);\n if (Exception !== undefined) {\n const messageInner = this.safeString(response, 'message');\n throw new Exception(this.id + ' ' + messageInner);\n }\n const message = this.safeString(response, 'message');\n if (message === 'Validation Error') {\n throw new errors.BadRequest(this.id + ' ' + body);\n }\n if (!success) {\n throw new errors.ExchangeError(this.id + ' ' + body);\n }\n return undefined;\n }", has: %{ add_margin: false, borrow_cross_margin: false, borrow_isolated_margin: false, borrow_margin: false, c_o_r_s: false, cancel_all_orders: false, cancel_all_orders_ws: false, cancel_order: true, cancel_order_with_client_order_id: false, cancel_order_ws: false, cancel_orders: false, cancel_orders_with_client_order_id: false, cancel_orders_ws: false, close_all_positions: false, close_position: false, create_deposit_address: false, create_limit_buy_order: false, create_limit_buy_order_ws: false, create_limit_order: true, create_limit_order_ws: false, create_limit_sell_order: false, create_limit_sell_order_ws: false, create_market_buy_order: false, create_market_buy_order_with_cost: false, create_market_buy_order_with_cost_ws: false, create_market_buy_order_ws: false, create_market_order: true, create_market_order_with_cost: false, create_market_order_with_cost_ws: false, create_market_order_ws: true, create_market_sell_order: false, create_market_sell_order_with_cost: false, create_market_sell_order_with_cost_ws: false, create_market_sell_order_ws: false, create_order: true, create_order_with_take_profit_and_stop_loss: false, create_order_with_take_profit_and_stop_loss_ws: false, create_order_ws: false, create_orders: false, create_post_only_order: false, create_post_only_order_ws: false, create_reduce_only_order: false, create_reduce_only_order_ws: false, create_stop_limit_order: false, create_stop_limit_order_ws: false, create_stop_loss_order: false, create_stop_loss_order_ws: false, create_stop_market_order: false, create_stop_market_order_ws: false, create_stop_order: false, create_stop_order_ws: false, create_take_profit_order: false, create_take_profit_order_ws: false, create_trailing_amount_order: false, create_trailing_amount_order_ws: false, create_trailing_percent_order: false, create_trailing_percent_order_ws: false, create_trigger_order: false, create_trigger_order_ws: false, deposit: false, edit_order: true, edit_order_with_client_order_id: false, edit_order_ws: false, edit_orders: false, fetch_a_d_l_rank: false, fetch_accounts: false, fetch_all_greeks: false, fetch_balance: true, fetch_balance_ws: false, fetch_bids_asks: false, fetch_borrow_interest: false, fetch_borrow_rate: false, fetch_borrow_rate_histories: false, fetch_borrow_rate_history: false, fetch_borrow_rates: false, fetch_borrow_rates_per_symbol: false, fetch_canceled_and_closed_orders: false, fetch_canceled_orders: false, fetch_closed_order: false, fetch_closed_orders: true, fetch_closed_orders_ws: false, fetch_convert_currencies: false, fetch_convert_quote: false, fetch_convert_trade: false, fetch_convert_trade_history: false, fetch_cross_borrow_rate: false, fetch_cross_borrow_rates: false, fetch_currencies: false, fetch_currencies_ws: true, fetch_deposit: false, fetch_deposit_address: true, fetch_deposit_addresses: false, fetch_deposit_addresses_by_network: false, fetch_deposit_withdraw_fee: true, fetch_deposit_withdraw_fees: true, fetch_deposits: false, fetch_deposits_withdrawals: false, fetch_deposits_ws: false, fetch_funding_history: false, fetch_funding_interval: false, fetch_funding_intervals: false, fetch_funding_rate: false, fetch_funding_rate_history: false, fetch_funding_rates: false, fetch_greeks: false, fetch_index_ohlcv: false, fetch_isolated_borrow_rate: false, fetch_isolated_borrow_rates: false, fetch_isolated_positions: false, fetch_l2_order_book: true, fetch_l3_order_book: false, fetch_last_prices: false, fetch_ledger: false, fetch_ledger_entry: false, fetch_leverage: false, fetch_leverage_tiers: false, fetch_leverages: false, fetch_liquidations: false, fetch_long_short_ratio: false, fetch_long_short_ratio_history: false, fetch_margin_adjustment_history: false, fetch_margin_mode: false, fetch_margin_modes: false, fetch_mark_ohlcv: false, fetch_mark_price: false, fetch_mark_prices: false, fetch_market_leverage_tiers: false, fetch_markets: true, fetch_markets_ws: false, fetch_my_liquidations: false, fetch_my_settlement_history: false, fetch_my_trades: true, fetch_my_trades_ws: false, fetch_ohlcv: true, fetch_ohlcv_ws: false, fetch_open_interest: false, fetch_open_interest_history: false, fetch_open_interests: false, fetch_open_order: false, fetch_open_orders: true, fetch_open_orders_ws: false, fetch_option: false, fetch_option_chain: false, fetch_order: true, fetch_order_book: true, fetch_order_book_ws: false, fetch_order_books: false, fetch_order_trades: false, fetch_order_with_client_order_id: false, fetch_order_ws: false, fetch_orders: true, fetch_orders_by_status: false, fetch_orders_ws: false, fetch_position: false, fetch_position_a_d_l_rank: false, fetch_position_history: false, fetch_position_mode: false, fetch_position_ws: false, fetch_positions: false, fetch_positions_a_d_l_rank: false, fetch_positions_for_symbol: false, fetch_positions_for_symbol_ws: false, fetch_positions_history: false, fetch_positions_risk: false, fetch_positions_ws: false, fetch_premium_index_ohlcv: false, fetch_settlement_history: false, fetch_status: false, fetch_ticker: true, fetch_ticker_ws: false, fetch_tickers: true, fetch_tickers_ws: false, fetch_time: false, fetch_trades: true, fetch_trades_ws: false, fetch_trading_fee: false, fetch_trading_fees: false, fetch_trading_fees_ws: false, fetch_trading_limits: false, fetch_transaction_fee: false, fetch_transaction_fees: false, fetch_transactions: false, fetch_transfer: false, fetch_transfers: false, fetch_underlying_assets: false, fetch_volatility_history: false, fetch_withdraw_addresses: false, fetch_withdrawal: false, fetch_withdrawal_whitelist: false, fetch_withdrawals: false, fetch_withdrawals_ws: false, future: false, margin: false, option: false, private_api: true, public_api: true, reduce_margin: false, repay_cross_margin: false, repay_isolated_margin: false, sandbox: true, set_leverage: false, set_margin: false, set_margin_mode: false, set_position_mode: false, sign_in: true, spot: true, swap: false, transfer: false, un_watch_my_trades: false, un_watch_ohlcv: false, un_watch_ohlcv_for_symbols: false, un_watch_order_book: false, un_watch_order_book_for_symbols: false, un_watch_orders: false, un_watch_positions: false, un_watch_ticker: false, un_watch_tickers: false, un_watch_trades: false, un_watch_trades_for_symbols: false, watch_balance: false, watch_bids_asks: false, watch_liquidations: false, watch_liquidations_for_symbols: false, watch_my_liquidations: false, watch_my_liquidations_for_symbols: false, watch_my_trades: false, watch_ohlcv: false, watch_ohlcv_for_symbols: false, watch_order_book: false, watch_order_book_for_symbols: false, watch_orders: false, watch_orders_for_symbols: false, watch_position: false, watch_positions: false, watch_status: false, watch_ticker: false, watch_tickers: false, watch_trades: false, watch_trades_for_symbols: false, withdraw: true, ws: false }, http_config: nil, id: "wavesexchange", markets: nil, name: "Waves.Exchange", ohlcv_timestamp_resolution: :unknown, options: %{ "access_token" => nil, "allowed_candles" => 1440, :create_market_buy_order_requires_price => true, "create_order_default_expiry" => 2419200000, "matcher_public_key" => nil, "message_prefix" => "W", :networks => %{ "BEP20" => "BSC", "ERC20" => "ETH" }, "quotes" => nil, "waves_address" => nil, "waves_precision" => 1.0e-8, "withdraw_fee_u_s_d_n" => 7420, "withdraw_fee_w_a_v_e_s" => 100000 }, order_mappings: nil, param_mappings: %{ "since" => "timeStart", "symbol" => "pairs", "timeframe" => "interval" }, parse_methods: [ %{ "comment" => nil, "examples" => [], "line_end" => 2495, "line_start" => 2426, "mappings" => [], "name" => "parseDepositWithdrawFees", "signature" => "parseDepositWithdrawFees (response, codes: Strings = undefined, currencyIdKey = undefined): any", "source" => "parseDepositWithdrawFees (response, codes: Strings = undefined, currencyIdKey = undefined): any {\n const depositWithdrawFees: Dict = {};\n codes = this.marketCodes (codes);\n for (let i = 0; i < response.length; i++) {\n const entry = response[i];\n const dictionary = entry;\n const currencyId = this.safeString (dictionary, currencyIdKey);\n const currency = this.safeValue (this.currencies_by_id, currencyId);\n const code = this.safeString (currency, 'code', currencyId);\n if ((codes === undefined) || (this.inArray (code, codes))) {\n let depositWithdrawFee = this.safeValue (depositWithdrawFees, code);\n if (depositWithdrawFee === undefined) {\n depositWithdrawFee = {\n 'info': [ dictionary ],\n 'withdraw': {\n 'fee': undefined,\n 'percentage': undefined,\n },\n 'deposit': {\n 'fee': undefined,\n 'percentage': undefined,\n },\n 'networks': {},\n };\n } else {\n depositWithdrawFee = depositWithdrawFees[code];\n depositWithdrawFee['info'] = this.arrayConcat (depositWithdrawFee['info'], [ dictionary ]);\n }\n const networkId = this.safeString (dictionary, 'platform_id');\n const currencyCode = this.safeString (currency, 'code');\n const networkCode = this.networkIdToCode (networkId, currencyCode);\n let network = this.safeValue (depositWithdrawFee['networks'], networkCode);\n if (network === undefined) {\n network = {\n 'withdraw': {\n 'fee': undefined,\n 'percentage': undefined,\n },\n 'deposit': {\n 'fee': undefined,\n 'percentage': undefined,\n },\n };\n }\n const feeType = this.safeString (dictionary, 'type');\n const fees = this.safeValue (dictionary, 'fees');\n let networkKey = 'deposit';\n if (feeType === 'withdrawal_currency') {\n networkKey = 'withdraw';\n }\n network[networkKey] = { 'fee': this.safeNumber (fees, 'flat'), 'percentage': false };\n depositWithdrawFee['networks'][networkCode] = network;\n depositWithdrawFees[code] = depositWithdrawFee;\n }\n }\n const depositWithdrawFeesKeys = Object.keys (depositWithdrawFees);\n for (let i = 0; i < depositWithdrawFeesKeys.length; i++) {\n const code = depositWithdrawFeesKeys[i];\n const entry = depositWithdrawFees[code];\n const networks = this.safeValue (entry, 'networks');\n const networkKeys = Object.keys (networks);\n const networkKeysLength = networkKeys.length;\n if (networkKeysLength === 1) {\n const network = this.safeValue (networks, networkKeys[0]);\n depositWithdrawFees[code]['withdraw'] = this.safeValue (network, 'withdraw');\n depositWithdrawFees[code]['deposit'] = this.safeValue (network, 'deposit');\n }\n }\n return depositWithdrawFees;\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"__type\": \"candle\",\n \"data\": {\n \"time\": \"2020-06-05T20:46:00.000Z\",\n \"open\": 240.573975,\n \"close\": 240.573975,\n \"high\": 240.573975,\n \"low\": 240.573975,\n \"volume\": 0.01278413,\n \"quoteVolume\": 3.075528,\n \"weightedAveragePrice\": 240.573975,\n \"maxHeight\": 2093895,\n \"txsCount\": 5,\n \"timeClose\": \"2020-06-05T20:46:59.999Z\"\n }\n }" ], "line_end" => 1205, "line_start" => 1177, "mappings" => [], "name" => "parseOHLCV", "signature" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV", "source" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV {\n //\n // {\n // \"__type\": \"candle\",\n // \"data\": {\n // \"time\": \"2020-06-05T20:46:00.000Z\",\n // \"open\": 240.573975,\n // \"close\": 240.573975,\n // \"high\": 240.573975,\n // \"low\": 240.573975,\n // \"volume\": 0.01278413,\n // \"quoteVolume\": 3.075528,\n // \"weightedAveragePrice\": 240.573975,\n // \"maxHeight\": 2093895,\n // \"txsCount\": 5,\n // \"timeClose\": \"2020-06-05T20:46:59.999Z\"\n // }\n // }\n //\n const data = this.safeValue (ohlcv, 'data', {});\n return [\n this.parse8601 (this.safeString (data, 'time')),\n this.safeNumber (data, 'open'),\n this.safeNumber (data, 'high'),\n this.safeNumber (data, 'low'),\n this.safeNumber (data, 'close'),\n this.safeNumber (data, 'volume', 0),\n ];\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"version\": 4,\n \"id\": \"BshyeHXDfJmTnjTdBYt371jD4yWaT3JTP6KpjpsiZepS\",\n \"sender\": \"3P8VzLSa23EW5CVckHbV7d5BoN75fF1hhFH\",\n \"senderPublicKey\": \"AHXn8nBA4SfLQF7hLQiSn16kxyehjizBGW1TdrmSZ1gF\",\n \"matcherPublicKey\": \"9cpfKN9suPNvfeUNphzxXMjcnn974eme8ZhWUjaktzU5\",\n \"assetPair\": {\n \"amountAsset\": \"474jTeYx2r2Va35794tCScAXWJG9hU2HcgxzMowaZUnu\",\n \"priceAsset\": \"DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p\",\n },\n \"orderType\": \"buy\",\n \"amount\": 10000,\n \"price\": 400000000,\n \"timestamp\": 1599848586891,\n \"expiration\": 1602267786891,\n \"matcherFee\": 3008,\n \"matcherFeeAssetId\": \"474jTeYx2r2Va35794tCScAXWJG9hU2HcgxzMowaZUnu\",\n \"signature\": \"3D2h8ubrhuWkXbVn4qJ3dvjmZQxLoRNfjTqb9uNpnLxUuwm4fGW2qGH6yKFe2SQPrcbgkS3bDVe7SNtMuatEJ7qy\",\n \"proofs\": [\n \"3D2h8ubrhuWkXbVn4qJ3dvjmZQxLoRNfjTqb9uNpnLxUuwm4fGW2qGH6yKFe2SQPrcbgkS3bDVe7SNtMuatEJ7qy\",\n ],\n \"attachment\":\"77rnoyFX5BDr15hqZiUtgXKSN46zsbHHQjVNrTMLZcLz62mmFKr39FJ\"\n }", "{\n \"id\": \"81D9uKk2NfmZzfG7uaJsDtxqWFbJXZmjYvrL88h15fk8\",\n \"type\": \"buy\",\n \"orderType\": \"limit\",\n \"amount\": 30000000000,\n \"filled\": 0,\n \"price\": 1000000,\n \"fee\": 300000,\n \"filledFee\": 0,\n \"feeAsset\": \"WAVES\",\n \"timestamp\": 1594303779322,\n \"status\": \"Cancelled\",\n \"assetPair\": {\n \"amountAsset\": \"474jTeYx2r2Va35794tCScAXWJG9hU2HcgxzMowaZUnu\",\n \"priceAsset\": \"WAVES\"\n },\n \"avgWeighedPrice\": 0,\n \"version\": 4,\n \"totalExecutedPriceAssets\": 0, // in fetchOpenOrder/s\n \"attachment\":\"77rnoyFX5BDr15hqZiUtgXKSN46zsbHHQjVNrTMLZcLz62mmFKr39FJ\"\n }" ], "line_end" => 1969, "line_start" => 1841, "mappings" => [ %{ "comment" => nil, "key" => "info", "value" => "order" }, %{ "comment" => nil, "key" => "id", "value" => "id" }, %{ "comment" => nil, "key" => "clientOrderId", "value" => "undefined" }, %{ "comment" => nil, "key" => "timestamp", "value" => "timestamp" }, %{ "comment" => nil, "key" => "datetime", "value" => "this.iso8601 (timestamp)" }, %{ "comment" => nil, "key" => "lastTradeTimestamp", "value" => "undefined" }, %{ "comment" => nil, "key" => "symbol", "value" => "symbol" }, %{ "comment" => nil, "key" => "type", "value" => "type" }, %{ "comment" => nil, "key" => "timeInForce", "value" => "undefined" }, %{ "comment" => nil, "key" => "postOnly", "value" => "undefined" }, %{ "comment" => nil, "key" => "side", "value" => "side" }, %{ "comment" => nil, "key" => "price", "value" => "price" }, %{ "comment" => nil, "key" => "triggerPrice", "value" => "triggerPrice" }, %{ "comment" => nil, "key" => "amount", "value" => "amount" }, %{ "comment" => nil, "key" => "cost", "value" => "undefined" }, %{ "comment" => nil, "key" => "average", "value" => "average" }, %{ "comment" => nil, "key" => "filled", "value" => "filled" }, %{ "comment" => nil, "key" => "remaining", "value" => "undefined" }, %{ "comment" => nil, "key" => "status", "value" => "status" }, %{ "comment" => nil, "key" => "fee", "value" => "fee" }, %{ "comment" => nil, "key" => "trades", "value" => "undefined" }, %{ "comment" => nil, "key" => "currency", "value" => "code" }, %{ "comment" => nil, "key" => "fee", "value" => "this.parseNumber (this.fromRealCurrencyAmount (code, this.safeString (order, 'filledFee')))" }, %{ "comment" => nil, "key" => "fee", "value" => "this.parseNumber (this.fromRealCurrencyAmount (code, this.safeString (order, 'matcherFee')))" } ], "name" => "parseOrder", "signature" => "parseOrder (order: Dict, market: Market = undefined): Order", "source" => "parseOrder (order: Dict, market: Market = undefined): Order {\n //\n // createOrder\n //\n // {\n // \"version\": 4,\n // \"id\": \"BshyeHXDfJmTnjTdBYt371jD4yWaT3JTP6KpjpsiZepS\",\n // \"sender\": \"3P8VzLSa23EW5CVckHbV7d5BoN75fF1hhFH\",\n // \"senderPublicKey\": \"AHXn8nBA4SfLQF7hLQiSn16kxyehjizBGW1TdrmSZ1gF\",\n // \"matcherPublicKey\": \"9cpfKN9suPNvfeUNphzxXMjcnn974eme8ZhWUjaktzU5\",\n // \"assetPair\": {\n // \"amountAsset\": \"474jTeYx2r2Va35794tCScAXWJG9hU2HcgxzMowaZUnu\",\n // \"priceAsset\": \"DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p\",\n // },\n // \"orderType\": \"buy\",\n // \"amount\": 10000,\n // \"price\": 400000000,\n // \"timestamp\": 1599848586891,\n // \"expiration\": 1602267786891,\n // \"matcherFee\": 3008,\n // \"matcherFeeAssetId\": \"474jTeYx2r2Va35794tCScAXWJG9hU2HcgxzMowaZUnu\",\n // \"signature\": \"3D2h8ubrhuWkXbVn4qJ3dvjmZQxLoRNfjTqb9uNpnLxUuwm4fGW2qGH6yKFe2SQPrcbgkS3bDVe7SNtMuatEJ7qy\",\n // \"proofs\": [\n // \"3D2h8ubrhuWkXbVn4qJ3dvjmZQxLoRNfjTqb9uNpnLxUuwm4fGW2qGH6yKFe2SQPrcbgkS3bDVe7SNtMuatEJ7qy\",\n // ],\n // \"attachment\":\"77rnoyFX5BDr15hqZiUtgXKSN46zsbHHQjVNrTMLZcLz62mmFKr39FJ\"\n // }\n //\n //\n // fetchOrder, fetchOrders, fetchOpenOrders, fetchClosedOrders\n //\n // {\n // \"id\": \"81D9uKk2NfmZzfG7uaJsDtxqWFbJXZmjYvrL88h15fk8\",\n // \"type\": \"buy\",\n // \"orderType\": \"limit\",\n // \"amount\": 30000000000,\n // \"filled\": 0,\n // \"price\": 1000000,\n // \"fee\": 300000,\n // \"filledFee\": 0,\n // \"feeAsset\": \"WAVES\",\n // \"timestamp\": 1594303779322,\n // \"status\": \"Cancelled\",\n // \"assetPair\": {\n // \"amountAsset\": \"474jTeYx2r2Va35794tCScAXWJG9hU2HcgxzMowaZUnu\",\n // \"priceAsset\": \"WAVES\"\n // },\n // \"avgWeighedPrice\": 0,\n // \"version\": 4,\n // \"totalExecutedPriceAssets\": 0, // in fetchOpenOrder/s\n // \"attachment\":\"77rnoyFX5BDr15hqZiUtgXKSN46zsbHHQjVNrTMLZcLz62mmFKr39FJ\"\n // }\n //\n const timestamp = this.safeInteger (order, 'timestamp');\n const side = this.safeString2 (order, 'type', 'orderType');\n let type = 'limit';\n if ('type' in order) {\n // fetchOrders\n type = this.safeString (order, 'orderType', type);\n }\n const id = this.safeString (order, 'id');\n const filledString = this.safeString (order, 'filled');\n const priceString = this.safeString (order, 'price');\n const amountString = this.safeString (order, 'amount');\n const assetPair = this.safeValue (order, 'assetPair');\n let symbol = undefined;\n if (assetPair !== undefined) {\n symbol = this.getSymbolFromAssetPair (assetPair);\n } else if (market !== undefined) {\n symbol = market['symbol'];\n }\n const amountCurrency = this.safeCurrencyCode (this.safeString (assetPair, 'amountAsset', 'WAVES'));\n const price = this.fromRealSymbolPrice (symbol, priceString);\n const amount = this.fromRealCurrencyAmount (amountCurrency, amountString);\n const filled = this.fromRealCurrencyAmount (amountCurrency, filledString);\n const average = this.fromRealSymbolPrice (symbol, this.safeString (order, 'avgWeighedPrice'));\n const status = this.parseOrderStatus (this.safeString (order, 'status'));\n let fee = undefined;\n if ('type' in order) {\n const code = this.safeCurrencyCode (this.safeString (order, 'feeAsset'));\n fee = {\n 'currency': code,\n 'fee': this.parseNumber (this.fromRealCurrencyAmount (code, this.safeString (order, 'filledFee'))),\n };\n } else {\n const code = this.safeCurrencyCode (this.safeString (order, 'matcherFeeAssetId', 'WAVES'));\n fee = {\n 'currency': code,\n 'fee': this.parseNumber (this.fromRealCurrencyAmount (code, this.safeString (order, 'matcherFee'))),\n };\n }\n let triggerPrice = undefined;\n const attachment = this.safeString (order, 'attachment');\n if (attachment !== undefined) {\n const decodedAttachment = this.parseJson (this.decode (this.base58ToBinary (attachment)));\n if (decodedAttachment !== undefined) {\n const c = this.safeValue (decodedAttachment, 'c');\n if (c !== undefined) {\n const v = this.safeValue (c, 'v');\n if (v !== undefined) {\n triggerPrice = this.safeString (v, 'p');\n }\n }\n }\n }\n return this.safeOrder ({\n 'info': order,\n 'id': id,\n 'clientOrderId': undefined,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'lastTradeTimestamp': undefined,\n 'symbol': symbol,\n 'type': type,\n 'timeInForce': undefined,\n 'postOnly': undefined,\n 'side': side,\n 'price': price,\n 'triggerPrice': triggerPrice,\n 'amount': amount,\n 'cost': undefined,\n 'average': average,\n 'filled': filled,\n 'remaining': undefined,\n 'status': status,\n 'fee': fee,\n 'trades': undefined,\n }, market);\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 781, "line_start" => 752, "mappings" => [], "name" => "parseOrderBookSide", "signature" => "parseOrderBookSide (bookSide, market = undefined, limit: Int = undefined)", "source" => "parseOrderBookSide (bookSide, market = undefined, limit: Int = undefined) {\n const precision = market['precision'];\n const wavesPrecision = this.safeString (this.options, 'wavesPrecision', '1e-8');\n const amountPrecisionString = this.safeString (precision, 'amount');\n const pricePrecisionString = this.safeString (precision, 'price');\n const difference = Precise.stringDiv (amountPrecisionString, pricePrecisionString);\n const pricePrecision = Precise.stringDiv (wavesPrecision, difference);\n const result = [];\n for (let i = 0; i < bookSide.length; i++) {\n const entry = bookSide[i];\n const entryPrice = this.safeString (entry, 'price', '0');\n const entryAmount = this.safeString (entry, 'amount', '0');\n let price = undefined;\n let amount = undefined;\n if ((pricePrecision !== undefined) && (entryPrice !== undefined)) {\n price = Precise.stringMul (entryPrice, pricePrecision);\n }\n if ((amountPrecisionString !== undefined) && (entryAmount !== undefined)) {\n amount = Precise.stringMul (entryAmount, amountPrecisionString);\n }\n if ((limit !== undefined) && (i > limit)) {\n break;\n }\n result.push ([\n this.parseNumber (price),\n this.parseNumber (amount),\n ]);\n }\n return result;\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 1832, "line_start" => 1824, "mappings" => [], "name" => "parseOrderStatus", "signature" => "parseOrderStatus (status: Str)", "source" => "parseOrderStatus (status: Str) {\n const statuses: Dict = {\n 'Cancelled': 'canceled',\n 'Accepted': 'open',\n 'Filled': 'closed',\n 'PartiallyFilled': 'open',\n };\n return this.safeString (statuses, status, status);\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"symbol\": \"WAVES/BTC\",\n \"amountAssetID\": \"WAVES\",\n \"amountAssetName\": \"Waves\",\n \"amountAssetDecimals\": 8,\n \"amountAssetTotalSupply\": \"106908766.00000000\",\n \"amountAssetMaxSupply\": \"106908766.00000000\",\n \"amountAssetCirculatingSupply\": \"106908766.00000000\",\n \"priceAssetID\": \"8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS\",\n \"priceAssetName\": \"WBTC\",\n \"priceAssetDecimals\": 8,\n \"priceAssetTotalSupply\": \"20999999.96007507\",\n \"priceAssetMaxSupply\": \"20999999.96007507\",\n \"priceAssetCirculatingSupply\": \"20999999.66019601\",\n \"24h_open\": \"0.00032688\",\n \"24h_high\": \"0.00033508\",\n \"24h_low\": \"0.00032443\",\n \"24h_close\": \"0.00032806\",\n \"24h_vwap\": \"0.00032988\",\n \"24h_volume\": \"42349.69440104\",\n \"24h_priceVolume\": \"13.97037207\",\n \"timestamp\":1640232379124\n }", "{\n \"firstPrice\": \"21749\",\n \"lastPrice\": \"22000\",\n \"volume\": \"0.73747149\",\n \"quoteVolume\": \"16409.44564928645471\",\n \"high\": \"23589.999941\",\n \"low\": \"21010.000845\",\n \"weightedAveragePrice\": \"22250.955964\",\n \"txsCount\": \"148\",\n \"volumeWaves\": \"0.0000000000680511203072\"\n }" ], "line_end" => 981, "line_start" => 908, "mappings" => [ %{ "comment" => nil, "key" => "symbol", "value" => "symbol" }, %{ "comment" => nil, "key" => "timestamp", "value" => "timestamp" }, %{ "comment" => nil, "key" => "datetime", "value" => "this.iso8601 (timestamp)" }, %{ "comment" => nil, "key" => "high", "value" => "high" }, %{ "comment" => nil, "key" => "low", "value" => "low" }, %{ "comment" => nil, "key" => "bid", "value" => "undefined" }, %{ "comment" => nil, "key" => "bidVolume", "value" => "undefined" }, %{ "comment" => nil, "key" => "ask", "value" => "undefined" }, %{ "comment" => nil, "key" => "askVolume", "value" => "undefined" }, %{ "comment" => nil, "key" => "vwap", "value" => "vwap" }, %{ "comment" => nil, "key" => "open", "value" => "open" }, %{ "comment" => nil, "key" => "close", "value" => "last" }, %{ "comment" => nil, "key" => "last", "value" => "last" }, %{ "comment" => nil, "key" => "previousClose", "value" => "undefined" }, %{ "comment" => nil, "key" => "change", "value" => "undefined" }, %{ "comment" => nil, "key" => "percentage", "value" => "undefined" }, %{ "comment" => nil, "key" => "average", "value" => "undefined" }, %{ "comment" => nil, "key" => "baseVolume", "value" => "baseVolume" }, %{ "comment" => nil, "key" => "quoteVolume", "value" => "quoteVolume" }, %{ "comment" => nil, "key" => "info", "value" => "ticker" } ], "name" => "parseTicker", "signature" => "parseTicker (ticker: Dict, market: Market = undefined): Ticker", "source" => "parseTicker (ticker: Dict, market: Market = undefined): Ticker {\n //\n // {\n // \"symbol\": \"WAVES/BTC\",\n // \"amountAssetID\": \"WAVES\",\n // \"amountAssetName\": \"Waves\",\n // \"amountAssetDecimals\": 8,\n // \"amountAssetTotalSupply\": \"106908766.00000000\",\n // \"amountAssetMaxSupply\": \"106908766.00000000\",\n // \"amountAssetCirculatingSupply\": \"106908766.00000000\",\n // \"priceAssetID\": \"8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS\",\n // \"priceAssetName\": \"WBTC\",\n // \"priceAssetDecimals\": 8,\n // \"priceAssetTotalSupply\": \"20999999.96007507\",\n // \"priceAssetMaxSupply\": \"20999999.96007507\",\n // \"priceAssetCirculatingSupply\": \"20999999.66019601\",\n // \"24h_open\": \"0.00032688\",\n // \"24h_high\": \"0.00033508\",\n // \"24h_low\": \"0.00032443\",\n // \"24h_close\": \"0.00032806\",\n // \"24h_vwap\": \"0.00032988\",\n // \"24h_volume\": \"42349.69440104\",\n // \"24h_priceVolume\": \"13.97037207\",\n // \"timestamp\":1640232379124\n // }\n //\n // fetch ticker\n //\n // {\n // \"firstPrice\": \"21749\",\n // \"lastPrice\": \"22000\",\n // \"volume\": \"0.73747149\",\n // \"quoteVolume\": \"16409.44564928645471\",\n // \"high\": \"23589.999941\",\n // \"low\": \"21010.000845\",\n // \"weightedAveragePrice\": \"22250.955964\",\n // \"txsCount\": \"148\",\n // \"volumeWaves\": \"0.0000000000680511203072\"\n // }\n //\n const timestamp = this.safeInteger (ticker, 'timestamp');\n const marketId = this.safeString (ticker, 'symbol');\n market = this.safeMarket (marketId, market, '/');\n const symbol = market['symbol'];\n const last = this.safeString2 (ticker, '24h_close', 'lastPrice');\n const low = this.safeString2 (ticker, '24h_low', 'low');\n const high = this.safeString2 (ticker, '24h_high', 'high');\n const vwap = this.safeString2 (ticker, '24h_vwap', 'weightedAveragePrice');\n const baseVolume = this.safeString2 (ticker, '24h_volume', 'volume');\n const quoteVolume = this.safeString2 (ticker, '24h_priceVolume', 'quoteVolume');\n const open = this.safeString2 (ticker, '24h_open', 'firstPrice');\n return this.safeTicker ({\n 'symbol': symbol,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'high': high,\n 'low': low,\n 'bid': undefined,\n 'bidVolume': undefined,\n 'ask': undefined,\n 'askVolume': undefined,\n 'vwap': vwap,\n 'open': open,\n 'close': last,\n 'last': last,\n 'previousClose': undefined,\n 'change': undefined,\n 'percentage': undefined,\n 'average': undefined,\n 'baseVolume': baseVolume,\n 'quoteVolume': quoteVolume,\n 'info': ticker,\n }, market);\n }" }, %{ "comment" => nil, "examples" => [ "{ __type: \"transaction\",\n \"data\":\n { id: \"HSdruioHqvYHeyn9hhyoHdRWPB2bFA8ujeCPZMK6992c\",\n \"timestamp\": \"2020-06-09T19:34:51.897Z\",\n \"height\": 2099684,\n \"type\": 7,\n \"version\": 2,\n \"proofs\":\n [ \"26teDHERQgwjjHqEn4REcDotNG8M21xjou3X42XuDuCvrRkQo6aPyrswByH3UrkWG8v27ZAaVNzoxDg4teNcLtde\" ],\n \"fee\": 0.003,\n \"sender\": \"3PEjHv3JGjcWNpYEEkif2w8NXV4kbhnoGgu\",\n \"senderPublicKey\": \"9cpfKN9suPNvfeUNphzxXMjcnn974eme8ZhWUjaktzU5\",\n \"buyMatcherFee\": 0.00299999,\n \"sellMatcherFee\": 0.00299999,\n \"price\": 0.00012003,\n \"amount\": 60.80421562,\n \"order1\":\n { id: \"CBRwP3ar4oMvvpUiGyfxc1syh41488SDi2GkrjuBDegv\",\n \"senderPublicKey\": \"DBXSHBz96NFsMu7xh4fi2eT9ZnyxefAHXsMxUayzgC6a\",\n \"matcherPublicKey\": \"9cpfKN9suPNvfeUNphzxXMjcnn974eme8ZhWUjaktzU5\",\n \"assetPair\": [Object],\n \"orderType\": \"buy\",\n \"price\": 0.00012003,\n \"sender\": \"3PJfFRgVuJ47UY4ckb74EGzEBzkHXtmG1LA\",\n \"amount\": 60.80424773,\n \"timestamp\": \"2020-06-09T19:34:51.885Z\",\n \"expiration\": \"2020-06-10T12:31:31.885Z\",\n \"matcherFee\": 0.003,\n \"signature\": \"4cA3ZAb3XAEEXaFG7caqpto5TRbpR5PkhZpxoNQZ9ZReNvjuJQs5a3THnumv7rcqmVUiVtuHAgk2f67ANcqtKyJ8\",\n \"matcherFeeAssetId\": null },\n \"order2\":\n { id: \"CHJSLQ6dfSPs6gu2mAegrMUcRiDEDqaj2GKfvptMjS3M\",\n \"senderPublicKey\": \"3RUC4NGFZm9H8VJhSSjJyFLdiE42qNiUagDcZPwjgDf8\",\n \"matcherPublicKey\": \"9cpfKN9suPNvfeUNphzxXMjcnn974eme8ZhWUjaktzU5\",\n \"assetPair\": [Object],\n \"orderType\": \"sell\",\n \"price\": 0.00012003,\n \"sender\": \"3P9vKoQpMZtaSkHKpNh977YY9ZPzTuntLAq\",\n \"amount\": 60.80424773,\n \"timestamp\": \"2020-06-09T19:34:51.887Z\",\n \"expiration\": \"2020-06-10T12:31:31.887Z\",\n \"matcherFee\": 0.003,\n \"signature\": \"3SFyrcqzou2ddZyNisnLYaGhLt5qRjKxH8Nw3s4T5U7CEKGX9DDo8dS27RgThPVGbYF1rYET1FwrWoQ2UFZ6SMTR\",\n \"matcherFeeAssetId\": null } } }" ], "line_end" => 2424, "line_start" => 2323, "mappings" => [ %{ "comment" => nil, "key" => "cost", "value" => "this.safeString (order, 'matcherFee')" }, %{ "comment" => nil, "key" => "currency", "value" => "this.safeCurrencyCode (this.safeString (order, 'matcherFeeAssetId', 'WAVES'))" }, %{ "comment" => nil, "key" => "info", "value" => "trade" }, %{ "comment" => nil, "key" => "timestamp", "value" => "timestamp" }, %{ "comment" => nil, "key" => "datetime", "value" => "datetime" }, %{ "comment" => nil, "key" => "symbol", "value" => "symbol" }, %{ "comment" => nil, "key" => "id", "value" => "id" }, %{ "comment" => nil, "key" => "order", "value" => "orderId" }, %{ "comment" => nil, "key" => "type", "value" => "undefined" }, %{ "comment" => nil, "key" => "side", "value" => "side" }, %{ "comment" => nil, "key" => "takerOrMaker", "value" => "undefined" }, %{ "comment" => nil, "key" => "price", "value" => "priceString" }, %{ "comment" => nil, "key" => "amount", "value" => "amountString" }, %{ "comment" => nil, "key" => "cost", "value" => "undefined" }, %{ "comment" => nil, "key" => "fee", "value" => "fee" } ], "name" => "parseTrade", "signature" => "parseTrade (trade: Dict, market: Market = undefined): Trade", "source" => "parseTrade (trade: Dict, market: Market = undefined): Trade {\n //\n // { __type: \"transaction\",\n // \"data\":\n // { id: \"HSdruioHqvYHeyn9hhyoHdRWPB2bFA8ujeCPZMK6992c\",\n // \"timestamp\": \"2020-06-09T19:34:51.897Z\",\n // \"height\": 2099684,\n // \"type\": 7,\n // \"version\": 2,\n // \"proofs\":\n // [ \"26teDHERQgwjjHqEn4REcDotNG8M21xjou3X42XuDuCvrRkQo6aPyrswByH3UrkWG8v27ZAaVNzoxDg4teNcLtde\" ],\n // \"fee\": 0.003,\n // \"sender\": \"3PEjHv3JGjcWNpYEEkif2w8NXV4kbhnoGgu\",\n // \"senderPublicKey\": \"9cpfKN9suPNvfeUNphzxXMjcnn974eme8ZhWUjaktzU5\",\n // \"buyMatcherFee\": 0.00299999,\n // \"sellMatcherFee\": 0.00299999,\n // \"price\": 0.00012003,\n // \"amount\": 60.80421562,\n // \"order1\":\n // { id: \"CBRwP3ar4oMvvpUiGyfxc1syh41488SDi2GkrjuBDegv\",\n // \"senderPublicKey\": \"DBXSHBz96NFsMu7xh4fi2eT9ZnyxefAHXsMxUayzgC6a\",\n // \"matcherPublicKey\": \"9cpfKN9suPNvfeUNphzxXMjcnn974eme8ZhWUjaktzU5\",\n // \"assetPair\": [Object],\n // \"orderType\": \"buy\",\n // \"price\": 0.00012003,\n // \"sender\": \"3PJfFRgVuJ47UY4ckb74EGzEBzkHXtmG1LA\",\n // \"amount\": 60.80424773,\n // \"timestamp\": \"2020-06-09T19:34:51.885Z\",\n // \"expiration\": \"2020-06-10T12:31:31.885Z\",\n // \"matcherFee\": 0.003,\n // \"signature\": \"4cA3ZAb3XAEEXaFG7caqpto5TRbpR5PkhZpxoNQZ9ZReNvjuJQs5a3THnumv7rcqmVUiVtuHAgk2f67ANcqtKyJ8\",\n // \"matcherFeeAssetId\": null },\n // \"order2\":\n // { id: \"CHJSLQ6dfSPs6gu2mAegrMUcRiDEDqaj2GKfvptMjS3M\",\n // \"senderPublicKey\": \"3RUC4NGFZm9H8VJhSSjJyFLdiE42qNiUagDcZPwjgDf8\",\n // \"matcherPublicKey\": \"9cpfKN9suPNvfeUNphzxXMjcnn974eme8ZhWUjaktzU5\",\n // \"assetPair\": [Object],\n // \"orderType\": \"sell\",\n // \"price\": 0.00012003,\n // \"sender\": \"3P9vKoQpMZtaSkHKpNh977YY9ZPzTuntLAq\",\n // \"amount\": 60.80424773,\n // \"timestamp\": \"2020-06-09T19:34:51.887Z\",\n // \"expiration\": \"2020-06-10T12:31:31.887Z\",\n // \"matcherFee\": 0.003,\n // \"signature\": \"3SFyrcqzou2ddZyNisnLYaGhLt5qRjKxH8Nw3s4T5U7CEKGX9DDo8dS27RgThPVGbYF1rYET1FwrWoQ2UFZ6SMTR\",\n // \"matcherFeeAssetId\": null } } }\n //\n const data = this.safeValue (trade, 'data');\n const datetime = this.safeString (data, 'timestamp');\n const timestamp = this.parse8601 (datetime);\n const id = this.safeString (data, 'id');\n const priceString = this.safeString (data, 'price');\n const amountString = this.safeString (data, 'amount');\n const order1 = this.safeValue (data, 'order1');\n const order2 = this.safeValue (data, 'order2');\n let order = undefined;\n // at first, detect if response is from `fetch_my_trades`\n if (this.safeString (order1, 'senderPublicKey') === this.apiKey) {\n order = order1;\n } else if (this.safeString (order2, 'senderPublicKey') === this.apiKey) {\n order = order2;\n } else {\n // response is from `fetch_trades`, so find only taker order\n const date1 = this.safeString (order1, 'timestamp');\n const date2 = this.safeString (order2, 'timestamp');\n const ts1 = this.parse8601 (date1);\n const ts2 = this.parse8601 (date2);\n if (ts1 > ts2) {\n order = order1;\n } else {\n order = order2;\n }\n }\n let symbol = undefined;\n const assetPair = this.safeValue (order, 'assetPair');\n if (assetPair !== undefined) {\n symbol = this.getSymbolFromAssetPair (assetPair);\n } else if (market !== undefined) {\n symbol = market['symbol'];\n }\n const side = this.safeString (order, 'orderType');\n const orderId = this.safeString (order, 'id');\n const fee = {\n 'cost': this.safeString (order, 'matcherFee'),\n 'currency': this.safeCurrencyCode (this.safeString (order, 'matcherFeeAssetId', 'WAVES')),\n };\n return this.safeTrade ({\n 'info': trade,\n 'timestamp': timestamp,\n 'datetime': datetime,\n 'symbol': symbol,\n 'id': id,\n 'order': orderId,\n 'type': undefined,\n 'side': side,\n 'takerOrMaker': undefined,\n 'price': priceString,\n 'amount': amountString,\n 'cost': undefined,\n 'fee': fee,\n }, market);\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"id\": \"string\",\n \"signature\": \"string\",\n \"fee\": 0,\n \"timestamp\": 1460678400000,\n \"recipient\": \"3P274YB5qseSE9DTTL3bpSjosZrYBPDpJ8k\",\n \"amount\": 0\n }", "{\n type: \"4\",\n id: \"2xnWTqG9ar7jEDrLxfbVyyspPZ6XZNrrw9ai9sQ81Eya\",\n fee: \"100000\",\n feeAssetId: null,\n timestamp: \"1715786263807\",\n version: \"2\",\n sender: \"3P81LLX1kk2CSJC9L8C2enxdHB7XvnSGAEE\",\n senderPublicKey: \"DdmzmXf9mty1FBE8AdVGnrncVLEAzP4gR4nWoTFAJoXz\",\n proofs: [ \"RyoKwdSYv3EqotJCYftfFM9JE2j1ZpDRxKwYfiRhLAFeyNp6VfJUXNDS884XfeCeHeNypNmTCZt5NYR1ekyjCX3\", ],\n recipient: \"3P9tXxu38a8tgewNEKFzourVxeqHd11ppOc\",\n assetId: null,\n feeAsset: null,\n amount: \"2000000\",\n attachment: \"\",\n }" ], "line_end" => 2799, "line_start" => 2733, "mappings" => [ %{ "comment" => nil, "key" => "id", "value" => "this.safeString (transaction, 'id')" }, %{ "comment" => nil, "key" => "txid", "value" => "undefined" }, %{ "comment" => nil, "key" => "timestamp", "value" => "timestamp" }, %{ "comment" => nil, "key" => "datetime", "value" => "this.iso8601 (timestamp)" }, %{ "comment" => nil, "key" => "network", "value" => "undefined" }, %{ "comment" => nil, "key" => "addressFrom", "value" => "this.safeString (transaction, 'sender')" }, %{ "comment" => nil, "key" => "address", "value" => "undefined" }, %{ "comment" => nil, "key" => "addressTo", "value" => "this.safeString (transaction, 'recipient')" }, %{ "comment" => nil, "key" => "amount", "value" => "amount" }, %{ "comment" => nil, "key" => "type", "value" => "type" }, %{ "comment" => nil, "key" => "currency", "value" => "currency['code']" }, %{ "comment" => nil, "key" => "status", "value" => "undefined" }, %{ "comment" => nil, "key" => "updated", "value" => "undefined" }, %{ "comment" => nil, "key" => "tagFrom", "value" => "undefined" }, %{ "comment" => nil, "key" => "tag", "value" => "undefined" }, %{ "comment" => nil, "key" => "tagTo", "value" => "undefined" }, %{ "comment" => nil, "key" => "comment", "value" => "undefined" }, %{ "comment" => nil, "key" => "internal", "value" => "undefined" }, %{ "comment" => nil, "key" => "fee", "value" => "{\n 'currency': feeCode,\n 'cost': feeAmount,\n }" }, %{ "comment" => nil, "key" => "info", "value" => "transaction" }, %{ "comment" => nil, "key" => "currency", "value" => "feeCode" }, %{ "comment" => nil, "key" => "cost", "value" => "feeAmount" } ], "name" => "parseTransaction", "signature" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction", "source" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction {\n //\n // withdraw\n //\n // {\n // \"id\": \"string\",\n // \"signature\": \"string\",\n // \"fee\": 0,\n // \"timestamp\": 1460678400000,\n // \"recipient\": \"3P274YB5qseSE9DTTL3bpSjosZrYBPDpJ8k\",\n // \"amount\": 0\n // }\n //\n // withdraw new:\n // {\n // type: \"4\",\n // id: \"2xnWTqG9ar7jEDrLxfbVyyspPZ6XZNrrw9ai9sQ81Eya\",\n // fee: \"100000\",\n // feeAssetId: null,\n // timestamp: \"1715786263807\",\n // version: \"2\",\n // sender: \"3P81LLX1kk2CSJC9L8C2enxdHB7XvnSGAEE\",\n // senderPublicKey: \"DdmzmXf9mty1FBE8AdVGnrncVLEAzP4gR4nWoTFAJoXz\",\n // proofs: [ \"RyoKwdSYv3EqotJCYftfFM9JE2j1ZpDRxKwYfiRhLAFeyNp6VfJUXNDS884XfeCeHeNypNmTCZt5NYR1ekyjCX3\", ],\n // recipient: \"3P9tXxu38a8tgewNEKFzourVxeqHd11ppOc\",\n // assetId: null,\n // feeAsset: null,\n // amount: \"2000000\",\n // attachment: \"\",\n // }\n //\n currency = this.safeCurrency (undefined, currency);\n const code = currency['code'];\n const typeRaw = this.safeString (transaction, 'type');\n const type = (typeRaw === '4') ? 'withdraw' : 'deposit';\n const amount = this.parseNumber (this.fromRealCurrencyAmount (code, this.safeString (transaction, 'amount')));\n const feeString = this.safeString (transaction, 'fee');\n const feeAssetId = this.safeString (transaction, 'feeAssetId', 'WAVES');\n const feeCode = this.safeCurrencyCode (feeAssetId);\n const feeAmount = this.parseNumber (this.fromRealCurrencyAmount (feeCode, feeString));\n const timestamp = this.safeInteger (transaction, 'timestamp');\n return {\n 'id': this.safeString (transaction, 'id'),\n 'txid': undefined,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'network': undefined,\n 'addressFrom': this.safeString (transaction, 'sender'),\n 'address': undefined,\n 'addressTo': this.safeString (transaction, 'recipient'),\n 'amount': amount,\n 'type': type,\n 'currency': currency['code'],\n 'status': undefined,\n 'updated': undefined,\n 'tagFrom': undefined,\n 'tag': undefined,\n 'tagTo': undefined,\n 'comment': undefined,\n 'internal': undefined,\n 'fee': {\n 'currency': feeCode,\n 'cost': feeAmount,\n },\n 'info': transaction,\n } as Transaction;\n }" } ], path_prefix: "", pro: false, quote_json_numbers: nil, rate_limits: %{ interval_ms: 10, period: 1000, requests: 100, rolling_window_size: 60000 }, raw_endpoints: %{ private: [], public: [] }, required_credentials: %{ api_key: true, password: false, secret: true, uid: false }, requires_eddsa: true, response_error: %{ code_field: "error", field: "success", message_field: "message", success_values: nil, type: :success_bool }, signing: %{ confidence: :medium, pattern: :hmac_sha256_headers }, spec_format_version: 2, status: %{ "eta" => nil, "status" => "ok", "updated" => nil, "url" => nil }, symbol_format: nil, symbol_formats: %{ precision_mode: 4, sample_limits: %{ "amount" => %{}, "cost" => %{}, "price" => %{} }, sample_precision: %{ "amount" => 1.0e-8, "price" => 1.0e-8 }, spot: %{ base: "WAVES", base_id: "WAVES", contract: false, id: "WAVES/2Fge5HEBRD3XTeg7Xg3FW5yiB9HVJFQtMXiWMQo72Up6", limits: %{ "amount" => %{}, "cost" => %{}, "leverage" => %{}, "price" => %{} }, precision: %{ "amount" => 1.0e-8, "price" => 1.0e-8 }, quote: "WBTC-PPT", quote_id: "2Fge5HEBRD3XTeg7Xg3FW5yiB9HVJFQtMXiWMQo72Up6", separator: "", symbol: "WAVES/WBTC-PPT" } }, symbol_patterns: %{ spot: %{ case: :mixed, component_order: nil, date_format: nil, pattern: :no_separator_mixed, prefix: nil, separator: "", suffix: nil } }, timeframes: %{ "12h" => "12h", "15m" => "15m", "1M" => "1M", "1d" => "1d", "1h" => "1h", "1m" => "1m", "1w" => "1w", "2h" => "2h", "30m" => "30m", "3h" => "3h", "4h" => "4h", "5m" => "5m", "6h" => "6h" }, url_strategy: %{ detected_from: "fallback", pattern: :no_prefix, prefix: nil }, urls: %{ api: "https://api.wavesplatform.com/v0", api_sections: %{ "forward" => "https://wx.network/api/v1/forward/matcher", "market" => "https://wx.network/api/v1/forward/marketdata/api/v1", "matcher" => "https://matcher.wx.network", "node" => "https://nodes.wx.network", "private" => "https://api.wx.network/v1", "public" => "https://api.wavesplatform.com/v0" }, doc: [ "https://docs.wx.network", "https://docs.waves.tech", "https://api.wavesplatform.com/v0/docs/", "https://nodes.wavesnodes.com/api-docs/index.html", "https://matcher.waves.exchange/api-docs/index.html" ], other: nil, sandbox: %{ "forward" => "https://testnet.wx.network/api/v1/forward/matcher", "market" => "https://testnet.wx.network/api/v1/forward/marketdata/api/v1", "matcher" => "https://matcher-testnet.wx.network", "node" => "https://nodes-testnet.wavesnodes.com", "private" => "https://api-testnet.wx.network/v1", "public" => "https://api-testnet.wavesplatform.com/v0" }, www: "https://wx.network" }, version: nil, ws: nil }