# BIT.TEAM Exchange Specification # # Auto-generated by: mix ccxt.extract bitteam # CCXT version: 4.5.34 # Spec format version: 1 # # 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: [ "UK" ], currencies: %{}, currency_aliases: %{ "BCHSV" => "BSV", "XBT" => "BTC" }, dex: false, enable_rate_limit: true, endpoint_extraction_stats: %{ "capturedMethods" => 17, "coveragePercent" => 100, "enabledMethods" => 22, "excluded" => [], "excludedMethods" => 0, "extractableMethods" => 22, "failures" => [ %{ "error" => "Cannot read properties of undefined (reading 'toString')", "method" => "cancelAllOrders" }, %{ "error" => "Cannot read properties of undefined (reading 'toString')", "method" => "createLimitOrder" }, %{ "error" => "Cannot read properties of undefined (reading 'toString')", "method" => "createMarketOrder" }, %{ "error" => "Cannot read properties of undefined (reading 'toString')", "method" => "createOrder" }, %{ "error" => "bitteam does not have currency code BTC/USDT", "method" => "fetchTransactions" } ] }, endpoints: [ %{ api_section: "private", auth: true, cost: 1, market_type: :spot, method: :post, name: :cancel_order, param_mappings: %{}, params: [ :id, :symbol ], path: "/trade/api/ccxt/cancelorder", response_transformer: {:extract_path, ["result"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, market_type: :spot, method: :get, name: :fetch_balance, param_mappings: %{}, params: [], path: "/trade/api/ccxt/balance", response_transformer: {:extract_path, ["result"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ "type" => "cancelled" }, market_type: :spot, method: :get, name: :fetch_canceled_orders, param_mappings: %{ "symbol" => "pair" }, params: [ :symbol, :since, :limit ], path: "/trade/api/ccxt/ordersOfUser", response_transformer: {:extract_path, ["result", "orders"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ "type" => "closed" }, market_type: :spot, method: :get, name: :fetch_closed_orders, param_mappings: %{ "symbol" => "pair" }, params: [ :symbol, :since, :limit ], path: "/trade/api/ccxt/ordersOfUser", response_transformer: {:extract_path, ["result", "orders"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, market_type: :spot, method: :get, name: :fetch_currencies, param_mappings: %{}, params: [], path: "/trade/api/currencies", response_transformer: {:extract_path, ["result", "currencies"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, market_type: :spot, method: :get, name: :fetch_deposits_withdrawals, param_mappings: %{}, params: [ :code, :since, :limit ], path: "/trade/api/transactionsOfUser", response_transformer: {:extract_path, ["result", "transactions"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, market_type: :spot, method: :get, name: :fetch_l2_order_book, param_mappings: %{ "symbol" => "pair" }, params: [ :symbol, :limit ], path: "/trade/api/cmc/orderbook/{pair}", response_transformer: {:extract_path, ["result"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, market_type: :spot, method: :get, name: :fetch_markets, param_mappings: %{}, params: [], path: "/trade/api/ccxt/pairs", response_transformer: {:extract_path, ["result", "pairs"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, market_type: :spot, method: :get, name: :fetch_my_trades, param_mappings: %{}, params: [ :symbol, :since, :limit ], path: "/trade/api/ccxt/tradesOfUser", response_transformer: {:extract_path, ["result", "trades"]}, source: :intercepted }, %{ api_section: "history", auth: false, base_url: "https://history.bit.team", cost: 1, default_params: %{ "resolution" => "60" }, market_type: :spot, method: :get, name: :fetch_ohlcv, param_mappings: %{ "symbol" => "pairName", "timeframe" => "resolution" }, params: [ :symbol, :timeframe, :since, :limit ], path: "/api/tw/history/{pairName}/{resolution}", response_transformer: {:extract_path, ["result", "data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ "type" => "active" }, market_type: :spot, method: :get, name: :fetch_open_orders, param_mappings: %{ "symbol" => "pair" }, params: [ :symbol, :since, :limit ], path: "/trade/api/ccxt/ordersOfUser", response_transformer: {:extract_path, ["result", "orders"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, market_type: :spot, method: :get, name: :fetch_order, param_mappings: %{}, params: [ :id, :symbol ], path: "/trade/api/ccxt/order/{id}", response_transformer: {:extract_path_unwrap, ["result"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, market_type: :spot, method: :get, name: :fetch_order_book, param_mappings: %{ "symbol" => "pair" }, params: [ :symbol, :limit ], path: "/trade/api/cmc/orderbook/{pair}", response_transformer: {:extract_path_unwrap, ["result"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ "type" => "all" }, market_type: :spot, method: :get, name: :fetch_orders, param_mappings: %{ "symbol" => "pair" }, params: [ :symbol, :since, :limit ], path: "/trade/api/ccxt/ordersOfUser", response_transformer: {:extract_path, ["result", "orders"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, market_type: :spot, method: :get, name: :fetch_ticker, param_mappings: %{ "symbol" => "name" }, params: [ :symbol ], path: "/trade/api/pair/{name}", response_transformer: {:extract_path_unwrap, ["result", "pair"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, market_type: :spot, method: :get, name: :fetch_tickers, param_mappings: %{}, params: [ :symbols ], path: "/trade/api/cmc/summary", response_transformer: {:extract_path, ["result"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, market_type: :spot, method: :get, name: :fetch_trades, param_mappings: %{ "symbol" => "pair" }, params: [ :symbol, :since, :limit ], path: "/trade/api/cmc/trades/{pair}", response_transformer: {:extract_path, ["result"]}, source: :intercepted } ], error_code_details: %{ 400002 => %{ description: "An order cannot be created on a deactivated pair", type: :invalid_order }, 401000 => %{ description: "Missing authentication", type: :invalid_credentials }, 403002 => %{ description: "Order cannot be deleted, status does not match", type: :invalid_parameters }, 404200 => %{ description: "Pair was not found", type: :invalid_order }, "Insufficient funds" => %{ description: "Insufficient funds", type: :insufficient_balance }, "Invalid request params input" => %{ description: "Invalid request params input", type: :invalid_parameters }, "Order not found" => %{ description: "Order not found", type: :order_not_found }, "Pair with pair name" => %{ description: "Pair with pair name ETH_USasdf was not found", type: :invalid_order }, "Service Unavailable" => %{ description: "Service Unavailable", type: :network_error }, "Symbol " => %{ description: "Symbol asdfasdfas was not found", type: :invalid_order }, "is not allowed" => %{ description: "\"createdAt\" is not allowed", type: :invalid_parameters }, "must be a number" => %{ description: "[ExchangeError] bitteam {\"message\":\"\\\"currency\\\" must be a number\",\"path\":[\"currency\"],\"type\":\"number.base\",\"context\":{\"label\":\"currency\",\"value\":\"adsf\",\"key\":\"currency\"}}", type: :invalid_parameters }, "must be a string" => %{ description: "\"pairId\" must be a string", type: :invalid_parameters }, "must be of type" => %{ description: "\"order\" must be of type object", type: :invalid_parameters }, "must be one of" => %{ description: "\"resolution\" must be one of [1, 5, 15, 60, 1D]", type: :invalid_parameters }, "pairName" => %{ description: "\"pairName\" length must be at least 7 characters long", type: :invalid_order } }, error_codes: %{ 400002 => :invalid_order, 401000 => :invalid_credentials, 403002 => :invalid_parameters, 404200 => :invalid_order, "Insufficient funds" => :insufficient_balance, "Invalid request params input" => :invalid_parameters, "Order not found" => :order_not_found, "Pair with pair name" => :invalid_order, "Service Unavailable" => :network_error, "Symbol " => :invalid_order, "is not allowed" => :invalid_parameters, "must be a number" => :invalid_parameters, "must be a string" => :invalid_parameters, "must be of type" => :invalid_parameters, "must be one of" => :invalid_parameters, "pairName" => :invalid_order }, exceptions: %{ broad: %{ "Insufficient funds" => :insufficient_funds, "Invalid request params input" => :bad_request, "Order not found" => :order_not_found, "Pair with pair name" => :bad_symbol, "Service Unavailable" => :exchange_not_available, "Symbol " => :bad_symbol, "is not allowed" => :bad_request, "must be a number" => :bad_request, "must be a string" => :bad_request, "must be of type" => :bad_request, "must be one of" => :bad_request, "pairName" => :bad_symbol }, exact: %{ "400002" => :bad_symbol, "401000" => :authentication_error, "403002" => :bad_request, "404200" => :bad_symbol } }, exchange_options: %{ "currenciesValuedInUsd" => %{ "BUSD" => true, "USDT" => true }, "defaultNetworkCodeReplacements" => %{ "BRC20" => %{ "BRC20" => "BTC" }, "CRO" => %{ "CRC20" => "CRONOS" }, "ETH" => %{ "ERC20" => "ETH" }, "TRX" => %{ "TRC20" => "TRX" } }, "networksById" => %{ "Binance" => "BSC", "Binance Smart Chain" => "BSC", "Bitcoin" => "BTC", "Decimal" => "Decimal", "Ethereum" => "ERC20", "Litecoin" => "LTC", "PRIZM" => "PRIZM", "Polygon" => "POLYGON", "Tron" => "TRC20", "binance" => "BSC", "bitcoin" => "BTC", "bscscan" => "BSC", "ethereum" => "ERC20", "litecoin" => "LTC", "polygon" => "POLYGON", "tonchain" => "tonchain", "tron" => "TRC20", "ufobject" => "ufobject" } }, extended_metadata: %{ limits: %{ "amount" => %{}, "cost" => %{}, "leverage" => %{}, "price" => %{} }, logo_url: "https://github.com/user-attachments/assets/b41b5e0d-98e5-4bd3-8a6e-aeb230a4a135", referral_url: "https://bit.team/auth/sign-up?ref=bitboy2023" }, extracted_metadata: %{ ccxt_version: "4.5.34" }, features: %{ future: %{}, spot: %{ create_order: %{ hedged: false, iceberg: false, leverage: false, margin_mode: false, market_buy_by_cost: false, market_buy_requires_price: false, self_trade_prevention: false, stop_loss_price: false, take_profit_price: false, time_in_force: %{ fok: false, gtd: false, ioc: false, po: false }, trailing: false, trigger_price: false }, fetch_closed_orders: %{ limit: 100, margin_mode: false, symbol_required: false, trailing: false, trigger: false }, fetch_my_trades: %{ days_back: 100000, limit: 100, margin_mode: false, symbol_required: false, until_days: 100000 }, fetch_ohlcv: %{ limit: 1000 }, 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: true, symbol_required: false, trailing: false, trigger: false }, sandbox: false }, swap: %{} }, fees: %{ trading: %{ fee_side: "get", maker: 0.002, percentage: true, taker: 0.002, tier_based: false } }, handle_content_type_application_zip: nil, handle_errors_source: "handleErrors(code, reason, url, method, headers, body, response, requestHeaders, requestBody) {\n if (response === undefined) {\n return undefined;\n }\n if (code !== 200) {\n if (code === 404) {\n if ((url.indexOf('/ccxt/order/') >= 0) && (method === 'GET')) {\n const parts = url.split('/order/');\n const orderId = this.safeString(parts, 1);\n throw new errors.OrderNotFound(this.id + ' order ' + orderId + ' not found');\n }\n if (url.indexOf('/cmc/orderbook/') >= 0) {\n const parts = url.split('/cmc/orderbook/');\n const symbolId = this.safeString(parts, 1);\n throw new errors.BadSymbol(this.id + ' symbolId ' + symbolId + ' not found');\n }\n }\n const feedback = this.id + ' ' + body;\n const message = this.safeString(response, 'message');\n const responseCode = this.safeString(response, 'code');\n this.throwBroadlyMatchedException(this.exceptions['broad'], message, feedback);\n this.throwExactlyMatchedException(this.exceptions['exact'], responseCode, feedback);\n throw new errors.ExchangeError(feedback);\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: true, 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: false, edit_order_with_client_order_id: false, edit_order_ws: false, edit_orders: false, fetch_accounts: 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: true, 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: true, fetch_currencies_ws: true, fetch_deposit: false, fetch_deposit_address: false, fetch_deposit_addresses: false, fetch_deposit_addresses_by_network: false, fetch_deposit_withdraw_fee: false, fetch_deposit_withdraw_fees: false, fetch_deposits: false, fetch_deposits_withdrawals: true, 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_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_history: false, fetch_position_mode: false, fetch_position_ws: false, fetch_positions: 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: true, 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, repay_margin: false, sandbox: false, set_leverage: false, set_margin: false, set_margin_mode: false, set_position_mode: false, sign_in: false, 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: false, ws: false }, http_config: nil, id: "bitteam", markets: nil, name: "BIT.TEAM", ohlcv_timestamp_resolution: :unknown, options: %{ "currencies_valued_in_usd" => %{ "BUSD" => true, "USDT" => true }, :networks_by_id => %{ "Binance" => "BSC", "Binance Smart Chain" => "BSC", "Bitcoin" => "BTC", "Decimal" => "Decimal", "Ethereum" => "ERC20", "Litecoin" => "LTC", "PRIZM" => "PRIZM", "Polygon" => "POLYGON", "Tron" => "TRC20", "binance" => "BSC", "bitcoin" => "BTC", "bscscan" => "BSC", "ethereum" => "ERC20", "litecoin" => "LTC", "polygon" => "POLYGON", "tonchain" => "tonchain", "tron" => "TRC20", "ufobject" => "ufobject" } }, order_mappings: nil, param_mappings: %{ "symbol" => "pair", "timeframe" => "resolution" }, parse_methods: [ %{ "comment" => nil, "examples" => [ "{\n \"ok\": true,\n \"result\": {\n \"free\": {\n \"USDT\": \"0\",\n \"DEL\": \"0\",\n \"BTC\": \"0\",\n ...\n },\n \"used\": {\n \"USDT\": \"0\",\n \"DEL\": \"0\",\n \"BTC\": \"0\",\n ...\n },\n \"total\": {\n \"USDT\": \"0\",\n \"DEL\": \"0\",\n \"BTC\": \"0\",\n ...\n },\n \"USDT\": {\n \"free\": \"0\",\n \"used\": \"0\",\n \"total\": \"0\",\n },\n \"DEL\": {\n \"free\": \"0\",\n \"used\": \"0\",\n \"total\": \"0\",\n },\n \"BTC\": {\n \"free\": \"0\",\n \"used\": \"0\",\n \"total\": \"0\",\n }\n ...\n }\n }" ], "line_end" => 2166, "line_start" => 2101, "mappings" => [ %{ "comment" => nil, "key" => "free", "value" => "free" }, %{ "comment" => nil, "key" => "used", "value" => "used" }, %{ "comment" => nil, "key" => "total", "value" => "total" } ], "name" => "parseBalance", "signature" => "parseBalance (response): Balances", "source" => "parseBalance (response): Balances {\n //\n // {\n // \"ok\": true,\n // \"result\": {\n // \"free\": {\n // \"USDT\": \"0\",\n // \"DEL\": \"0\",\n // \"BTC\": \"0\",\n // ...\n // },\n // \"used\": {\n // \"USDT\": \"0\",\n // \"DEL\": \"0\",\n // \"BTC\": \"0\",\n // ...\n // },\n // \"total\": {\n // \"USDT\": \"0\",\n // \"DEL\": \"0\",\n // \"BTC\": \"0\",\n // ...\n // },\n // \"USDT\": {\n // \"free\": \"0\",\n // \"used\": \"0\",\n // \"total\": \"0\",\n // },\n // \"DEL\": {\n // \"free\": \"0\",\n // \"used\": \"0\",\n // \"total\": \"0\",\n // },\n // \"BTC\": {\n // \"free\": \"0\",\n // \"used\": \"0\",\n // \"total\": \"0\",\n // }\n // ...\n // }\n // }\n //\n const timestamp = this.milliseconds ();\n const balance: Dict = {\n 'info': response,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n };\n const result = this.safeValue (response, 'result', {});\n const balanceByCurrencies = this.omit (result, [ 'free', 'used', 'total' ]);\n const rawCurrencyIds = Object.keys (balanceByCurrencies);\n for (let i = 0; i < rawCurrencyIds.length; i++) {\n const rawCurrencyId = rawCurrencyIds[i];\n const currencyBalance = this.safeValue (result, rawCurrencyId);\n const free = this.safeString (currencyBalance, 'free');\n const used = this.safeString (currencyBalance, 'used');\n const total = this.safeString (currencyBalance, 'total');\n const currencyCode = this.safeCurrencyCode (rawCurrencyId.toLowerCase ());\n balance[currencyCode] = {\n 'free': free,\n 'used': used,\n 'total': total,\n };\n }\n return this.safeBalance (balance);\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 526, "line_start" => 458, "mappings" => [ %{ "comment" => nil, "key" => "id", "value" => "id" }, %{ "comment" => nil, "key" => "numericId", "value" => "numericId" }, %{ "comment" => nil, "key" => "symbol", "value" => "base + '/' + quote" }, %{ "comment" => nil, "key" => "base", "value" => "base" }, %{ "comment" => nil, "key" => "quote", "value" => "quote" }, %{ "comment" => nil, "key" => "settle", "value" => "undefined" }, %{ "comment" => nil, "key" => "baseId", "value" => "baseId" }, %{ "comment" => nil, "key" => "quoteId", "value" => "quoteId" }, %{ "comment" => nil, "key" => "settleId", "value" => "undefined" }, %{ "comment" => nil, "key" => "type", "value" => "'spot'" }, %{ "comment" => nil, "key" => "spot", "value" => "true" }, %{ "comment" => nil, "key" => "margin", "value" => "false" }, %{ "comment" => nil, "key" => "swap", "value" => "false" }, %{ "comment" => nil, "key" => "future", "value" => "false" }, %{ "comment" => nil, "key" => "option", "value" => "false" }, %{ "comment" => nil, "key" => "active", "value" => "active" }, %{ "comment" => nil, "key" => "contract", "value" => "false" }, %{ "comment" => nil, "key" => "linear", "value" => "undefined" }, %{ "comment" => nil, "key" => "inverse", "value" => "undefined" }, %{ "comment" => nil, "key" => "contractSize", "value" => "undefined" }, %{ "comment" => nil, "key" => "expiry", "value" => "undefined" }, %{ "comment" => nil, "key" => "expiryDatetime", "value" => "undefined" }, %{ "comment" => nil, "key" => "strike", "value" => "undefined" }, %{ "comment" => nil, "key" => "optionType", "value" => "undefined" }, %{ "comment" => nil, "key" => "precision", "value" => "{\n 'amount': this.parseNumber (this.parsePrecision (this.safeString (market, 'baseStep'))),\n 'price': this.parseNumber (this.parsePrecision (this.safeString (market, 'quoteStep'))),\n }" }, %{ "comment" => nil, "key" => "limits", "value" => "{\n 'leverage': {\n 'min': undefined,\n 'max': undefined,\n },\n 'amount': {\n 'min': undefined,\n 'max': undefined,\n },\n 'price': {\n 'min': undefined,\n 'max': undefined,\n },\n 'cost': {\n 'min': minCost,\n 'max': undefined,\n },\n }" }, %{ "comment" => nil, "key" => "created", "value" => "created" }, %{ "comment" => nil, "key" => "info", "value" => "market" }, %{ "comment" => nil, "key" => "leverage", "value" => "{\n 'min': undefined,\n 'max': undefined,\n }" }, %{ "comment" => nil, "key" => "amount", "value" => "{\n 'min': undefined,\n 'max': undefined,\n }" }, %{ "comment" => nil, "key" => "price", "value" => "{\n 'min': undefined,\n 'max': undefined,\n }" }, %{ "comment" => nil, "key" => "cost", "value" => "{\n 'min': minCost,\n 'max': undefined,\n }" } ], "name" => "parseMarket", "signature" => "parseMarket (market: Dict): Market", "source" => "parseMarket (market: Dict): Market {\n const id = this.safeString (market, 'name');\n const numericId = this.safeInteger (market, 'id');\n const parts = id.split ('_');\n const baseId = this.safeString (parts, 0);\n const quoteId = this.safeString (parts, 1);\n const base = this.safeCurrencyCode (baseId);\n const quote = this.safeCurrencyCode (quoteId);\n const active = this.safeValue (market, 'active');\n const timeStart = this.safeString (market, 'timeStart');\n const created = this.parse8601 (timeStart);\n let minCost = undefined;\n const currenciesValuedInUsd = this.safeValue (this.options, 'currenciesValuedInUsd', {});\n const quoteInUsd = this.safeBool (currenciesValuedInUsd, quote, false);\n if (quoteInUsd) {\n const settings = this.safeValue (market, 'settings', {});\n minCost = this.safeNumber (settings, 'limit_usd');\n }\n return this.safeMarketStructure ({\n 'id': id,\n 'numericId': numericId,\n 'symbol': base + '/' + quote,\n 'base': base,\n 'quote': quote,\n 'settle': undefined,\n 'baseId': baseId,\n 'quoteId': quoteId,\n 'settleId': undefined,\n 'type': 'spot',\n 'spot': true,\n 'margin': false,\n 'swap': false,\n 'future': false,\n 'option': false,\n 'active': active,\n 'contract': false,\n 'linear': undefined,\n 'inverse': undefined,\n 'contractSize': undefined,\n 'expiry': undefined,\n 'expiryDatetime': undefined,\n 'strike': undefined,\n 'optionType': undefined,\n 'precision': {\n 'amount': this.parseNumber (this.parsePrecision (this.safeString (market, 'baseStep'))),\n 'price': this.parseNumber (this.parsePrecision (this.safeString (market, 'quoteStep'))),\n },\n 'limits': {\n 'leverage': {\n 'min': undefined,\n 'max': undefined,\n },\n 'amount': {\n 'min': undefined,\n 'max': undefined,\n },\n 'price': {\n 'min': undefined,\n 'max': undefined,\n },\n 'cost': {\n 'min': minCost,\n 'max': undefined,\n },\n },\n 'created': created,\n 'info': market,\n });\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"t\": 1669680000,\n \"o\": 16430.636894,\n \"h\": 17065.229582,\n \"l\": 16346.114155,\n \"c\": 16882.297736,\n \"v\": 3.0872548400000115\n }," ], "line_end" => 815, "line_start" => 796, "mappings" => [], "name" => "parseOHLCV", "signature" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV", "source" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV {\n //\n // {\n // \"t\": 1669680000,\n // \"o\": 16430.636894,\n // \"h\": 17065.229582,\n // \"l\": 16346.114155,\n // \"c\": 16882.297736,\n // \"v\": 3.0872548400000115\n // },\n //\n return [\n this.safeTimestamp (ohlcv, 't'),\n this.safeNumber (ohlcv, 'o'),\n this.safeNumber (ohlcv, 'h'),\n this.safeNumber (ohlcv, 'l'),\n this.safeNumber (ohlcv, 'c'),\n this.safeNumber (ohlcv, 'v'),\n ];\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"id\": 106733308,\n \"orderId\": \"13074362\",\n \"userId\": 21639,\n \"pair\": \"btc_usdt\",\n \"pairId\": 22,\n \"quantity\": \"0.00001\",\n \"price\": \"50000\",\n \"executedPrice\": \"37017.495008\",\n \"fee\": {\n \"amount\": \"0.00000002\",\n \"symbol\": \"btc\",\n \"userId\": 21639,\n \"decimals\": 8,\n \"symbolId\": 11\n },\n \"orderCid\": null,\n \"executed\": \"0.00001\",\n \"expires\": null,\n \"baseDecimals\": 8,\n \"quoteDecimals\": 6,\n \"timestamp\": 1700594959,\n \"status\": \"executed\",\n \"side\": \"buy\",\n \"type\": \"limit\",\n \"createdAt\": \"2023-11-21T19:29:19.946Z\",\n \"updatedAt\": \"2023-11-21T19:29:19.946Z\"\n },", "{\n \"id\": 106494347,\n \"orderId\": \"13214332\",\n \"userId\": 15912,\n \"pair\": \"eth_usdt\",\n \"pairId\": 2,\n \"quantity\": \"0.00448598\",\n \"price\": \"2015.644995\",\n \"executedPrice\": \"2015.644995\",\n \"fee\": {\n \"amount\": \"0\",\n \"symbol\": \"eth\",\n \"userId\": 15912,\n \"decimals\": 18,\n \"symbolId\": 2,\n \"discountAmount\": \"0\",\n \"discountSymbol\": \"btt\",\n \"discountDecimals\": 18,\n \"discountSymbolId\": 5\n },\n \"orderCid\": null,\n \"executed\": \"0.00448598\",\n \"expires\": null,\n \"baseDecimals\": 18,\n \"quoteDecimals\": 6,\n \"timestamp\": 1700470476,\n \"status\": \"executed\",\n \"side\": \"buy\",\n \"type\": \"limit\",\n \"stopPrice\": null,\n \"slippage\": null\n }", "{\n \"id\": 106733308,\n \"userId\": 21639,\n \"quantity\": \"0.00001\",\n \"pair\": \"btc_usdt\",\n \"side\": \"buy\",\n \"price\": \"50000\",\n \"executed\": \"0\",\n \"executedPrice\": \"0\",\n \"status\": \"created\",\n \"baseDecimals\": 8,\n \"quoteDecimals\": 6,\n \"pairId\": 22,\n \"type\": \"limit\",\n \"stopPrice\": null,\n \"slippage\": null,\n \"timestamp\": \"1700594959\"\n }" ], "line_end" => 1356, "line_start" => 1216, "mappings" => [ %{ "comment" => nil, "key" => "id", "value" => "id" }, %{ "comment" => nil, "key" => "clientOrderId", "value" => "clientOrderId" }, %{ "comment" => nil, "key" => "timestamp", "value" => "timestamp" }, %{ "comment" => nil, "key" => "datetime", "value" => "this.iso8601 (timestamp)" }, %{ "comment" => nil, "key" => "lastTradeTimestamp", "value" => "undefined" }, %{ "comment" => nil, "key" => "lastUpdateTimestamp", "value" => "lastUpdateTimestamp" }, %{ "comment" => nil, "key" => "status", "value" => "status" }, %{ "comment" => nil, "key" => "symbol", "value" => "market['symbol']" }, %{ "comment" => nil, "key" => "type", "value" => "type" }, %{ "comment" => nil, "key" => "timeInForce", "value" => "'GTC'" }, %{ "comment" => nil, "key" => "side", "value" => "side" }, %{ "comment" => nil, "key" => "price", "value" => "price" }, %{ "comment" => nil, "key" => "triggerPrice", "value" => "this.safeString (order, 'stopPrice')" }, %{ "comment" => nil, "key" => "average", "value" => "undefined" }, %{ "comment" => nil, "key" => "amount", "value" => "amount" }, %{ "comment" => nil, "key" => "cost", "value" => "undefined" }, %{ "comment" => nil, "key" => "filled", "value" => "filled" }, %{ "comment" => nil, "key" => "remaining", "value" => "undefined" }, %{ "comment" => nil, "key" => "fee", "value" => "fee" }, %{ "comment" => nil, "key" => "trades", "value" => "undefined" }, %{ "comment" => nil, "key" => "info", "value" => "order" }, %{ "comment" => nil, "key" => "postOnly", "value" => "false" }, %{ "comment" => nil, "key" => "currency", "value" => "this.safeCurrencyCode (feeCurrencyId)" }, %{ "comment" => nil, "key" => "cost", "value" => "feeCost" }, %{ "comment" => nil, "key" => "rate", "value" => "undefined" } ], "name" => "parseOrder", "signature" => "parseOrder (order: Dict, market: Market = undefined): Order", "source" => "parseOrder (order: Dict, market: Market = undefined): Order {\n //\n // fetchOrders\n // {\n // \"id\": 106733308,\n // \"orderId\": \"13074362\",\n // \"userId\": 21639,\n // \"pair\": \"btc_usdt\",\n // \"pairId\": 22,\n // \"quantity\": \"0.00001\",\n // \"price\": \"50000\",\n // \"executedPrice\": \"37017.495008\",\n // \"fee\": {\n // \"amount\": \"0.00000002\",\n // \"symbol\": \"btc\",\n // \"userId\": 21639,\n // \"decimals\": 8,\n // \"symbolId\": 11\n // },\n // \"orderCid\": null,\n // \"executed\": \"0.00001\",\n // \"expires\": null,\n // \"baseDecimals\": 8,\n // \"quoteDecimals\": 6,\n // \"timestamp\": 1700594959,\n // \"status\": \"executed\",\n // \"side\": \"buy\",\n // \"type\": \"limit\",\n // \"createdAt\": \"2023-11-21T19:29:19.946Z\",\n // \"updatedAt\": \"2023-11-21T19:29:19.946Z\"\n // },\n //\n // fetchOrder\n // {\n // \"id\": 106494347,\n // \"orderId\": \"13214332\",\n // \"userId\": 15912,\n // \"pair\": \"eth_usdt\",\n // \"pairId\": 2,\n // \"quantity\": \"0.00448598\",\n // \"price\": \"2015.644995\",\n // \"executedPrice\": \"2015.644995\",\n // \"fee\": {\n // \"amount\": \"0\",\n // \"symbol\": \"eth\",\n // \"userId\": 15912,\n // \"decimals\": 18,\n // \"symbolId\": 2,\n // \"discountAmount\": \"0\",\n // \"discountSymbol\": \"btt\",\n // \"discountDecimals\": 18,\n // \"discountSymbolId\": 5\n // },\n // \"orderCid\": null,\n // \"executed\": \"0.00448598\",\n // \"expires\": null,\n // \"baseDecimals\": 18,\n // \"quoteDecimals\": 6,\n // \"timestamp\": 1700470476,\n // \"status\": \"executed\",\n // \"side\": \"buy\",\n // \"type\": \"limit\",\n // \"stopPrice\": null,\n // \"slippage\": null\n // }\n //\n // createOrder\n // {\n // \"id\": 106733308,\n // \"userId\": 21639,\n // \"quantity\": \"0.00001\",\n // \"pair\": \"btc_usdt\",\n // \"side\": \"buy\",\n // \"price\": \"50000\",\n // \"executed\": \"0\",\n // \"executedPrice\": \"0\",\n // \"status\": \"created\",\n // \"baseDecimals\": 8,\n // \"quoteDecimals\": 6,\n // \"pairId\": 22,\n // \"type\": \"limit\",\n // \"stopPrice\": null,\n // \"slippage\": null,\n // \"timestamp\": \"1700594959\"\n // }\n //\n const id = this.safeString (order, 'id');\n const marketId = this.safeString (order, 'pair');\n market = this.safeMarket (marketId, market);\n const clientOrderId = this.safeString (order, 'orderCid');\n let timestamp = undefined;\n const createdAt = this.safeString (order, 'createdAt');\n if (createdAt !== undefined) {\n timestamp = this.parse8601 (createdAt);\n } else {\n timestamp = this.safeTimestamp (order, 'timestamp');\n }\n const updatedAt = this.safeString (order, 'updatedAt');\n const lastUpdateTimestamp = this.parse8601 (updatedAt);\n const status = this.parseOrderStatus (this.safeString (order, 'status'));\n const type = this.parseOrderType (this.safeString (order, 'type'));\n const side = this.safeString (order, 'side');\n const feeRaw = this.safeValue (order, 'fee');\n const price = this.safeString (order, 'price');\n const amount = this.safeString (order, 'quantity');\n const filled = this.safeString (order, 'executed');\n let fee = undefined;\n if (feeRaw !== undefined) {\n const feeCost = this.safeString (feeRaw, 'amount');\n const feeCurrencyId = this.safeString (feeRaw, 'symbol');\n fee = {\n 'currency': this.safeCurrencyCode (feeCurrencyId),\n 'cost': feeCost,\n 'rate': undefined,\n };\n }\n return this.safeOrder ({\n 'id': id,\n 'clientOrderId': clientOrderId,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'lastTradeTimestamp': undefined,\n 'lastUpdateTimestamp': lastUpdateTimestamp,\n 'status': status,\n 'symbol': market['symbol'],\n 'type': type,\n 'timeInForce': 'GTC',\n 'side': side,\n 'price': price,\n 'triggerPrice': this.safeString (order, 'stopPrice'),\n 'average': undefined,\n 'amount': amount,\n 'cost': undefined,\n 'filled': filled,\n 'remaining': undefined,\n 'fee': fee,\n 'trades': undefined,\n 'info': order,\n 'postOnly': false,\n }, market);\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 1370, "line_start" => 1358, "mappings" => [], "name" => "parseOrderStatus", "signature" => "parseOrderStatus (status: Str)", "source" => "parseOrderStatus (status: Str) {\n const statuses: Dict = {\n 'accepted': 'open',\n 'executed': 'closed',\n 'cancelled': 'canceled',\n 'partiallyCancelled': 'canceled',\n 'delete': 'rejected',\n 'inactive': 'rejected',\n 'executing': 'open',\n 'created': 'open',\n };\n return this.safeString (statuses, status, status);\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 1378, "line_start" => 1372, "mappings" => [], "name" => "parseOrderType", "signature" => "parseOrderType (status)", "source" => "parseOrderType (status) {\n const statuses: Dict = {\n 'market': 'market',\n 'limit': 'limit',\n };\n return this.safeString (statuses, status, status);\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"id\": 2,\n \"name\": \"eth_usdt\",\n \"baseAssetId\": 2,\n \"quoteAssetId\": 3,\n \"fullName\": \"ETH USDT\",\n \"description\": \"ETH USDT\",\n \"lastBuy\": \"1976.715012\",\n \"lastSell\": \"1971.995006\",\n \"lastPrice\": \"1976.715012\",\n \"change24\": \"1.02\",\n \"volume24\": 24.0796457,\n \"volume24USD\": 44282.347995912205,\n \"active\": true,\n \"baseStep\": 8,\n \"quoteStep\": 6,\n \"status\": 1,\n \"asks\": [\n {\n \"price\": \"1976.405003\",\n \"quantity\": \"0.0051171\",\n \"amount\": \"10.1134620408513\"\n },\n {\n \"price\": \"1976.405013\",\n \"quantity\": \"0.09001559\",\n \"amount\": \"177.90726332415267\"\n },\n {\n \"price\": \"2010.704988\",\n \"quantity\": \"0.00127892\",\n \"amount\": \"2.57153082325296\"\n }\n ...\n ],\n \"bids\": [\n {\n \"price\": \"1976.404988\",\n \"quantity\": \"0.09875861\",\n \"amount\": \"195.18700941194668\"\n },\n {\n \"price\": \"1905.472973\",\n \"quantity\": \"0.00263591\",\n \"amount\": \"5.02265526426043\"\n },\n {\n \"price\": \"1904.274973\",\n \"quantity\": \"0.09425304\",\n \"amount\": \"179.48370520116792\"\n }\n ...\n ],\n \"updateId\": \"78\",\n \"timeStart\": \"2021-01-28T09:19:30.706Z\",\n \"makerFee\": 200,\n \"takerFee\": 200,\n \"quoteVolume24\": 49125.1374009045,\n \"lowPrice24\": 1966.704999,\n \"highPrice24\": 2080.354997,\n ...\n }", "{\n \"trading_pairs\": \"BTC_USDT\",\n \"base_currency\": \"BTC\",\n \"quote_currency\": \"USDT\",\n \"last_price\": 37669.955001,\n \"lowest_ask\": 37670.055,\n \"highest_bid\": 37669.955,\n \"base_volume\": 6.81156888,\n \"quote_volume\": 257400.516878529,\n \"price_change_percent_24h\": -0.29,\n \"highest_price_24h\": 38389.994463,\n \"lowest_price_24h\": 37574.894999\n }" ], "line_end" => 1775, "line_start" => 1649, "mappings" => [ %{ "comment" => nil, "key" => "symbol", "value" => "market['symbol']" }, %{ "comment" => nil, "key" => "timestamp", "value" => "undefined" }, %{ "comment" => nil, "key" => "datetime", "value" => "undefined" }, %{ "comment" => nil, "key" => "open", "value" => "undefined" }, %{ "comment" => nil, "key" => "high", "value" => "high" }, %{ "comment" => nil, "key" => "low", "value" => "low" }, %{ "comment" => nil, "key" => "close", "value" => "close" }, %{ "comment" => nil, "key" => "bid", "value" => "bestBidPrice" }, %{ "comment" => nil, "key" => "bidVolume", "value" => "bestBidVolume" }, %{ "comment" => nil, "key" => "ask", "value" => "bestAskPrice" }, %{ "comment" => nil, "key" => "askVolume", "value" => "bestAskVolume" }, %{ "comment" => nil, "key" => "vwap", "value" => "undefined" }, %{ "comment" => nil, "key" => "previousClose", "value" => "undefined" }, %{ "comment" => nil, "key" => "change", "value" => "undefined" }, %{ "comment" => nil, "key" => "percentage", "value" => "changePcnt" }, %{ "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 // fetchTicker\n // {\n // \"id\": 2,\n // \"name\": \"eth_usdt\",\n // \"baseAssetId\": 2,\n // \"quoteAssetId\": 3,\n // \"fullName\": \"ETH USDT\",\n // \"description\": \"ETH USDT\",\n // \"lastBuy\": \"1976.715012\",\n // \"lastSell\": \"1971.995006\",\n // \"lastPrice\": \"1976.715012\",\n // \"change24\": \"1.02\",\n // \"volume24\": 24.0796457,\n // \"volume24USD\": 44282.347995912205,\n // \"active\": true,\n // \"baseStep\": 8,\n // \"quoteStep\": 6,\n // \"status\": 1,\n // \"asks\": [\n // {\n // \"price\": \"1976.405003\",\n // \"quantity\": \"0.0051171\",\n // \"amount\": \"10.1134620408513\"\n // },\n // {\n // \"price\": \"1976.405013\",\n // \"quantity\": \"0.09001559\",\n // \"amount\": \"177.90726332415267\"\n // },\n // {\n // \"price\": \"2010.704988\",\n // \"quantity\": \"0.00127892\",\n // \"amount\": \"2.57153082325296\"\n // }\n // ...\n // ],\n // \"bids\": [\n // {\n // \"price\": \"1976.404988\",\n // \"quantity\": \"0.09875861\",\n // \"amount\": \"195.18700941194668\"\n // },\n // {\n // \"price\": \"1905.472973\",\n // \"quantity\": \"0.00263591\",\n // \"amount\": \"5.02265526426043\"\n // },\n // {\n // \"price\": \"1904.274973\",\n // \"quantity\": \"0.09425304\",\n // \"amount\": \"179.48370520116792\"\n // }\n // ...\n // ],\n // \"updateId\": \"78\",\n // \"timeStart\": \"2021-01-28T09:19:30.706Z\",\n // \"makerFee\": 200,\n // \"takerFee\": 200,\n // \"quoteVolume24\": 49125.1374009045,\n // \"lowPrice24\": 1966.704999,\n // \"highPrice24\": 2080.354997,\n // ...\n // }\n //\n // fetchTickers\n // {\n // \"trading_pairs\": \"BTC_USDT\",\n // \"base_currency\": \"BTC\",\n // \"quote_currency\": \"USDT\",\n // \"last_price\": 37669.955001,\n // \"lowest_ask\": 37670.055,\n // \"highest_bid\": 37669.955,\n // \"base_volume\": 6.81156888,\n // \"quote_volume\": 257400.516878529,\n // \"price_change_percent_24h\": -0.29,\n // \"highest_price_24h\": 38389.994463,\n // \"lowest_price_24h\": 37574.894999\n // }\n const marketId = this.safeStringLower (ticker, 'trading_pairs');\n market = this.safeMarket (marketId, market);\n let bestBidPrice = undefined;\n let bestAskPrice = undefined;\n let bestBidVolume = undefined;\n let bestAskVolume = undefined;\n const bids = this.safeValue (ticker, 'bids');\n const asks = this.safeValue (ticker, 'asks');\n if ((bids !== undefined) && (Array.isArray (bids)) && (asks !== undefined) && (Array.isArray (asks))) {\n const bestBid = this.safeValue (bids, 0, {});\n bestBidPrice = this.safeString (bestBid, 'price');\n bestBidVolume = this.safeString (bestBid, 'quantity');\n const bestAsk = this.safeValue (asks, 0, {});\n bestAskPrice = this.safeString (bestAsk, 'price');\n bestAskVolume = this.safeString (bestAsk, 'quantity');\n } else {\n bestBidPrice = this.safeString (ticker, 'highest_bid');\n bestAskPrice = this.safeString (ticker, 'lowest_ask');\n }\n const baseVolume = this.safeString2 (ticker, 'volume24', 'base_volume');\n const quoteVolume = this.safeString2 (ticker, 'quoteVolume24', 'quote_volume');\n const high = this.safeString2 (ticker, 'highPrice24', 'highest_price_24h');\n const low = this.safeString2 (ticker, 'lowPrice24', 'lowest_price_24h');\n const close = this.safeString2 (ticker, 'lastPrice', 'last_price');\n const changePcnt = this.safeString2 (ticker, 'change24', 'price_change_percent_24h');\n return this.safeTicker ({\n 'symbol': market['symbol'],\n 'timestamp': undefined,\n 'datetime': undefined,\n 'open': undefined,\n 'high': high,\n 'low': low,\n 'close': close,\n 'bid': bestBidPrice,\n 'bidVolume': bestBidVolume,\n 'ask': bestAskPrice,\n 'askVolume': bestAskVolume,\n 'vwap': undefined,\n 'previousClose': undefined,\n 'change': undefined,\n 'percentage': changePcnt,\n 'average': undefined,\n 'baseVolume': baseVolume,\n 'quoteVolume': quoteVolume,\n 'info': ticker,\n }, market);\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"trade_id\": 34970337,\n \"price\": 37769.994793,\n \"base_volume\": 0.00119062,\n \"quote_volume\": 44.96971120044166,\n \"timestamp\": 1700827234000,\n \"type\": \"buy\"\n },", "{\n \"id\": 34875793,\n \"tradeId\": \"4368010\",\n \"makerOrderId\": 106742914,\n \"takerOrderId\": 106745926,\n \"pairId\": 2,\n \"quantity\": \"0.0027193\",\n \"price\": \"1993.674994\",\n \"isBuyerMaker\": true,\n \"baseDecimals\": 18,\n \"quoteDecimals\": 6,\n \"side\": \"sell\",\n \"timestamp\": 1700602983,\n \"rewarded\": true,\n \"makerUserId\": 21639,\n \"takerUserId\": 15912,\n \"baseCurrencyId\": 2,\n \"quoteCurrencyId\": 3,\n \"feeMaker\": {\n \"amount\": \"0.00000543\",\n \"symbol\": \"eth\",\n \"userId\": 21639,\n \"decimals\": 18,\n \"symbolId\": 2\n },\n \"feeTaker\": {\n \"amount\": \"0\",\n \"symbol\": \"usdt\",\n \"userId\": 15912,\n \"decimals\": 6,\n \"symbolId\": 3,\n \"discountAmount\": \"0\",\n \"discountSymbol\": \"btt\",\n \"discountDecimals\": 18,\n \"discountSymbolId\": 5\n },\n \"pair\": \"eth_usdt\",\n \"createdAt\": \"2023-11-21T21:43:02.758Z\",\n \"updatedAt\": \"2023-11-21T21:45:00.147Z\",\n \"isCurrentSide\": \"maker\"\n }" ], "line_end" => 2085, "line_start" => 1980, "mappings" => [ %{ "comment" => nil, "key" => "currency", "value" => "this.safeCurrencyCode (feeCurrencyId)" }, %{ "comment" => nil, "key" => "cost", "value" => "feeCost" }, %{ "comment" => nil, "key" => "id", "value" => "id" }, %{ "comment" => nil, "key" => "order", "value" => "order" }, %{ "comment" => nil, "key" => "timestamp", "value" => "intTs" }, %{ "comment" => nil, "key" => "datetime", "value" => "this.iso8601 (intTs)" }, %{ "comment" => nil, "key" => "symbol", "value" => "symbol" }, %{ "comment" => nil, "key" => "type", "value" => "undefined" }, %{ "comment" => nil, "key" => "side", "value" => "side" }, %{ "comment" => nil, "key" => "takerOrMaker", "value" => "takerOrMaker" }, %{ "comment" => nil, "key" => "price", "value" => "price" }, %{ "comment" => nil, "key" => "amount", "value" => "amount" }, %{ "comment" => nil, "key" => "cost", "value" => "cost" }, %{ "comment" => nil, "key" => "fee", "value" => "fee" }, %{ "comment" => nil, "key" => "info", "value" => "trade" } ], "name" => "parseTrade", "signature" => "parseTrade (trade: Dict, market: Market = undefined): Trade", "source" => "parseTrade (trade: Dict, market: Market = undefined): Trade {\n //\n // fetchTrades\n // {\n // \"trade_id\": 34970337,\n // \"price\": 37769.994793,\n // \"base_volume\": 0.00119062,\n // \"quote_volume\": 44.96971120044166,\n // \"timestamp\": 1700827234000,\n // \"type\": \"buy\"\n // },\n //\n // fetchMyTrades\n // {\n // \"id\": 34875793,\n // \"tradeId\": \"4368010\",\n // \"makerOrderId\": 106742914,\n // \"takerOrderId\": 106745926,\n // \"pairId\": 2,\n // \"quantity\": \"0.0027193\",\n // \"price\": \"1993.674994\",\n // \"isBuyerMaker\": true,\n // \"baseDecimals\": 18,\n // \"quoteDecimals\": 6,\n // \"side\": \"sell\",\n // \"timestamp\": 1700602983,\n // \"rewarded\": true,\n // \"makerUserId\": 21639,\n // \"takerUserId\": 15912,\n // \"baseCurrencyId\": 2,\n // \"quoteCurrencyId\": 3,\n // \"feeMaker\": {\n // \"amount\": \"0.00000543\",\n // \"symbol\": \"eth\",\n // \"userId\": 21639,\n // \"decimals\": 18,\n // \"symbolId\": 2\n // },\n // \"feeTaker\": {\n // \"amount\": \"0\",\n // \"symbol\": \"usdt\",\n // \"userId\": 15912,\n // \"decimals\": 6,\n // \"symbolId\": 3,\n // \"discountAmount\": \"0\",\n // \"discountSymbol\": \"btt\",\n // \"discountDecimals\": 18,\n // \"discountSymbolId\": 5\n // },\n // \"pair\": \"eth_usdt\",\n // \"createdAt\": \"2023-11-21T21:43:02.758Z\",\n // \"updatedAt\": \"2023-11-21T21:45:00.147Z\",\n // \"isCurrentSide\": \"maker\"\n // }\n //\n const marketId = this.safeString (trade, 'pair');\n market = this.safeMarket (marketId, market);\n const symbol = market['symbol'];\n const id = this.safeString2 (trade, 'id', 'trade_id');\n const price = this.safeString (trade, 'price');\n const amount = this.safeString2 (trade, 'quantity', 'base_volume');\n const cost = this.safeString (trade, 'quote_volume');\n const takerOrMaker = this.safeString (trade, 'isCurrentSide');\n let timestamp = this.safeString (trade, 'timestamp');\n if (takerOrMaker !== undefined) {\n timestamp = Precise.stringMul (timestamp, '1000');\n }\n // the exchange returns the side of the taker\n let side = this.safeString2 (trade, 'side', 'type');\n let feeInfo = undefined;\n let order = undefined;\n if (takerOrMaker === 'maker') {\n if (side === 'sell') {\n side = 'buy';\n } else if (side === 'buy') {\n side = 'sell';\n }\n order = this.safeString (trade, 'makerOrderId');\n feeInfo = this.safeValue (trade, 'feeMaker', {});\n } else if (takerOrMaker === 'taker') {\n order = this.safeString (trade, 'takerOrderId');\n feeInfo = this.safeValue (trade, 'feeTaker', {});\n }\n const feeCurrencyId = this.safeString (feeInfo, 'symbol');\n const feeCost = this.safeString (feeInfo, 'amount');\n const fee = {\n 'currency': this.safeCurrencyCode (feeCurrencyId),\n 'cost': feeCost,\n };\n const intTs = this.parseToInt (timestamp);\n return this.safeTrade ({\n 'id': id,\n 'order': order,\n 'timestamp': intTs,\n 'datetime': this.iso8601 (intTs),\n 'symbol': symbol,\n 'type': undefined,\n 'side': side,\n 'takerOrMaker': takerOrMaker,\n 'price': price,\n 'amount': amount,\n 'cost': cost,\n 'fee': fee,\n 'info': trade,\n }, market);\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"id\": 1329229,\n \"orderId\": null,\n \"transactionCoreId\": \"561418\",\n \"userId\": 21639,\n \"recipient\": \"0x7d6a797f2406e06b2f9b41d067df324affa315dd\",\n \"sender\": null,\n \"symbolId\": 3,\n \"CommissionId\": null,\n \"amount\": \"100000000\",\n \"params\": {\n \"tx_id\": \"0x2253823c828d838acd983fe6a348fb0e034efe3874b081871d8b80da76ec758b\"\n },\n \"reason\": null,\n \"timestamp\": 1700594180417,\n \"status\": \"success\",\n \"statusDescription\": null,\n \"type\": \"deposit\",\n \"message\": null,\n \"blockChain\": \"Ethereum\",\n \"before\": 0,\n \"after\": 100000000,\n \"currency\": {\n \"symbol\": \"usdt\",\n \"decimals\": 6,\n \"blockChain\": \"\",\n \"links\": [\n {\n \"tx\": \"https://etherscan.io/tx/\",\n \"address\": \"https://etherscan.io/address/\",\n \"blockChain\": \"Ethereum\"\n },\n {\n \"tx\": \"https://tronscan.org/#/transaction/\",\n \"address\": \"https://tronscan.org/#/address/\",\n \"blockChain\": \"Tron\"\n },\n {\n \"tx\": \"https://bscscan.com/tx/\",\n \"address\": \"https://bscscan.com/address/\",\n \"blockChain\": \"Binance\"\n }\n ]\n }\n }" ], "line_end" => 2373, "line_start" => 2284, "mappings" => [ %{ "comment" => nil, "key" => "info", "value" => "transaction" }, %{ "comment" => nil, "key" => "id", "value" => "id" }, %{ "comment" => nil, "key" => "txid", "value" => "txid" }, %{ "comment" => nil, "key" => "timestamp", "value" => "timestamp" }, %{ "comment" => nil, "key" => "datetime", "value" => "this.iso8601 (timestamp)" }, %{ "comment" => nil, "key" => "network", "value" => "this.networkIdToCode (networkId)" }, %{ "comment" => nil, "key" => "addressFrom", "value" => "addressFrom" }, %{ "comment" => nil, "key" => "address", "value" => "undefined" }, %{ "comment" => nil, "key" => "addressTo", "value" => "addressTo" }, %{ "comment" => nil, "key" => "tagFrom", "value" => "undefined" }, %{ "comment" => nil, "key" => "tag", "value" => "tag" }, %{ "comment" => nil, "key" => "tagTo", "value" => "undefined" }, %{ "comment" => nil, "key" => "type", "value" => "type" }, %{ "comment" => nil, "key" => "amount", "value" => "this.parseNumber (amount)" }, %{ "comment" => nil, "key" => "currency", "value" => "code" }, %{ "comment" => nil, "key" => "status", "value" => "status" }, %{ "comment" => nil, "key" => "updated", "value" => "undefined" }, %{ "comment" => nil, "key" => "fee", "value" => "undefined" }, %{ "comment" => nil, "key" => "comment", "value" => "this.safeString (transaction, 'description')" }, %{ "comment" => nil, "key" => "internal", "value" => "false" } ], "name" => "parseTransaction", "signature" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction", "source" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction {\n //\n // {\n // \"id\": 1329229,\n // \"orderId\": null,\n // \"transactionCoreId\": \"561418\",\n // \"userId\": 21639,\n // \"recipient\": \"0x7d6a797f2406e06b2f9b41d067df324affa315dd\",\n // \"sender\": null,\n // \"symbolId\": 3,\n // \"CommissionId\": null,\n // \"amount\": \"100000000\",\n // \"params\": {\n // \"tx_id\": \"0x2253823c828d838acd983fe6a348fb0e034efe3874b081871d8b80da76ec758b\"\n // },\n // \"reason\": null,\n // \"timestamp\": 1700594180417,\n // \"status\": \"success\",\n // \"statusDescription\": null,\n // \"type\": \"deposit\",\n // \"message\": null,\n // \"blockChain\": \"Ethereum\",\n // \"before\": 0,\n // \"after\": 100000000,\n // \"currency\": {\n // \"symbol\": \"usdt\",\n // \"decimals\": 6,\n // \"blockChain\": \"\",\n // \"links\": [\n // {\n // \"tx\": \"https://etherscan.io/tx/\",\n // \"address\": \"https://etherscan.io/address/\",\n // \"blockChain\": \"Ethereum\"\n // },\n // {\n // \"tx\": \"https://tronscan.org/#/transaction/\",\n // \"address\": \"https://tronscan.org/#/address/\",\n // \"blockChain\": \"Tron\"\n // },\n // {\n // \"tx\": \"https://bscscan.com/tx/\",\n // \"address\": \"https://bscscan.com/address/\",\n // \"blockChain\": \"Binance\"\n // }\n // ]\n // }\n // }\n //\n const currencyObject = this.safeValue (transaction, 'currency');\n const currencyId = this.safeString (currencyObject, 'symbol');\n const code = this.safeCurrencyCode (currencyId, currency);\n const id = this.safeString (transaction, 'id');\n const params = this.safeValue (transaction, 'params');\n const txid = this.safeString (params, 'tx_id');\n const timestamp = this.safeInteger (transaction, 'timestamp');\n let networkId = this.safeString (transaction, 'blockChain');\n if (networkId === undefined) {\n const links = this.safeValue (currencyObject, 'links', []);\n const blockChain = this.safeValue (links, 0, {});\n networkId = this.safeString (blockChain, 'blockChain');\n }\n const addressFrom = this.safeString (transaction, 'sender');\n const addressTo = this.safeString (transaction, 'recipient');\n const tag = this.safeString (transaction, 'message');\n const type = this.parseTransactionType (this.safeString (transaction, 'type'));\n const amount = this.parseValueToPricision (transaction, 'amount', currencyObject, 'decimals');\n const status = this.parseTransactionStatus (this.safeValue (transaction, 'status'));\n return {\n 'info': transaction,\n 'id': id,\n 'txid': txid,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'network': this.networkIdToCode (networkId),\n 'addressFrom': addressFrom,\n 'address': undefined,\n 'addressTo': addressTo,\n 'tagFrom': undefined,\n 'tag': tag,\n 'tagTo': undefined,\n 'type': type,\n 'amount': this.parseNumber (amount),\n 'currency': code,\n 'status': status,\n 'updated': undefined,\n 'fee': undefined,\n 'comment': this.safeString (transaction, 'description'),\n 'internal': false,\n };\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 2389, "line_start" => 2383, "mappings" => [], "name" => "parseTransactionStatus", "signature" => "parseTransactionStatus (status: Str)", "source" => "parseTransactionStatus (status: Str) {\n const statuses: Dict = {\n 'approving': 'pending',\n 'success': 'ok',\n };\n return this.safeString (statuses, status, status);\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 2381, "line_start" => 2375, "mappings" => [], "name" => "parseTransactionType", "signature" => "parseTransactionType (type)", "source" => "parseTransactionType (type) {\n const types: Dict = {\n 'deposit': 'deposit',\n 'withdraw': 'withdrawal',\n };\n return this.safeString (types, type, type);\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 1388, "line_start" => 1380, "mappings" => [], "name" => "parseValueToPricision", "signature" => "parseValueToPricision (valueObject, valueKey, preciseObject, precisionKey)", "source" => "parseValueToPricision (valueObject, valueKey, preciseObject, precisionKey) {\n const valueRawString = this.safeString (valueObject, valueKey);\n const precisionRawString = this.safeString (preciseObject, precisionKey);\n if (valueRawString === undefined || precisionRawString === undefined) {\n return undefined;\n }\n const precisionString = this.parsePrecision (precisionRawString);\n return Precise.stringMul (valueRawString, precisionString);\n }" } ], path_prefix: "", pro: false, quote_json_numbers: nil, rate_limits: %{ interval_ms: 1, period: 1000, requests: 1000, rolling_window_size: 60000 }, raw_endpoints: %{ private: [ %{ auth: false, cost: 1, method: :get, path: "/trade/api/ccxt/balance" }, %{ auth: false, cost: 1, method: :get, path: "/trade/api/ccxt/order/{id}" }, %{ auth: false, cost: 1, method: :get, path: "/trade/api/ccxt/ordersOfUser" }, %{ auth: false, cost: 1, method: :get, path: "/trade/api/ccxt/tradesOfUser" }, %{ auth: false, cost: 1, method: :get, path: "/trade/api/transactionsOfUser" }, %{ auth: false, cost: 1, method: :post, path: "/trade/api/ccxt/cancel-all-order" }, %{ auth: false, cost: 1, method: :post, path: "/trade/api/ccxt/cancelorder" }, %{ auth: false, cost: 1, method: :post, path: "/trade/api/ccxt/ordercreate" } ], public: [ %{ auth: false, cost: 1, method: :get, path: "/trade/api/asset" }, %{ auth: false, cost: 1, method: :get, path: "/trade/api/ccxt/pairs" }, %{ auth: false, cost: 1, method: :get, path: "/trade/api/cmc/assets" }, %{ auth: false, cost: 1, method: :get, path: "/trade/api/cmc/orderbook/{pair}" }, %{ auth: false, cost: 1, method: :get, path: "/trade/api/cmc/summary" }, %{ auth: false, cost: 1, method: :get, path: "/trade/api/cmc/ticker" }, %{ auth: false, cost: 1, method: :get, path: "/trade/api/cmc/trades/{pair}" }, %{ auth: false, cost: 1, method: :get, path: "/trade/api/currencies" }, %{ auth: false, cost: 1, method: :get, path: "/trade/api/orderbooks/{symbol}" }, %{ auth: false, cost: 1, method: :get, path: "/trade/api/orders" }, %{ auth: false, cost: 1, method: :get, path: "/trade/api/pair/{name}" }, %{ auth: false, cost: 1, method: :get, path: "/trade/api/pairs" }, %{ auth: false, cost: 1, method: :get, path: "/trade/api/pairs/precisions" }, %{ auth: false, cost: 1, method: :get, path: "/trade/api/rates" }, %{ auth: false, cost: 1, method: :get, path: "/trade/api/trade/{id}" }, %{ auth: false, cost: 1, method: :get, path: "/trade/api/trades" } ] }, required_credentials: %{ api_key: true, password: false, secret: true, uid: false }, requires_eddsa: false, response_error: nil, signing: %{ confidence: :medium, pattern: :hmac_sha256_headers }, spec_format_version: 1, 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-6 }, spot: %{ base: "BNB", base_id: "bnb", case: :lower, contract: false, id: "bnb_rub", limits: %{ "amount" => %{}, "cost" => %{}, "leverage" => %{}, "price" => %{} }, precision: %{ "amount" => 1.0e-8, "price" => 1.0e-6 }, quote: "RUB", quote_id: "rub", separator: "_", symbol: "BNB/RUB" } }, symbol_patterns: %{ spot: %{ case: :lower, component_order: nil, date_format: nil, pattern: :underscore_lower, separator: "_", suffix: nil } }, timeframes: %{ "15m" => "15", "1d" => "1D", "1h" => "60", "1m" => "1", "5m" => "5" }, url_strategy: %{ detected_from: "fallback", pattern: :no_prefix, prefix: nil }, urls: %{ api: "https://bit.team", api_sections: %{ "history" => "https://history.bit.team", "private" => "https://bit.team", "public" => "https://bit.team" }, doc: [ "https://bit.team/trade/api/documentation" ], other: nil, sandbox: nil, www: "https://bit.team/" }, version: "v2.0.6", ws: nil }