# Bithumb Exchange Specification # # Auto-generated by: mix ccxt.extract bithumb # 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: :pro, comment: nil, countries: [ "KR" ], currencies: %{}, currency_aliases: %{ "ALT" => "ArchLoot", "BCHSV" => "BSV", "FTC" => "FTC2", "SOC" => "Soda Coin", "XBT" => "BTC" }, dex: false, enable_rate_limit: true, endpoint_extraction_stats: %{ "capturedMethods" => 15, "coveragePercent" => 100, "enabledMethods" => 16, "excluded" => [ %{ "method" => "editOrder", "reason" => "emulated (returns cached data, no HTTP call)" } ], "excludedMethods" => 1, "extractableMethods" => 15, "failures" => [] }, endpoints: [ %{ api_section: "private", auth: true, cost: 1, default_params: %{ "order_currency" => "BTC", "payment_currency" => "USDT", "type" => "bid" }, market_type: :spot, method: :post, name: :cancel_order, param_mappings: %{ "id" => "order_id" }, params: [ :id, :symbol ], path: "/trade/cancel", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ "payment_currency" => "USDT", "type" => "bid" }, market_type: :spot, method: :post, name: :create_limit_order, param_mappings: %{ "amount" => "units", "symbol" => "order_currency" }, params: [ :symbol, :side, :amount, :price ], path: "/trade/place", response_transformer: {:extract_path, ["order_id"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ "payment_currency" => "USDT" }, market_type: :spot, method: :post, name: :create_market_order, param_mappings: %{ "amount" => "units", "symbol" => "order_currency" }, params: [ :symbol, :side, :amount, :price ], path: "/trade/market_buy", response_transformer: {:extract_path, ["order_id"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ "payment_currency" => "USDT", "type" => "bid" }, market_type: :spot, method: :post, name: :create_order, param_mappings: %{ "amount" => "units", "symbol" => "order_currency" }, params: [ :symbol, :type, :side, :amount, :price ], path: "/trade/place", response_transformer: {:extract_path, ["order_id"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ "currency" => "ALL" }, market_type: :spot, method: :post, name: :fetch_balance, param_mappings: %{}, params: [], path: "/info/balance", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, default_params: %{ "baseId" => "BTC", "quoteId" => "USDT" }, market_type: :spot, method: :get, name: :fetch_l2_order_book, param_mappings: %{}, params: [ :symbol, :limit ], path: "/orderbook/{baseId}_{quoteId}", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, default_params: %{ "quoteId" => "BTC" }, market_type: :spot, method: :get, name: :fetch_markets, param_mappings: %{}, params: [], path: "/ticker/ALL_{quoteId}", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, default_params: %{ "baseId" => "BTC", "quoteId" => "USDT" }, market_type: :spot, method: :get, name: :fetch_ohlcv, param_mappings: %{ "timeframe" => "interval" }, params: [ :symbol, :timeframe, :since, :limit ], path: "/candlestick/{baseId}_{quoteId}/{interval}", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ "count" => 100, "order_currency" => "BTC", "payment_currency" => "USDT" }, market_type: :spot, method: :post, name: :fetch_open_orders, param_mappings: %{}, params: [ :symbol, :since, :limit ], path: "/info/orders", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ "count" => 1, "order_currency" => "BTC", "payment_currency" => "USDT" }, market_type: :spot, method: :post, name: :fetch_order, param_mappings: %{ "id" => "order_id" }, params: [ :id, :symbol ], path: "/info/order_detail", response_transformer: {:extract_path_unwrap, ["data"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, default_params: %{ "baseId" => "BTC", "quoteId" => "USDT" }, market_type: :spot, method: :get, name: :fetch_order_book, param_mappings: %{ "limit" => "count" }, params: [ :symbol, :limit ], path: "/orderbook/{baseId}_{quoteId}", response_transformer: {:extract_path_unwrap, ["data"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, default_params: %{ "baseId" => "BTC", "quoteId" => "USDT" }, market_type: :spot, method: :get, name: :fetch_ticker, param_mappings: %{}, params: [ :symbol ], path: "/ticker/{baseId}_{quoteId}", response_transformer: {:extract_path_unwrap, ["data"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, default_params: %{ "quoteId" => "BTC" }, market_type: :spot, method: :get, name: :fetch_tickers, param_mappings: %{}, params: [ :symbols ], path: "/ticker/ALL_{quoteId}", response_transformer: {:extract_path, ["data", "date"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, default_params: %{ "baseId" => "BTC", "quoteId" => "USDT" }, market_type: :spot, method: :get, name: :fetch_trades, param_mappings: %{ "limit" => "count" }, params: [ :symbol, :since, :limit ], path: "/transaction_history/{baseId}_{quoteId}", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, market_type: :spot, method: :post, name: :withdraw, param_mappings: %{ "amount" => "units", "code" => "currency" }, params: [ :code, :amount, :address, :tag ], path: "/trade/btc_withdrawal", response_transformer: {:extract_path, ["data"]}, source: :intercepted } ], error_code_details: %{ 5600 => %{ description: nil, type: :exchange_error }, "After May 23th, recent_transactions is no longer, hence users will not be able to connect to recent_transactions" => %{ description: "After May 23th, recent_transactions is no longer, hence users will not be able to connect to recent_transactions", type: :exchange_error }, "Bad Request(Bad Method)" => %{ description: nil, type: :invalid_parameters }, "Bad Request(SSL)" => %{ description: nil, type: :invalid_parameters }, "Bad Request.(Auth Data)" => %{ description: "Bad Request.(Auth Data)", type: :invalid_credentials }, "Database Fail" => %{ description: nil, type: :network_error }, "Invalid Apikey" => %{ description: "Invalid Apikey", type: :invalid_credentials }, "Invalid Parameter" => %{ description: nil, type: :invalid_parameters }, "Method Not Allowed.(Access IP)" => %{ description: nil, type: :access_restricted }, "Method Not Allowed.(Access)" => %{ description: nil, type: :access_restricted }, "Method Not Allowed.(BTC Adress)" => %{ description: nil, type: :invalid_parameters }, "Not Member" => %{ description: nil, type: :invalid_credentials }, "Unknown Error" => %{ description: nil, type: :exchange_error } }, error_codes: %{ 5600 => :exchange_error, "After May 23th, recent_transactions is no longer, hence users will not be able to connect to recent_transactions" => :exchange_error, "Bad Request(Bad Method)" => :invalid_parameters, "Bad Request(SSL)" => :invalid_parameters, "Bad Request.(Auth Data)" => :invalid_credentials, "Database Fail" => :network_error, "Invalid Apikey" => :invalid_credentials, "Invalid Parameter" => :invalid_parameters, "Method Not Allowed.(Access IP)" => :access_restricted, "Method Not Allowed.(Access)" => :access_restricted, "Method Not Allowed.(BTC Adress)" => :invalid_parameters, "Not Member" => :invalid_credentials, "Unknown Error" => :exchange_error }, exceptions: nil, exchange_options: %{ "defaultNetworkCodeReplacements" => %{ "BRC20" => %{ "BRC20" => "BTC" }, "CRO" => %{ "CRC20" => "CRONOS" }, "ETH" => %{ "ERC20" => "ETH" }, "TRX" => %{ "TRC20" => "TRX" } }, "networksById" => %{}, "quoteCurrencies" => %{ "BTC" => %{ "limits" => %{ "cost" => %{ "max" => 100, "min" => 0.0002 } } }, "KRW" => %{ "limits" => %{ "cost" => %{ "max" => 5000000000, "min" => 500 } } }, "USDT" => %{ "limits" => %{ "cost" => %{} } } } }, extended_metadata: %{ fees_url: "https://en.bithumb.com/customer_support/info_fee", limits: %{ "amount" => %{}, "cost" => %{}, "leverage" => %{}, "price" => %{} }, logo_url: "https://github.com/user-attachments/assets/c9e0eefb-4777-46b9-8f09-9d7f7c4af82d" }, 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_direction: false, trigger_price: false }, fetch_ohlcv: %{ limit: 1000 }, fetch_open_orders: %{ limit: 1000, margin_mode: false, symbol_required: true, trailing: false, trigger: false }, fetch_order: %{ margin_mode: false, symbol_required: true, trailing: false, trigger: false }, sandbox: false }, swap: %{} }, fees: %{ trading: %{ maker: 0.0025, taker: 0.0025 } }, handle_content_type_application_zip: nil, handle_errors_source: "handleErrors(httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody) {\n if (response === undefined) {\n return undefined; // fallback to default error handler\n }\n if ('status' in response) {\n //\n // {\"status\":\"5100\",\"message\":\"After May 23th, recent_transactions is no longer, hence users will not be able to connect to recent_transactions\"}\n //\n const status = this.safeString(response, 'status');\n const message = this.safeString(response, 'message');\n if (status !== undefined) {\n if (status === '0000') {\n return undefined; // no error\n }\n else if (message === '거래 진행중인 내역이 존재하지 않습니다.') {\n // https://github.com/ccxt/ccxt/issues/9017\n return undefined; // no error\n }\n const feedback = this.id + ' ' + message;\n this.throwExactlyMatchedException(this.exceptions, status, feedback);\n this.throwExactlyMatchedException(this.exceptions, message, feedback);\n throw new errors.ExchangeError(feedback);\n }\n }\n return undefined;\n }", has: %{ add_margin: false, borrow_cross_margin: false, borrow_isolated_margin: false, borrow_margin: false, c_o_r_s: true, 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_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: false, fetch_closed_order: false, fetch_closed_orders: false, 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: 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: 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_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: false, 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: false, 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: 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: 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: true, 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: true, watch_order_book_for_symbols: false, watch_orders: true, watch_orders_for_symbols: false, watch_position: false, watch_positions: false, watch_status: false, watch_ticker: true, watch_tickers: true, watch_trades: true, watch_trades_for_symbols: false, withdraw: true, ws: false }, http_config: nil, id: "bithumb", markets: nil, name: "Bithumb", ohlcv_timestamp_resolution: :unknown, options: %{ quote_currencies: %{ "BTC" => %{ "limits" => %{ "cost" => %{ "max" => 100, "min" => 0.0002 } } }, "KRW" => %{ "limits" => %{ "cost" => %{ "max" => 5000000000, "min" => 500 } } }, "USDT" => %{ "limits" => %{ "cost" => %{} } } } }, order_mappings: nil, param_mappings: %{ "amount" => "units", "code" => "currency", "id" => "order_id", "limit" => "count", "symbol" => "order_currency", "timeframe" => "interval" }, parse_methods: [ %{ "comment" => nil, "examples" => [], "line_end" => 443, "line_start" => 428, "mappings" => [], "name" => "parseBalance", "signature" => "parseBalance (response): Balances", "source" => "parseBalance (response): Balances {\n const result: Dict = { 'info': response };\n const balances = this.safeDict (response, 'data');\n const codes = Object.keys (this.currencies);\n for (let i = 0; i < codes.length; i++) {\n const code = codes[i];\n const account = this.account ();\n const currency = this.currency (code);\n const lowerCurrencyId = this.safeStringLower (currency, 'id');\n account['total'] = this.safeString (balances, 'total_' + lowerCurrencyId);\n account['used'] = this.safeString (balances, 'in_use_' + lowerCurrencyId);\n account['free'] = this.safeString (balances, 'available_' + lowerCurrencyId);\n result[code] = account;\n }\n return this.safeBalance (result);\n }" }, %{ "comment" => nil, "examples" => [ "[\n 1576823400000, // 기준 시간\n \"8284000\", // 시가\n \"8286000\", // 종가\n \"8289000\", // 고가\n \"8276000\", // 저가\n \"15.41503692\" // 거래량\n ]" ], "line_end" => 679, "line_start" => 660, "mappings" => [], "name" => "parseOHLCV", "signature" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV", "source" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV {\n //\n // [\n // 1576823400000, // 기준 시간\n // \"8284000\", // 시가\n // \"8286000\", // 종가\n // \"8289000\", // 고가\n // \"8276000\", // 저가\n // \"15.41503692\" // 거래량\n // ]\n //\n return [\n this.safeInteger (ohlcv, 0),\n this.safeNumber (ohlcv, 1),\n this.safeNumber (ohlcv, 3),\n this.safeNumber (ohlcv, 4),\n this.safeNumber (ohlcv, 2),\n this.safeNumber (ohlcv, 5),\n ];\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"transaction_date\": \"1572497603668315\",\n \"type\": \"bid\",\n \"order_status\": \"Completed\", // Completed, Cancel ...\n \"order_currency\": \"BTC\",\n \"payment_currency\": \"KRW\",\n \"watch_price\": \"0\", // present in Cancel order\n \"order_price\": \"8601000\",\n \"order_qty\": \"0.007\",\n \"cancel_date\": \"\", // filled in Cancel order\n \"cancel_type\": \"\", // filled in Cancel order, i.e. 사용자취소\n \"contract\": [\n {\n \"transaction_date\": \"1572497603902030\",\n \"price\": \"8601000\",\n \"units\": \"0.005\",\n \"fee_currency\": \"KRW\",\n \"fee\": \"107.51\",\n \"total\": \"43005\"\n },\n ]\n }", "{\n \"order_currency\": \"BTC\",\n \"payment_currency\": \"KRW\",\n \"order_id\": \"C0101000007408440032\",\n \"order_date\": \"1571728739360570\",\n \"type\": \"bid\",\n \"units\": \"5.0\",\n \"units_remaining\": \"5.0\",\n \"price\": \"501000\",\n }" ], "line_end" => 1050, "line_start" => 954, "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" => "undefined" }, %{ "comment" => nil, "key" => "amount", "value" => "amount" }, %{ "comment" => nil, "key" => "cost", "value" => "undefined" }, %{ "comment" => nil, "key" => "average", "value" => "undefined" }, %{ "comment" => nil, "key" => "filled", "value" => "undefined" }, %{ "comment" => nil, "key" => "remaining", "value" => "remaining" }, %{ "comment" => nil, "key" => "status", "value" => "status" }, %{ "comment" => nil, "key" => "fee", "value" => "undefined" }, %{ "comment" => nil, "key" => "trades", "value" => "rawTrades" } ], "name" => "parseOrder", "signature" => "parseOrder (order: Dict, market: Market = undefined): Order", "source" => "parseOrder (order: Dict, market: Market = undefined): Order {\n //\n //\n // fetchOrder\n //\n // {\n // \"transaction_date\": \"1572497603668315\",\n // \"type\": \"bid\",\n // \"order_status\": \"Completed\", // Completed, Cancel ...\n // \"order_currency\": \"BTC\",\n // \"payment_currency\": \"KRW\",\n // \"watch_price\": \"0\", // present in Cancel order\n // \"order_price\": \"8601000\",\n // \"order_qty\": \"0.007\",\n // \"cancel_date\": \"\", // filled in Cancel order\n // \"cancel_type\": \"\", // filled in Cancel order, i.e. 사용자취소\n // \"contract\": [\n // {\n // \"transaction_date\": \"1572497603902030\",\n // \"price\": \"8601000\",\n // \"units\": \"0.005\",\n // \"fee_currency\": \"KRW\",\n // \"fee\": \"107.51\",\n // \"total\": \"43005\"\n // },\n // ]\n // }\n //\n // fetchOpenOrders\n //\n // {\n // \"order_currency\": \"BTC\",\n // \"payment_currency\": \"KRW\",\n // \"order_id\": \"C0101000007408440032\",\n // \"order_date\": \"1571728739360570\",\n // \"type\": \"bid\",\n // \"units\": \"5.0\",\n // \"units_remaining\": \"5.0\",\n // \"price\": \"501000\",\n // }\n //\n const timestamp = this.safeIntegerProduct (order, 'order_date', 0.001);\n const sideProperty = this.safeString2 (order, 'type', 'side');\n const side = (sideProperty === 'bid') ? 'buy' : 'sell';\n const status = this.parseOrderStatus (this.safeString (order, 'order_status'));\n const price = this.safeString2 (order, 'order_price', 'price');\n let type = 'limit';\n if (Precise.stringEquals (price, '0')) {\n type = 'market';\n }\n const amount = this.fixCommaNumber (this.safeString2 (order, 'order_qty', 'units'));\n let remaining = this.fixCommaNumber (this.safeString (order, 'units_remaining'));\n if (remaining === undefined) {\n if (status === 'closed') {\n remaining = '0';\n } else if (status !== 'canceled') {\n remaining = amount;\n }\n }\n let symbol = undefined;\n const baseId = this.safeString (order, 'order_currency');\n const quoteId = this.safeString (order, 'payment_currency');\n const base = this.safeCurrencyCode (baseId);\n const quote = this.safeCurrencyCode (quoteId);\n if ((base !== undefined) && (quote !== undefined)) {\n symbol = base + '/' + quote;\n }\n if (symbol === undefined) {\n market = this.safeMarket (undefined, market);\n symbol = market['symbol'];\n }\n const id = this.safeString (order, 'order_id');\n const rawTrades = this.safeList (order, 'contract', []);\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': undefined,\n 'amount': amount,\n 'cost': undefined,\n 'average': undefined,\n 'filled': undefined,\n 'remaining': remaining,\n 'status': status,\n 'fee': undefined,\n 'trades': rawTrades,\n }, market);\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 952, "line_start" => 945, "mappings" => [], "name" => "parseOrderStatus", "signature" => "parseOrderStatus (status: Str)", "source" => "parseOrderStatus (status: Str) {\n const statuses: Dict = {\n 'Pending': 'open',\n 'Completed': 'closed',\n 'Cancel': 'canceled',\n };\n return this.safeString (statuses, status, status);\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"opening_price\":\"227100\",\n \"closing_price\":\"228400\",\n \"min_price\":\"222300\",\n \"max_price\":\"230000\",\n \"units_traded\":\"82618.56075337\",\n \"acc_trade_value\":\"18767376138.6031\",\n \"prev_closing_price\":\"227100\",\n \"units_traded_24H\":\"151871.13484676\",\n \"acc_trade_value_24H\":\"34247610416.8974\",\n \"fluctate_24H\":\"8700\",\n \"fluctate_rate_24H\":\"3.96\",\n \"date\":\"1587710327264\", // fetchTickers inject this\n }" ], "line_end" => 555, "line_start" => 508, "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" => "this.safeString (ticker, 'max_price')" }, %{ "comment" => nil, "key" => "low", "value" => "this.safeString (ticker, 'min_price')" }, %{ "comment" => nil, "key" => "bid", "value" => "this.safeString (ticker, 'buy_price')" }, %{ "comment" => nil, "key" => "bidVolume", "value" => "undefined" }, %{ "comment" => nil, "key" => "ask", "value" => "this.safeString (ticker, 'sell_price')" }, %{ "comment" => nil, "key" => "askVolume", "value" => "undefined" }, %{ "comment" => nil, "key" => "vwap", "value" => "undefined" }, %{ "comment" => nil, "key" => "open", "value" => "open" }, %{ "comment" => nil, "key" => "close", "value" => "close" }, %{ "comment" => nil, "key" => "last", "value" => "close" }, %{ "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 // fetchTicker, fetchTickers\n //\n // {\n // \"opening_price\":\"227100\",\n // \"closing_price\":\"228400\",\n // \"min_price\":\"222300\",\n // \"max_price\":\"230000\",\n // \"units_traded\":\"82618.56075337\",\n // \"acc_trade_value\":\"18767376138.6031\",\n // \"prev_closing_price\":\"227100\",\n // \"units_traded_24H\":\"151871.13484676\",\n // \"acc_trade_value_24H\":\"34247610416.8974\",\n // \"fluctate_24H\":\"8700\",\n // \"fluctate_rate_24H\":\"3.96\",\n // \"date\":\"1587710327264\", // fetchTickers inject this\n // }\n //\n const timestamp = this.safeInteger (ticker, 'date');\n const symbol = this.safeSymbol (undefined, market);\n const open = this.safeString (ticker, 'opening_price');\n const close = this.safeString (ticker, 'closing_price');\n const baseVolume = this.safeString (ticker, 'units_traded_24H');\n const quoteVolume = this.safeString (ticker, 'acc_trade_value_24H');\n return this.safeTicker ({\n 'symbol': symbol,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'high': this.safeString (ticker, 'max_price'),\n 'low': this.safeString (ticker, 'min_price'),\n 'bid': this.safeString (ticker, 'buy_price'),\n 'bidVolume': undefined,\n 'ask': this.safeString (ticker, 'sell_price'),\n 'askVolume': undefined,\n 'vwap': undefined,\n 'open': open,\n 'close': close,\n 'last': close,\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" => [ "{\n \"transaction_date\":\"2020-04-23 22:21:46\",\n \"type\":\"ask\",\n \"units_traded\":\"0.0125\",\n \"price\":\"8667000\",\n \"total\":\"108337\"\n }", "{\n \"transaction_date\": \"1572497603902030\",\n \"price\": \"8601000\",\n \"units\": \"0.005\",\n \"fee_currency\": \"KRW\",\n \"fee\": \"107.51\",\n \"total\": \"43005\"\n }" ], "line_end" => 805, "line_start" => 729, "mappings" => [ %{ "comment" => nil, "key" => "id", "value" => "id" }, %{ "comment" => nil, "key" => "info", "value" => "trade" }, %{ "comment" => nil, "key" => "timestamp", "value" => "timestamp" }, %{ "comment" => nil, "key" => "datetime", "value" => "this.iso8601 (timestamp)" }, %{ "comment" => nil, "key" => "symbol", "value" => "market['symbol']" }, %{ "comment" => nil, "key" => "order", "value" => "undefined" }, %{ "comment" => nil, "key" => "type", "value" => "type" }, %{ "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" => "costString" }, %{ "comment" => nil, "key" => "fee", "value" => "fee" }, %{ "comment" => nil, "key" => "cost", "value" => "feeCostString" }, %{ "comment" => nil, "key" => "currency", "value" => "feeCurrencyCode" } ], "name" => "parseTrade", "signature" => "parseTrade (trade: Dict, market: Market = undefined): Trade", "source" => "parseTrade (trade: Dict, market: Market = undefined): Trade {\n //\n // fetchTrades (public)\n //\n // {\n // \"transaction_date\":\"2020-04-23 22:21:46\",\n // \"type\":\"ask\",\n // \"units_traded\":\"0.0125\",\n // \"price\":\"8667000\",\n // \"total\":\"108337\"\n // }\n //\n // fetchOrder (private)\n //\n // {\n // \"transaction_date\": \"1572497603902030\",\n // \"price\": \"8601000\",\n // \"units\": \"0.005\",\n // \"fee_currency\": \"KRW\",\n // \"fee\": \"107.51\",\n // \"total\": \"43005\"\n // }\n //\n // a workaround for their bug in date format, hours are not 0-padded\n let timestamp = undefined;\n const transactionDatetime = this.safeString (trade, 'transaction_date');\n if (transactionDatetime !== undefined) {\n const parts = transactionDatetime.split (' ');\n const numParts = parts.length;\n if (numParts > 1) {\n const transactionDate = parts[0];\n let transactionTime = parts[1];\n if (transactionTime.length < 8) {\n transactionTime = '0' + transactionTime;\n }\n timestamp = this.parse8601 (transactionDate + ' ' + transactionTime);\n } else {\n timestamp = this.safeIntegerProduct (trade, 'transaction_date', 0.001);\n }\n }\n if (timestamp !== undefined) {\n timestamp -= 9 * 3600000; // they report UTC + 9 hours, server in Korean timezone\n }\n const type = undefined;\n let side = this.safeString (trade, 'type');\n side = (side === 'ask') ? 'sell' : 'buy';\n const id = this.safeString (trade, 'cont_no');\n market = this.safeMarket (undefined, market);\n const priceString = this.safeString (trade, 'price');\n const amountString = this.fixCommaNumber (this.safeString2 (trade, 'units_traded', 'units'));\n const costString = this.safeString (trade, 'total');\n let fee = undefined;\n const feeCostString = this.safeString (trade, 'fee');\n if (feeCostString !== undefined) {\n const feeCurrencyId = this.safeString (trade, 'fee_currency');\n const feeCurrencyCode = this.commonCurrencyCode (feeCurrencyId);\n fee = {\n 'cost': feeCostString,\n 'currency': feeCurrencyCode,\n };\n }\n return this.safeTrade ({\n 'id': id,\n 'info': trade,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'symbol': market['symbol'],\n 'order': undefined,\n 'type': type,\n 'side': side,\n 'takerOrMaker': undefined,\n 'price': priceString,\n 'amount': amountString,\n 'cost': costString,\n 'fee': fee,\n }, market);\n }" }, %{ "comment" => nil, "examples" => [ "{ \"status\" : \"0000\"}" ], "line_end" => 1214, "line_start" => 1185, "mappings" => [ %{ "comment" => nil, "key" => "id", "value" => "undefined" }, %{ "comment" => nil, "key" => "txid", "value" => "undefined" }, %{ "comment" => nil, "key" => "timestamp", "value" => "undefined" }, %{ "comment" => nil, "key" => "datetime", "value" => "undefined" }, %{ "comment" => nil, "key" => "network", "value" => "undefined" }, %{ "comment" => nil, "key" => "addressFrom", "value" => "undefined" }, %{ "comment" => nil, "key" => "address", "value" => "undefined" }, %{ "comment" => nil, "key" => "addressTo", "value" => "undefined" }, %{ "comment" => nil, "key" => "amount", "value" => "undefined" }, %{ "comment" => nil, "key" => "type", "value" => "undefined" }, %{ "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" => "undefined" }, %{ "comment" => nil, "key" => "info", "value" => "transaction" } ], "name" => "parseTransaction", "signature" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction", "source" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction {\n //\n // withdraw\n //\n // { \"status\" : \"0000\"}\n //\n currency = this.safeCurrency (undefined, currency);\n return {\n 'id': undefined,\n 'txid': undefined,\n 'timestamp': undefined,\n 'datetime': undefined,\n 'network': undefined,\n 'addressFrom': undefined,\n 'address': undefined,\n 'addressTo': undefined,\n 'amount': undefined,\n 'type': undefined,\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': undefined,\n 'info': transaction,\n } as Transaction;\n }" } ], path_prefix: "", pro: true, quote_json_numbers: nil, rate_limits: %{ interval_ms: 500, period: 1000, requests: 2, rolling_window_size: 60000 }, raw_endpoints: %{ private: [], public: [] }, required_credentials: %{ api_key: true, password: false, secret: true, uid: false }, requires_eddsa: false, response_error: nil, signing: %{ api_key_header: "Api-Key", confidence: :medium, nonce_header: "Api-Nonce", pattern: :hmac_sha512_nonce, signature_header: "Api-Sign" }, spec_format_version: 1, status: %{ "eta" => nil, "status" => "ok", "updated" => nil, "url" => nil }, symbol_format: nil, symbol_formats: %{ precision_mode: 3, sample_limits: %{ "amount" => %{}, "cost" => %{ "max" => 100, "min" => 0.0002 }, "price" => %{} }, sample_precision: %{ "amount" => 4, "price" => 4 }, spot: %{ base: "ETH", base_id: "ETH", case: :upper, contract: false, id: "ETH", limits: %{ "amount" => %{}, "cost" => %{ "max" => 100, "min" => 0.0002 }, "leverage" => %{}, "price" => %{} }, maker: 0.0025, precision: %{ "amount" => 4, "price" => 4 }, quote: "BTC", quote_id: "BTC", separator: "", symbol: "ETH/BTC", taker: 0.0025 } }, symbol_patterns: %{ spot: %{ case: :upper, component_order: nil, date_format: nil, pattern: :no_separator_upper, separator: "", suffix: nil } }, timeframes: %{ "10m" => "10m", "12h" => "12h", "1d" => "24h", "1h" => "1h", "1m" => "1m", "30m" => "30m", "3m" => "3m", "5m" => "5m", "6h" => "6h" }, url_strategy: %{ detected_from: "fallback", pattern: :no_prefix, prefix: nil }, urls: %{ api: "https://api.bithumb.com/public", api_sections: %{ "private" => "https://api.bithumb.com", "public" => "https://api.bithumb.com/public" }, doc: "https://apidocs.bithumb.com", other: nil, sandbox: nil, www: "https://www.bithumb.com" }, version: nil, ws: %{ channel_templates: %{ watch_balance: %{ auth_required: true, market_id_format: :native, params: [], pattern: :custom }, watch_order_book: %{ market_id_format: :native, params: [ %{ "default" => nil, "name" => "limit" } ], pattern: :custom }, watch_orders: %{ auth_required: true, market_id_format: :native, params: [ %{ "default" => nil, "name" => "limit" } ], pattern: :custom }, watch_ticker: %{ market_id_format: :native, params: [ %{ "default" => "24H", "name" => "tickTypes" } ], pattern: :custom }, watch_tickers: %{ market_id_format: :native, params: [ %{ "default" => "24H", "name" => "tickTypes" } ], pattern: :custom }, watch_trades: %{ market_id_format: :native, params: [ %{ "default" => nil, "name" => "limit" } ], pattern: :custom } }, has: %{ watch_balance: true, watch_bids_asks: nil, watch_liquidations: nil, watch_liquidations_for_symbols: nil, watch_my_liquidations: nil, watch_my_liquidations_for_symbols: nil, watch_my_trades: nil, watch_ohlcv: false, watch_ohlcv_for_symbols: nil, watch_order_book: true, watch_order_book_for_symbols: nil, watch_orders: true, watch_orders_for_symbols: nil, watch_position: nil, watch_positions: nil, watch_status: nil, watch_ticker: true, watch_tickers: true, watch_trades: true, watch_trades_for_symbols: nil }, hostname: "bithumb.com", message_patterns: [ %{ element_keys: [ "ticket" ], format: :array, sources: [ :send, :watch ] }, %{ format: :type, keys: [ "symbols", "type" ], kind_field: "type", kind_value: "orderbookdepth", sources: [ :send, :watch ] }, %{ format: :type, keys: [ "symbols", "tickTypes", "type" ], kind_field: "type", kind_value: "ticker", sources: [ :send, :watch, :watch_multiple ] }, %{ format: :type, keys: [ "symbols", "type" ], kind_field: "type", kind_value: "transaction", sources: [ :send, :watch ] } ], subscription_config: %{ args_field: "symbols", args_format: :string_list, market_id_format: :native, op_field: "type" }, subscription_pattern: :custom, urls: %{ "privateV2" => "wss://ws-api.bithumb.com/websocket/v1/private", "public" => "wss://pubwss.bithumb.com/pub/ws", "publicV2" => "wss://ws-api.bithumb.com/websocket/v1" }, watch_methods: [ "watchBalance", "watchOrderBook", "watchOrders", "watchTicker", "watchTickers", "watchTrades" ] } }