# Bitstamp Exchange Specification # # Auto-generated by: mix ccxt.extract bitstamp # CCXT version: 4.5.42 # Spec format version: 2 # # Review before use: # - signing: Detected from sign() method, verify with testnet # - endpoints: Raw paths extracted, map to unified API as needed # - exceptions: Extracted (exact, broad, HTTP status codes) # - features/options: Extracted from describe() # - classification: Set to :supported initially, promote after validation # %{ api_param_requirements: nil, certified: false, classification: :pro, comment: nil, countries: [ "GB" ], currencies: %{}, currency_aliases: %{ "BCHSV" => "BSV", "UST" => "USTC", "XBT" => "BTC" }, dex: false, enable_rate_limit: true, endpoint_extraction_stats: %{ "capturedMethods" => 27, "coveragePercent" => 100, "enabledMethods" => 30, "excluded" => [ %{ "method" => "editOrder", "reason" => "emulated (returns cached data, no HTTP call)" }, %{ "method" => "fetchDepositWithdrawFee", "reason" => "emulated (returns cached data, no HTTP call)" }, %{ "method" => "fetchTransactions", "reason" => "emulated (returns cached data, no HTTP call)" } ], "excludedMethods" => 3, "extractableMethods" => 27, "failures" => [] }, endpoints: [ %{ api_section: "private", auth: true, cost: 1, expects: :list, market_type: :spot, method: :post, name: :cancel_all_orders, param_mappings: %{ "symbol" => "pair" }, params: [ :symbol ], path: "/cancel_all_orders/{pair}/", response_transformer: {:extract_path, ["canceled"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :single, market_type: :spot, method: :post, name: :cancel_order, param_mappings: %{}, params: [ :id, :symbol ], path: "/cancel_order/", source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :single, market_type: :spot, method: :post, name: :create_limit_order, param_mappings: %{ "symbol" => "pair" }, params: [ :symbol, :side, :amount, :price ], path: "/buy/{pair}/", source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :single, market_type: :spot, method: :post, name: :create_market_order, param_mappings: %{ "symbol" => "pair" }, params: [ :symbol, :side, :amount, :price ], path: "/buy/market/{pair}/", source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :single, market_type: :spot, method: :post, name: :create_order, param_mappings: %{ "symbol" => "pair" }, params: [ :symbol, :type, :side, :amount, :price ], path: "/buy/{pair}/", source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :single, market_type: :spot, method: :post, name: :fetch_balance, param_mappings: %{}, params: [], path: "/account_balances/", source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, expects: :list, market_type: :spot, method: :get, name: :fetch_currencies, param_mappings: %{}, params: [], path: "/markets/", source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :single, market_type: :spot, method: :post, name: :fetch_deposit_address, param_mappings: %{}, params: [ :code ], path: "/btc_address/", source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :list, market_type: :spot, method: :post, name: :fetch_deposit_withdraw_fees, param_mappings: %{}, params: [ :codes ], path: "/fees/withdrawal/", source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :list, market_type: :spot, method: :post, name: :fetch_deposits_withdrawals, param_mappings: %{}, params: [ :code, :since, :limit ], path: "/user_transactions/", source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, expects: :single, market_type: :spot, method: :get, name: :fetch_l2_order_book, param_mappings: %{ "symbol" => "pair" }, params: [ :symbol, :limit ], path: "/order_book/{pair}/", response_transformer: {:extract_path_unwrap, ["microtimestamp"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :list, market_type: :spot, method: :post, name: :fetch_ledger, param_mappings: %{}, params: [ :code, :since, :limit ], path: "/user_transactions/", source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, expects: :list, market_type: :spot, method: :get, name: :fetch_markets, param_mappings: %{}, params: [], path: "/markets/", source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :list, market_type: :spot, method: :post, name: :fetch_my_trades, param_mappings: %{ "symbol" => "pair" }, params: [ :symbol, :since, :limit ], path: "/user_transactions/{pair}/", source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, default_params: %{ "end" => "", "step" => "3600" }, expects: :list, market_type: :spot, method: :get, name: :fetch_ohlcv, param_mappings: %{ "since" => "start", "symbol" => "pair" }, params: [ :symbol, :timeframe, :since, :limit ], path: "/ohlc/{pair}/", response_transformer: {:extract_path, ["data", "ohlc"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :list, market_type: :spot, method: :post, name: :fetch_open_orders, param_mappings: %{}, params: [ :symbol, :since, :limit ], path: "/open_orders/all/", source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :single, market_type: :spot, method: :post, name: :fetch_order, param_mappings: %{}, params: [ :id, :symbol ], path: "/order_status/", source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, expects: :single, market_type: :spot, method: :get, name: :fetch_order_book, param_mappings: %{ "symbol" => "pair" }, params: [ :symbol, :limit ], path: "/order_book/{pair}/", response_transformer: {:extract_path_unwrap, ["microtimestamp"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, expects: :single, market_type: :spot, method: :get, name: :fetch_ticker, param_mappings: %{ "symbol" => "pair" }, params: [ :symbol ], path: "/ticker/{pair}/", source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, expects: :list, market_type: :spot, method: :get, name: :fetch_tickers, param_mappings: %{}, params: [ :symbols ], path: "/ticker/", source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, default_params: %{ "time" => "" }, expects: :list, market_type: :spot, method: :get, name: :fetch_trades, param_mappings: %{ "symbol" => "pair" }, params: [ :symbol, :since, :limit ], path: "/transactions/{pair}/", source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :single, market_type: :spot, method: :post, name: :fetch_trading_fee, param_mappings: %{ "symbol" => "market_symbol" }, params: [ :symbol ], path: "/fees/trading/", source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :list, market_type: :spot, method: :post, name: :fetch_trading_fees, param_mappings: %{}, params: [], path: "/fees/trading/", source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :list, market_type: :spot, method: :post, name: :fetch_transaction_fees, param_mappings: %{}, params: [ :codes ], path: "/fees/withdrawal/", source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ "timedelta" => 50000000 }, expects: :list, market_type: :spot, method: :post, name: :fetch_withdrawals, param_mappings: %{}, params: [ :code, :since, :limit ], path: "/withdrawal-requests/", source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :single, market_type: :spot, method: :post, name: :transfer, param_mappings: %{ "code" => "currency", "toAccount" => "subAccount" }, params: [ :code, :amount, :fromAccount, :toAccount ], path: "/transfer-from-main/", source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :single, market_type: :spot, method: :post, name: :withdraw, param_mappings: %{}, params: [ :code, :amount, :address, :tag ], path: "/btc_withdrawal/", source: :intercepted } ], error_code_details: %{ "API key not found" => %{ description: nil, type: :invalid_credentials }, "Authentication failed" => %{ description: nil, type: :invalid_credentials }, "Bitstamp.net is under scheduled maintenance. We'll be back soon." => %{ description: "{ \"error\": \"Bitstamp.net is under scheduled maintenance. We'll be back soon.\" }", type: :network_error }, "Check your account balance for details." => %{ description: "You have only 0.00100000 BTC available. Check your account balance for details.", type: :insufficient_balance }, "Ensure that there are no more than" => %{ description: "{\"status\": \"error\", \"reason\": {\"amount\": [\"Ensure that there are no more than 0 decimal places.\"], \"__all__\": [\"\"]}}", type: :invalid_order }, "Ensure this value has at least" => %{ description: "Ensure this value has at least 25 characters (it has 4).", type: :invalid_parameters }, "IP address not allowed" => %{ description: nil, type: :access_restricted }, "Invalid nonce" => %{ description: nil, type: :invalid_credentials }, "Invalid offset." => %{ description: nil, type: :invalid_parameters }, "Invalid signature" => %{ description: nil, type: :invalid_credentials }, "Minimum order size is" => %{ description: "Minimum order size is 5.0 EUR.", type: :invalid_order }, "Missing key, signature and nonce parameters" => %{ description: nil, type: :invalid_credentials }, "No permission found" => %{ description: nil, type: :access_restricted }, "Order could not be placed." => %{ description: "Order could not be placed (perhaps due to internal error or trade halt). Please retry placing order.", type: :network_error }, "Order not found." => %{ description: nil, type: :order_not_found }, "Please update your profile with your FATCA information, before using API." => %{ description: nil, type: :access_restricted }, "Price is more than 20% below market price." => %{ description: nil, type: :invalid_order }, "Trading is currently unavailable for your account." => %{ description: "{\"status\": \"error\", \"reason\": {\"__all__\": [\"Trading is currently unavailable for your account.\"]}, \"response_code\": \"403.004\"}", type: :access_restricted }, "Wrong API key format" => %{ description: nil, type: :invalid_credentials }, "Your account is frozen" => %{ description: nil, type: :access_restricted } }, error_codes: %{ "API key not found" => :invalid_credentials, "Authentication failed" => :invalid_credentials, "Bitstamp.net is under scheduled maintenance. We'll be back soon." => :network_error, "Check your account balance for details." => :insufficient_balance, "Ensure that there are no more than" => :invalid_order, "Ensure this value has at least" => :invalid_parameters, "IP address not allowed" => :access_restricted, "Invalid nonce" => :invalid_credentials, "Invalid offset." => :invalid_parameters, "Invalid signature" => :invalid_credentials, "Minimum order size is" => :invalid_order, "Missing key, signature and nonce parameters" => :invalid_credentials, "No permission found" => :access_restricted, "Order could not be placed." => :network_error, "Order not found." => :order_not_found, "Please update your profile with your FATCA information, before using API." => :access_restricted, "Price is more than 20% below market price." => :invalid_order, "Trading is currently unavailable for your account." => :access_restricted, "Wrong API key format" => :invalid_credentials, "Your account is frozen" => :access_restricted }, exceptions: %{ broad: %{ "Check your account balance for details." => :insufficient_funds, "Ensure that there are no more than" => :invalid_order, "Ensure this value has at least" => :invalid_address, "Minimum order size is" => :invalid_order }, exact: %{ "API key not found" => :authentication_error, "Authentication failed" => :authentication_error, "Bitstamp.net is under scheduled maintenance. We'll be back soon." => :on_maintenance, "IP address not allowed" => :permission_denied, "Invalid nonce" => :invalid_nonce, "Invalid offset." => :bad_request, "Invalid signature" => :authentication_error, "Missing key, signature and nonce parameters" => :authentication_error, "No permission found" => :permission_denied, "Order could not be placed." => :exchange_not_available, "Order not found." => :order_not_found, "Please update your profile with your FATCA information, before using API." => :permission_denied, "Price is more than 20% below market price." => :invalid_order, "Trading is currently unavailable for your account." => :account_suspended, "Wrong API key format" => :authentication_error, "Your account is frozen" => :permission_denied } }, exchange_options: %{ "defaultNetworkCodeReplacements" => %{ "BRC20" => %{ "BRC20" => "BTC" }, "CRO" => %{ "CRC20" => "CRONOS" }, "ETH" => %{ "ERC20" => "ETH" }, "TRX" => %{ "TRC20" => "TRX" } }, "networksById" => %{ "algorand" => "ALGO", "avalanche-c-chain" => "AVAX", "bitcoin" => "BTC", "bitcoin-cash" => "BCH", "cardana" => "ADA", "casper" => "CSRP", "doge" => "DOGE", "ethereum" => "ERC20", "flare" => "FLR", "hedera" => "HBAR", "litecoin" => "LTC", "near" => "NEAR", "polkadot" => "DOT", "solana" => "SOL", "songbird" => "FLR", "stellar" => "XLM", "sui" => "SUI", "tron" => "TRC20", "xrpl" => "XRP" } }, extended_metadata: %{ limits: %{ "amount" => %{}, "cost" => %{}, "leverage" => %{}, "price" => %{} }, logo_url: "https://github.com/user-attachments/assets/d5480572-1fee-43cb-b900-d38c522d0024" }, extracted_metadata: %{ ccxt_version: "4.5.42" }, features: %{ future: %{}, spot: %{ create_order: %{ hedged: false, iceberg: false, leverage: false, margin_mode: false, market_buy_by_cost: false, market_buy_requires_price: false, self_trade_prevention: false, stop_loss_price: false, take_profit_price: false, time_in_force: %{ fok: true, gtd: true, ioc: true, po: true }, trailing: false, trigger_direction: false, trigger_price: false }, fetch_my_trades: %{ limit: 1000, margin_mode: false, symbol_required: false, until_days: 30 }, fetch_ohlcv: %{ limit: 1000 }, fetch_open_orders: %{ margin_mode: false, symbol_required: false, trailing: false, trigger: false }, fetch_order: %{ margin_mode: false, symbol_required: false, trailing: false, trigger: false }, sandbox: false }, swap: %{} }, fees: %{ funding: %{ deposit: %{ "BCH" => 0, "BTC" => 0, "ETH" => 0, "EUR" => 0, "LTC" => 0, "PAX" => 0, "USD" => 7.5, "XLM" => 0, "XRP" => 0 }, percentage: false, tier_based: false }, trading: %{ maker: 0.004, percentage: true, taker: 0.004, tier_based: true, tiers: %{ maker: [ %{ fee: 0.003, volume: 0 }, %{ fee: 0.002, volume: 10000 }, %{ fee: 0.001, volume: 100000 }, %{ fee: 0.0008, volume: 500000 }, %{ fee: 0.0006, volume: 1500000 }, %{ fee: 0.0003, volume: 5000000 }, %{ fee: 0.002, volume: 20000000 }, %{ fee: 0.0001, volume: 50000000 }, %{ fee: 0, volume: 100000000 }, %{ fee: 0, volume: 250000000 }, %{ fee: 0, volume: 1000000000 } ], taker: [ %{ fee: 0.004, volume: 0 }, %{ fee: 0.003, volume: 10000 }, %{ fee: 0.002, volume: 100000 }, %{ fee: 0.0018, volume: 500000 }, %{ fee: 0.0016, volume: 1500000 }, %{ fee: 0.0012, volume: 5000000 }, %{ fee: 0.001, volume: 20000000 }, %{ fee: 0.0008, volume: 50000000 }, %{ fee: 0.0006, volume: 100000000 }, %{ fee: 0.0005, volume: 250000000 }, %{ fee: 0.0003, volume: 1000000000 } ] } } }, forward_aliases: nil, 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;\n }\n //\n // {\"error\": \"No permission found\"} // fetchDepositAddress returns this on apiKeys that don't have the permission required\n // {\"status\": \"error\", \"reason\": {\"__all__\": [\"Minimum order size is 5.0 EUR.\"]}}\n // reuse of a nonce gives: { status: 'error', reason: 'Invalid nonce', code: 'API0004' }\n //\n const status = this.safeString(response, 'status');\n const error = this.safeValue(response, 'error');\n if ((status === 'error') || (error !== undefined)) {\n let errors$1 = [];\n if (typeof error === 'string') {\n errors$1.push(error);\n }\n else if (error !== undefined) {\n const keys = Object.keys(error);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const value = this.safeValue(error, key);\n if (Array.isArray(value)) {\n errors$1 = this.arrayConcat(errors$1, value);\n }\n else {\n errors$1.push(value);\n }\n }\n }\n const reasonInner = this.safeValue(response, 'reason', {});\n if (typeof reasonInner === 'string') {\n errors$1.push(reasonInner);\n }\n else {\n const all = this.safeValue(reasonInner, '__all__', []);\n for (let i = 0; i < all.length; i++) {\n errors$1.push(all[i]);\n }\n }\n const code = this.safeString(response, 'code');\n if (code === 'API0005') {\n throw new errors.AuthenticationError(this.id + ' invalid signature, use the uid for the main account if you have subaccounts');\n }\n const feedback = this.id + ' ' + body;\n for (let i = 0; i < errors$1.length; i++) {\n const value = errors$1[i];\n this.throwExactlyMatchedException(this.exceptions['exact'], value, feedback);\n this.throwBroadlyMatchedException(this.exceptions['broad'], value, feedback);\n }\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: true, 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: true, edit_order_with_client_order_id: false, edit_order_ws: false, edit_orders: false, fetch_a_d_l_rank: false, fetch_accounts: false, fetch_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: true, fetch_currencies_ws: true, fetch_deposit: false, fetch_deposit_address: true, fetch_deposit_addresses: false, fetch_deposit_addresses_by_network: false, fetch_deposit_withdraw_fee: true, fetch_deposit_withdraw_fees: true, fetch_deposits: false, fetch_deposits_withdrawals: 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: true, 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: false, fetch_orders_by_status: false, fetch_orders_ws: false, fetch_position: false, fetch_position_a_d_l_rank: false, fetch_position_history: false, fetch_position_mode: false, fetch_position_ws: false, fetch_positions: false, fetch_positions_a_d_l_rank: false, fetch_positions_for_symbol: false, fetch_positions_for_symbol_ws: false, fetch_positions_history: false, fetch_positions_risk: false, fetch_positions_ws: false, fetch_premium_index_ohlcv: false, fetch_settlement_history: false, fetch_status: false, fetch_ticker: true, fetch_ticker_ws: false, fetch_tickers: true, fetch_tickers_ws: false, fetch_time: false, fetch_trades: true, fetch_trades_ws: false, fetch_trading_fee: true, fetch_trading_fees: true, fetch_trading_fees_ws: false, fetch_trading_limits: false, fetch_transaction_fee: false, fetch_transaction_fees: true, 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: true, 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: true, 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: 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: false, watch_tickers: false, watch_trades: true, watch_trades_for_symbols: false, withdraw: true, ws: false }, http_config: %{ user_agent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36" }, id: "bitstamp", markets: nil, name: "Bitstamp", ohlcv_timestamp_resolution: :seconds, options: %{ networks_by_id: %{ "algorand" => "ALGO", "avalanche-c-chain" => "AVAX", "bitcoin" => "BTC", "bitcoin-cash" => "BCH", "cardana" => "ADA", "casper" => "CSRP", "doge" => "DOGE", "ethereum" => "ERC20", "flare" => "FLR", "hedera" => "HBAR", "litecoin" => "LTC", "near" => "NEAR", "polkadot" => "DOT", "solana" => "SOL", "songbird" => "FLR", "stellar" => "XLM", "sui" => "SUI", "tron" => "TRC20", "xrpl" => "XRP" } }, order_mappings: nil, param_mappings: %{ "code" => "currency", "since" => "start", "symbol" => "market_symbol", "toAccount" => "subAccount" }, parse_methods: [ %{ "comment" => nil, "examples" => [], "line_end" => 1347, "line_start" => 1327, "mappings" => [], "name" => "parseBalance", "signature" => "parseBalance (response): Balances", "source" => "parseBalance (response): Balances {\n const result: Dict = {\n 'info': response,\n 'timestamp': undefined,\n 'datetime': undefined,\n };\n if (response === undefined) {\n response = [];\n }\n for (let i = 0; i < response.length; i++) {\n const currencyBalance = response[i];\n const currencyId = this.safeString (currencyBalance, 'currency');\n const currencyCode = this.safeCurrencyCode (currencyId);\n const account = this.account ();\n account['free'] = this.safeString (currencyBalance, 'available');\n account['used'] = this.safeString (currencyBalance, 'reserved');\n account['total'] = this.safeString (currencyBalance, 'total');\n result[currencyCode] = account;\n }\n return this.safeBalance (result);\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 1555, "line_start" => 1532, "mappings" => [ %{ "comment" => nil, "key" => "fee", "value" => "withdrawFee" }, %{ "comment" => nil, "key" => "percentage", "value" => "undefined" } ], "name" => "parseDepositWithdrawFee", "signature" => "parseDepositWithdrawFee (fee, currency = undefined)", "source" => "parseDepositWithdrawFee (fee, currency = undefined) {\n const result = this.depositWithdrawFee (fee);\n for (let j = 0; j < fee.length; j++) {\n const networkEntry = fee[j];\n const networkId = this.safeString (networkEntry, 'network');\n const networkCode = this.networkIdToCode (networkId);\n const withdrawFee = this.safeNumber (networkEntry, 'fee');\n result['withdraw'] = {\n 'fee': withdrawFee,\n 'percentage': undefined,\n };\n result['networks'][networkCode] = {\n 'withdraw': {\n 'fee': withdrawFee,\n 'percentage': undefined,\n },\n 'deposit': {\n 'fee': undefined,\n 'percentage': undefined,\n },\n };\n }\n return result;\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"funding_rate\": \"0.0024\",\n \"timestamp\": \"1644406050\",\n \"market\": \"BTC/USD-PERP\",\n \"next_funding_time\": \"1644406050\"\n }" ], "line_end" => 2401, "line_start" => 2369, "mappings" => [ %{ "comment" => nil, "key" => "info", "value" => "fundingRate" }, %{ "comment" => nil, "key" => "symbol", "value" => "this.safeSymbol (marketId, market)" }, %{ "comment" => nil, "key" => "markPrice", "value" => "undefined" }, %{ "comment" => nil, "key" => "indexPrice", "value" => "undefined" }, %{ "comment" => nil, "key" => "interestRate", "value" => "undefined" }, %{ "comment" => nil, "key" => "estimatedSettlePrice", "value" => "undefined" }, %{ "comment" => nil, "key" => "timestamp", "value" => "currentTime" }, %{ "comment" => nil, "key" => "datetime", "value" => "this.iso8601 (currentTime)" }, %{ "comment" => nil, "key" => "previousFundingRate", "value" => "undefined" }, %{ "comment" => nil, "key" => "nextFundingRate", "value" => "undefined" }, %{ "comment" => nil, "key" => "previousFundingTimestamp", "value" => "undefined" }, %{ "comment" => nil, "key" => "nextFundingTimestamp", "value" => "undefined" }, %{ "comment" => nil, "key" => "previousFundingDatetime", "value" => "undefined" }, %{ "comment" => nil, "key" => "nextFundingDatetime", "value" => "undefined" }, %{ "comment" => nil, "key" => "fundingRate", "value" => "this.safeNumber (fundingRate, 'funding_rate')" }, %{ "comment" => nil, "key" => "fundingTimestamp", "value" => "nextFundingRateTimestamp" }, %{ "comment" => nil, "key" => "fundingDatetime", "value" => "this.iso8601 (nextFundingRateTimestamp)" }, %{ "comment" => nil, "key" => "interval", "value" => "undefined" } ], "name" => "parseFundingRate", "signature" => "parseFundingRate (fundingRate, market: Market = undefined): FundingRate", "source" => "parseFundingRate (fundingRate, market: Market = undefined): FundingRate {\n //\n // {\n // \"funding_rate\": \"0.0024\",\n // \"timestamp\": \"1644406050\",\n // \"market\": \"BTC/USD-PERP\",\n // \"next_funding_time\": \"1644406050\"\n // }\n //\n const currentTime = this.safeIntegerProduct (fundingRate, 'timestamp', 1000);\n const nextFundingRateTimestamp = this.safeIntegerProduct (fundingRate, 'next_funding_time', 1000);\n const marketId = this.safeString (fundingRate, 'market');\n return {\n 'info': fundingRate,\n 'symbol': this.safeSymbol (marketId, market),\n 'markPrice': undefined,\n 'indexPrice': undefined,\n 'interestRate': undefined,\n 'estimatedSettlePrice': undefined,\n 'timestamp': currentTime,\n 'datetime': this.iso8601 (currentTime),\n 'previousFundingRate': undefined,\n 'nextFundingRate': undefined,\n 'previousFundingTimestamp': undefined,\n 'nextFundingTimestamp': undefined,\n 'previousFundingDatetime': undefined,\n 'nextFundingDatetime': undefined,\n 'fundingRate': this.safeNumber (fundingRate, 'funding_rate'),\n 'fundingTimestamp': nextFundingRateTimestamp,\n 'fundingDatetime': this.iso8601 (nextFundingRateTimestamp),\n 'interval': undefined,\n } as FundingRate;\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"funding_rate\": \"0.0024\",\n \"timestamp\": \"1644406050\"\n }" ], "line_end" => 1886, "line_start" => 1871, "mappings" => [ %{ "comment" => nil, "key" => "info", "value" => "contract" }, %{ "comment" => nil, "key" => "symbol", "value" => "undefined" }, %{ "comment" => nil, "key" => "fundingRate", "value" => "this.safeNumber (contract, 'funding_rate')" }, %{ "comment" => nil, "key" => "timestamp", "value" => "timestamp" }, %{ "comment" => nil, "key" => "datetime", "value" => "this.iso8601 (timestamp)" } ], "name" => "parseFundingRateHistory", "signature" => "parseFundingRateHistory (contract, market: Market = undefined)", "source" => "parseFundingRateHistory (contract, market: Market = undefined) {\n //\n // {\n // \"funding_rate\": \"0.0024\",\n // \"timestamp\": \"1644406050\"\n // }\n //\n const timestamp = this.safeIntegerProduct (contract, 'timestamp', 0.001);\n return {\n 'info': contract,\n 'symbol': undefined,\n 'fundingRate': this.safeNumber (contract, 'funding_rate'),\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n };\n }" }, %{ "comment" => nil, "examples" => [ "[\n {\n \"fee\": \"0.00000000\",\n \"btc_usd\": \"0.00\",\n \"id\": 1234567894,\n \"usd\": 0,\n \"btc\": 0,\n \"datetime\": \"2018-09-08 09:00:31\",\n \"type\": \"1\",\n \"xrp\": \"-20.00000000\",\n \"eur\": 0,\n },\n {\n \"fee\": \"0.00000000\",\n \"btc_usd\": \"0.00\",\n \"id\": 1134567891,\n \"usd\": 0,\n \"btc\": 0,\n \"datetime\": \"2018-09-07 18:47:52\",\n \"type\": \"0\",\n \"xrp\": \"20.00000000\",\n \"eur\": 0,\n },\n ]" ], "line_end" => 2315, "line_start" => 2224, "mappings" => [ %{ "comment" => nil, "key" => "info", "value" => "item" }, %{ "comment" => nil, "key" => "id", "value" => "parsedTrade['id']" }, %{ "comment" => nil, "key" => "timestamp", "value" => "parsedTrade['timestamp']" }, %{ "comment" => nil, "key" => "datetime", "value" => "parsedTrade['datetime']" }, %{ "comment" => nil, "key" => "direction", "value" => "direction" }, %{ "comment" => nil, "key" => "account", "value" => "undefined" }, %{ "comment" => nil, "key" => "referenceId", "value" => "parsedTrade['order']" }, %{ "comment" => nil, "key" => "referenceAccount", "value" => "undefined" }, %{ "comment" => nil, "key" => "type", "value" => "type" }, %{ "comment" => nil, "key" => "currency", "value" => "market['base']" }, %{ "comment" => nil, "key" => "amount", "value" => "parsedTrade['amount']" }, %{ "comment" => nil, "key" => "before", "value" => "undefined" }, %{ "comment" => nil, "key" => "after", "value" => "undefined" }, %{ "comment" => nil, "key" => "status", "value" => "'ok'" }, %{ "comment" => nil, "key" => "fee", "value" => "parsedTrade['fee']" }, %{ "comment" => nil, "key" => "id", "value" => "parsedTransaction['id']" }, %{ "comment" => nil, "key" => "timestamp", "value" => "parsedTransaction['timestamp']" }, %{ "comment" => nil, "key" => "datetime", "value" => "parsedTransaction['datetime']" }, %{ "comment" => nil, "key" => "referenceId", "value" => "parsedTransaction['txid']" }, %{ "comment" => nil, "key" => "currency", "value" => "parsedTransaction['currency']" }, %{ "comment" => nil, "key" => "amount", "value" => "parsedTransaction['amount']" }, %{ "comment" => nil, "key" => "status", "value" => "parsedTransaction['status']" }, %{ "comment" => nil, "key" => "fee", "value" => "parsedTransaction['fee']" } ], "name" => "parseLedgerEntry", "signature" => "parseLedgerEntry (item: Dict, currency: Currency = undefined): LedgerEntry", "source" => "parseLedgerEntry (item: Dict, currency: Currency = undefined): LedgerEntry {\n //\n // [\n // {\n // \"fee\": \"0.00000000\",\n // \"btc_usd\": \"0.00\",\n // \"id\": 1234567894,\n // \"usd\": 0,\n // \"btc\": 0,\n // \"datetime\": \"2018-09-08 09:00:31\",\n // \"type\": \"1\",\n // \"xrp\": \"-20.00000000\",\n // \"eur\": 0,\n // },\n // {\n // \"fee\": \"0.00000000\",\n // \"btc_usd\": \"0.00\",\n // \"id\": 1134567891,\n // \"usd\": 0,\n // \"btc\": 0,\n // \"datetime\": \"2018-09-07 18:47:52\",\n // \"type\": \"0\",\n // \"xrp\": \"20.00000000\",\n // \"eur\": 0,\n // },\n // ]\n //\n const type = this.parseLedgerEntryType (this.safeString (item, 'type'));\n if (type === 'trade') {\n const parsedTrade = this.parseTrade (item);\n let market = undefined;\n const keys = Object.keys (item);\n for (let i = 0; i < keys.length; i++) {\n if (keys[i].indexOf ('_') >= 0) {\n const marketId = keys[i].replace ('_', '');\n market = this.safeMarket (marketId, market);\n }\n }\n // if the market is still not defined\n // try to deduce it from used keys\n if (market === undefined) {\n market = this.getMarketFromTrade (item);\n }\n const direction = (parsedTrade['side'] === 'buy') ? 'in' : 'out';\n return this.safeLedgerEntry ({\n 'info': item,\n 'id': parsedTrade['id'],\n 'timestamp': parsedTrade['timestamp'],\n 'datetime': parsedTrade['datetime'],\n 'direction': direction,\n 'account': undefined,\n 'referenceId': parsedTrade['order'],\n 'referenceAccount': undefined,\n 'type': type,\n 'currency': market['base'],\n 'amount': parsedTrade['amount'],\n 'before': undefined,\n 'after': undefined,\n 'status': 'ok',\n 'fee': parsedTrade['fee'],\n }, currency) as LedgerEntry;\n } else {\n const parsedTransaction = this.parseTransaction (item, currency);\n let direction = undefined;\n if ('amount' in item) {\n const amount = this.safeString (item, 'amount');\n direction = Precise.stringGt (amount, '0') ? 'in' : 'out';\n } else if (('currency' in parsedTransaction) && parsedTransaction['currency'] !== undefined) {\n const currencyCode = this.safeString (parsedTransaction, 'currency');\n currency = this.currency (currencyCode);\n const amount = this.safeString (item, currency['id']);\n direction = Precise.stringGt (amount, '0') ? 'in' : 'out';\n }\n return this.safeLedgerEntry ({\n 'info': item,\n 'id': parsedTransaction['id'],\n 'timestamp': parsedTransaction['timestamp'],\n 'datetime': parsedTransaction['datetime'],\n 'direction': direction,\n 'account': undefined,\n 'referenceId': parsedTransaction['txid'],\n 'referenceAccount': undefined,\n 'type': type,\n 'currency': parsedTransaction['currency'],\n 'amount': parsedTransaction['amount'],\n 'before': undefined,\n 'after': undefined,\n 'status': parsedTransaction['status'],\n 'fee': parsedTransaction['fee'],\n }, currency) as LedgerEntry;\n }\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 2222, "line_start" => 2214, "mappings" => [], "name" => "parseLedgerEntryType", "signature" => "parseLedgerEntryType (type)", "source" => "parseLedgerEntryType (type) {\n const types: Dict = {\n '0': 'transaction',\n '1': 'transaction',\n '2': 'trade',\n '14': 'transfer',\n };\n return this.safeString (types, type, type);\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"high\": \"9064.77\",\n \"timestamp\": \"1593961440\",\n \"volume\": \"18.49436608\",\n \"low\": \"9040.87\",\n \"close\": \"9064.77\",\n \"open\": \"9040.87\"\n }" ], "line_end" => 1269, "line_start" => 1250, "mappings" => [], "name" => "parseOHLCV", "signature" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV", "source" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV {\n //\n // {\n // \"high\": \"9064.77\",\n // \"timestamp\": \"1593961440\",\n // \"volume\": \"18.49436608\",\n // \"low\": \"9040.87\",\n // \"close\": \"9064.77\",\n // \"open\": \"9040.87\"\n // }\n //\n return [\n this.safeTimestamp (ohlcv, 'timestamp'),\n this.safeNumber (ohlcv, 'open'),\n this.safeNumber (ohlcv, 'high'),\n this.safeNumber (ohlcv, 'low'),\n this.safeNumber (ohlcv, 'close'),\n this.safeNumber (ohlcv, 'volume'),\n ];\n }" }, %{ "comment" => nil, "examples" => [ "{ status: \"Finished\",\n \"id\": 731693945,\n \"client_order_id\": '',\n \"transactions\":\n [ { fee: \"0.000019\",\n \"price\": \"0.00015803\",\n \"datetime\": \"2018-01-07 10:45:34.132551\",\n \"btc\": \"0.0079015000000000\",\n \"tid\": 42777395,\n \"type\": 2,\n \"xrp\": \"50.00000000\" } ] }", "{ \"id\": 468646390,\n \"client_order_id\": \"\",\n \"status\": \"Canceled\",\n \"transactions\": [{\n \"eth\": \"0.23000000\",\n \"fee\": \"0.09\",\n \"tid\": 25810126,\n \"usd\": \"69.8947000000000000\",\n \"type\": 2,\n \"price\": \"303.89000000\",\n \"datetime\": \"2017-11-11 07:22:20.710567\"\n }]}", "{\n \"price\": \"0.00008012\",\n \"client_order_id\": '',\n \"currency_pair\": \"XRP/BTC\",\n \"datetime\": \"2019-01-31 21:23:36\",\n \"amount\": \"15.00000000\",\n \"type\": \"0\",\n \"id\": \"2814205012\"\n }", "{\n \"id\": 1453282316578816,\n \"amount\": \"0.02035278\",\n \"price\": \"2100.45\",\n \"type\": 0,\n \"market\": \"BTC/USD\"\n }" ], "line_end" => 2212, "line_start" => 2125, "mappings" => [ %{ "comment" => nil, "key" => "id", "value" => "id" }, %{ "comment" => nil, "key" => "clientOrderId", "value" => "clientOrderId" }, %{ "comment" => nil, "key" => "datetime", "value" => "this.iso8601 (timestamp)" }, %{ "comment" => nil, "key" => "timestamp", "value" => "timestamp" }, %{ "comment" => nil, "key" => "lastTradeTimestamp", "value" => "undefined" }, %{ "comment" => nil, "key" => "status", "value" => "status" }, %{ "comment" => nil, "key" => "symbol", "value" => "symbol" }, %{ "comment" => nil, "key" => "type", "value" => "undefined" }, %{ "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" => "cost", "value" => "undefined" }, %{ "comment" => nil, "key" => "amount", "value" => "amount" }, %{ "comment" => nil, "key" => "filled", "value" => "undefined" }, %{ "comment" => nil, "key" => "remaining", "value" => "undefined" }, %{ "comment" => nil, "key" => "trades", "value" => "transactions" }, %{ "comment" => nil, "key" => "fee", "value" => "undefined" }, %{ "comment" => nil, "key" => "info", "value" => "order" }, %{ "comment" => nil, "key" => "average", "value" => "undefined" } ], "name" => "parseOrder", "signature" => "parseOrder (order: Dict, market: Market = undefined): Order", "source" => "parseOrder (order: Dict, market: Market = undefined): Order {\n //\n // from fetch order:\n // { status: \"Finished\",\n // \"id\": 731693945,\n // \"client_order_id\": '',\n // \"transactions\":\n // [ { fee: \"0.000019\",\n // \"price\": \"0.00015803\",\n // \"datetime\": \"2018-01-07 10:45:34.132551\",\n // \"btc\": \"0.0079015000000000\",\n // \"tid\": 42777395,\n // \"type\": 2,\n // \"xrp\": \"50.00000000\" } ] }\n //\n // partially filled order:\n // { \"id\": 468646390,\n // \"client_order_id\": \"\",\n // \"status\": \"Canceled\",\n // \"transactions\": [{\n // \"eth\": \"0.23000000\",\n // \"fee\": \"0.09\",\n // \"tid\": 25810126,\n // \"usd\": \"69.8947000000000000\",\n // \"type\": 2,\n // \"price\": \"303.89000000\",\n // \"datetime\": \"2017-11-11 07:22:20.710567\"\n // }]}\n //\n // from create order response:\n // {\n // \"price\": \"0.00008012\",\n // \"client_order_id\": '',\n // \"currency_pair\": \"XRP/BTC\",\n // \"datetime\": \"2019-01-31 21:23:36\",\n // \"amount\": \"15.00000000\",\n // \"type\": \"0\",\n // \"id\": \"2814205012\"\n // }\n //\n // cancelOrder\n //\n // {\n // \"id\": 1453282316578816,\n // \"amount\": \"0.02035278\",\n // \"price\": \"2100.45\",\n // \"type\": 0,\n // \"market\": \"BTC/USD\"\n // }\n //\n const id = this.safeString (order, 'id');\n const clientOrderId = this.safeString (order, 'client_order_id');\n let side = this.safeString (order, 'type');\n if (side !== undefined) {\n side = (side === '1') ? 'sell' : 'buy';\n }\n // there is no timestamp from fetchOrder\n const timestamp = this.parse8601 (this.safeString (order, 'datetime'));\n const marketId = this.safeStringLower (order, 'currency_pair');\n const symbol = this.safeSymbol (marketId, market, '/');\n const status = this.parseOrderStatus (this.safeString (order, 'status'));\n const amount = this.safeString (order, 'amount');\n const transactions = this.safeValue (order, 'transactions', []);\n const price = this.safeString (order, 'price');\n return this.safeOrder ({\n 'id': id,\n 'clientOrderId': clientOrderId,\n 'datetime': this.iso8601 (timestamp),\n 'timestamp': timestamp,\n 'lastTradeTimestamp': undefined,\n 'status': status,\n 'symbol': symbol,\n 'type': undefined,\n 'timeInForce': undefined,\n 'postOnly': undefined,\n 'side': side,\n 'price': price,\n 'triggerPrice': undefined,\n 'cost': undefined,\n 'amount': amount,\n 'filled': undefined,\n 'remaining': undefined,\n 'trades': transactions,\n 'fee': undefined,\n 'info': order,\n 'average': undefined,\n }, market);\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 1729, "line_start" => 1720, "mappings" => [], "name" => "parseOrderStatus", "signature" => "parseOrderStatus (status: Str)", "source" => "parseOrderStatus (status: Str) {\n const statuses: Dict = {\n 'In Queue': 'open',\n 'Open': 'open',\n 'Finished': 'closed',\n 'Canceled': 'canceled',\n 'Cancel pending': 'canceling',\n };\n return this.safeString (statuses, status, status);\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"timestamp\": \"1686068944\",\n \"high\": \"26252\",\n \"last\": \"26216\",\n \"bid\": \"26208\",\n \"vwap\": \"25681\",\n \"volume\": \"3563.13819902\",\n \"low\": \"25350\",\n \"ask\": \"26211\",\n \"open\": \"25730\",\n \"open_24\": \"25895\",\n \"percent_change_24\": \"1.24\",\n \"pair\": \"BTC/USD\"\n }" ], "line_end" => 945, "line_start" => 899, "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, 'high')" }, %{ "comment" => nil, "key" => "low", "value" => "this.safeString (ticker, 'low')" }, %{ "comment" => nil, "key" => "bid", "value" => "this.safeString (ticker, 'bid')" }, %{ "comment" => nil, "key" => "bidVolume", "value" => "undefined" }, %{ "comment" => nil, "key" => "ask", "value" => "this.safeString (ticker, 'ask')" }, %{ "comment" => nil, "key" => "askVolume", "value" => "undefined" }, %{ "comment" => nil, "key" => "vwap", "value" => "vwap" }, %{ "comment" => nil, "key" => "open", "value" => "this.safeString (ticker, 'open')" }, %{ "comment" => nil, "key" => "close", "value" => "last" }, %{ "comment" => nil, "key" => "last", "value" => "last" }, %{ "comment" => nil, "key" => "previousClose", "value" => "undefined" }, %{ "comment" => nil, "key" => "change", "value" => "undefined" }, %{ "comment" => nil, "key" => "percentage", "value" => "undefined" }, %{ "comment" => nil, "key" => "average", "value" => "undefined" }, %{ "comment" => nil, "key" => "baseVolume", "value" => "baseVolume" }, %{ "comment" => nil, "key" => "quoteVolume", "value" => "quoteVolume" }, %{ "comment" => nil, "key" => "info", "value" => "ticker" } ], "name" => "parseTicker", "signature" => "parseTicker (ticker: Dict, market: Market = undefined): Ticker", "source" => "parseTicker (ticker: Dict, market: Market = undefined): Ticker {\n //\n // {\n // \"timestamp\": \"1686068944\",\n // \"high\": \"26252\",\n // \"last\": \"26216\",\n // \"bid\": \"26208\",\n // \"vwap\": \"25681\",\n // \"volume\": \"3563.13819902\",\n // \"low\": \"25350\",\n // \"ask\": \"26211\",\n // \"open\": \"25730\",\n // \"open_24\": \"25895\",\n // \"percent_change_24\": \"1.24\",\n // \"pair\": \"BTC/USD\"\n // }\n //\n const marketId = this.safeString (ticker, 'pair');\n const symbol = this.safeSymbol (marketId, market, undefined);\n const timestamp = this.safeTimestamp (ticker, 'timestamp');\n const vwap = this.safeString (ticker, 'vwap');\n const baseVolume = this.safeString (ticker, 'volume');\n const quoteVolume = Precise.stringMul (baseVolume, vwap);\n const last = this.safeString (ticker, 'last');\n return this.safeTicker ({\n 'symbol': symbol,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'high': this.safeString (ticker, 'high'),\n 'low': this.safeString (ticker, 'low'),\n 'bid': this.safeString (ticker, 'bid'),\n 'bidVolume': undefined,\n 'ask': this.safeString (ticker, 'ask'),\n 'askVolume': undefined,\n 'vwap': vwap,\n 'open': this.safeString (ticker, 'open'),\n 'close': last,\n 'last': last,\n 'previousClose': undefined,\n 'change': undefined,\n 'percentage': undefined,\n 'average': undefined,\n 'baseVolume': baseVolume,\n 'quoteVolume': quoteVolume,\n 'info': ticker,\n }, market);\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"date\": \"1637845199\",\n \"tid\": \"209895701\",\n \"amount\": \"0.00500000\",\n \"type\": \"0\", // Transaction type: 0 - buy; 1 - sell\n \"price\": \"4451.25\"\n }", "{\n \"fee\": \"0.11128\",\n \"eth_usdt\": 4451.25,\n \"datetime\": \"2021-11-25 12:59:59.322000\",\n \"usdt\": \"-22.26\",\n \"order_id\": 1429545880227846,\n \"usd\": 0,\n \"btc\": 0,\n \"eth\": \"0.00500000\",\n \"type\": \"2\", // Transaction type: 0 - deposit; 1 - withdrawal; 2 - market trade; 14 - sub account transfer; 25 - credited with staked assets; 26 - sent assets to staking; 27 - staking reward; 32 - referral reward; 35 - inter account transfer.\n \"id\": 209895701,\n \"eur\": 0\n }", "{\n \"fee\": \"0.11128\",\n \"price\": \"4451.25000000\",\n \"datetime\": \"2021-11-25 12:59:59.322000\",\n \"usdt\": \"22.25625000\",\n \"tid\": 209895701,\n \"eth\": \"0.00500000\",\n \"type\": 2 // Transaction type: 0 - deposit; 1 - withdrawal; 2 - market trade\n }" ], "line_end" => 1208, "line_start" => 1079, "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" => "symbol" }, %{ "comment" => nil, "key" => "order", "value" => "orderId" }, %{ "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" } ], "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 // \"date\": \"1637845199\",\n // \"tid\": \"209895701\",\n // \"amount\": \"0.00500000\",\n // \"type\": \"0\", // Transaction type: 0 - buy; 1 - sell\n // \"price\": \"4451.25\"\n // }\n //\n // fetchMyTrades, trades returned within fetchOrder (private)\n //\n // {\n // \"fee\": \"0.11128\",\n // \"eth_usdt\": 4451.25,\n // \"datetime\": \"2021-11-25 12:59:59.322000\",\n // \"usdt\": \"-22.26\",\n // \"order_id\": 1429545880227846,\n // \"usd\": 0,\n // \"btc\": 0,\n // \"eth\": \"0.00500000\",\n // \"type\": \"2\", // Transaction type: 0 - deposit; 1 - withdrawal; 2 - market trade; 14 - sub account transfer; 25 - credited with staked assets; 26 - sent assets to staking; 27 - staking reward; 32 - referral reward; 35 - inter account transfer.\n // \"id\": 209895701,\n // \"eur\": 0\n // }\n //\n // from fetchOrder (private)\n //\n // {\n // \"fee\": \"0.11128\",\n // \"price\": \"4451.25000000\",\n // \"datetime\": \"2021-11-25 12:59:59.322000\",\n // \"usdt\": \"22.25625000\",\n // \"tid\": 209895701,\n // \"eth\": \"0.00500000\",\n // \"type\": 2 // Transaction type: 0 - deposit; 1 - withdrawal; 2 - market trade\n // }\n //\n const id = this.safeString2 (trade, 'id', 'tid');\n let symbol = undefined;\n let side = undefined;\n let priceString = this.safeString (trade, 'price');\n let amountString = this.safeString (trade, 'amount');\n const orderId = this.safeString (trade, 'order_id');\n const type = undefined;\n let costString = this.safeString (trade, 'cost');\n let rawMarketId = undefined;\n if (market === undefined) {\n const keys = Object.keys (trade);\n for (let i = 0; i < keys.length; i++) {\n const currentKey = keys[i];\n if (currentKey !== 'order_id' && currentKey.indexOf ('_') >= 0) {\n rawMarketId = currentKey;\n market = this.safeMarket (rawMarketId, market, '_');\n }\n }\n }\n // if the market is still not defined\n // try to deduce it from used keys\n if (market === undefined) {\n market = this.getMarketFromTrade (trade);\n }\n const feeCostString = this.safeString (trade, 'fee');\n const feeCurrency = market['quote'];\n const priceId = (rawMarketId !== undefined) ? rawMarketId : market['id'];\n priceString = this.safeString (trade, priceId, priceString);\n amountString = this.safeString (trade, market['baseId'], amountString);\n costString = this.safeString (trade, market['quoteId'], costString);\n symbol = market['symbol'];\n const datetimeString = this.safeString2 (trade, 'date', 'datetime');\n let timestamp = undefined;\n if (datetimeString !== undefined) {\n if (datetimeString.indexOf (' ') >= 0) {\n // iso8601\n timestamp = this.parse8601 (datetimeString);\n } else {\n // string unix epoch in seconds\n timestamp = parseInt (datetimeString);\n timestamp = timestamp * 1000;\n }\n }\n // if it is a private trade\n if ('id' in trade) {\n if (amountString !== undefined) {\n const isAmountNeg = Precise.stringLt (amountString, '0');\n if (isAmountNeg) {\n side = 'sell';\n amountString = Precise.stringNeg (amountString);\n } else {\n side = 'buy';\n }\n }\n } else {\n side = this.safeString (trade, 'type');\n if (side === '1') {\n side = 'sell';\n } else if (side === '0') {\n side = 'buy';\n } else {\n side = undefined;\n }\n }\n if (costString !== undefined) {\n costString = Precise.stringAbs (costString);\n }\n let fee = undefined;\n if (feeCostString !== undefined) {\n fee = {\n 'cost': feeCostString,\n 'currency': feeCurrency,\n };\n }\n return this.safeTrade ({\n 'id': id,\n 'info': trade,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'symbol': symbol,\n 'order': orderId,\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" => [], "line_end" => 1420, "line_start" => 1409, "mappings" => [ %{ "comment" => nil, "key" => "info", "value" => "fee" }, %{ "comment" => nil, "key" => "symbol", "value" => "this.safeSymbol (marketId, market)" }, %{ "comment" => nil, "key" => "maker", "value" => "this.safeNumber (fees, 'maker')" }, %{ "comment" => nil, "key" => "taker", "value" => "this.safeNumber (fees, 'taker')" }, %{ "comment" => nil, "key" => "percentage", "value" => "undefined" }, %{ "comment" => nil, "key" => "tierBased", "value" => "undefined" } ], "name" => "parseTradingFee", "signature" => "parseTradingFee (fee: Dict, market: Market = undefined): TradingFeeInterface", "source" => "parseTradingFee (fee: Dict, market: Market = undefined): TradingFeeInterface {\n const marketId = this.safeString (fee, 'market');\n const fees = this.safeDict (fee, 'fees', {});\n return {\n 'info': fee,\n 'symbol': this.safeSymbol (marketId, market),\n 'maker': this.safeNumber (fees, 'maker'),\n 'taker': this.safeNumber (fees, 'taker'),\n 'percentage': undefined,\n 'tierBased': undefined,\n };\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 1430, "line_start" => 1422, "mappings" => [], "name" => "parseTradingFees", "signature" => "parseTradingFees (fees)", "source" => "parseTradingFees (fees) {\n const result: Dict = { 'info': fees };\n for (let i = 0; i < fees.length; i++) {\n const fee = this.parseTradingFee (fees[i]);\n const symbol = fee['symbol'];\n result[symbol] = fee;\n }\n return result;\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"fee\": \"0.00000000\",\n \"btc_usd\": \"0.00\",\n \"id\": 1234567894,\n \"usd\": 0,\n \"btc\": 0,\n \"datetime\": \"2018-09-08 09:00:31\",\n \"type\": \"1\",\n \"xrp\": \"-20.00000000\",\n \"eur\": 0,\n }", "{\n \"status\": 2,\n \"datetime\": \"2018-10-17 10:58:13\",\n \"currency\": \"BTC\",\n \"amount\": \"0.29669259\",\n \"address\": \"aaaaa\",\n \"type\": 1,\n \"id\": 111111,\n \"transaction_id\": \"xxxx\",\n }", "{\n \"id\": 3386432,\n \"type\": 14,\n \"amount\": \"863.21332500\",\n \"status\": 2,\n \"address\": \"rE1sdh25BJQ3qFwngiTBwaq3zPGGYcrjp1?dt=1455\",\n \"currency\": \"XRP\",\n \"datetime\": \"2018-01-05 15:27:55\",\n \"transaction_id\": \"001743B03B0C79BA166A064AC0142917B050347B4CB23BA2AB4B91B3C5608F4C\"\n }" ], "line_end" => 2108, "line_start" => 1987, "mappings" => [ %{ "comment" => nil, "key" => "info", "value" => "transaction" }, %{ "comment" => nil, "key" => "id", "value" => "this.safeString (transaction, 'id')" }, %{ "comment" => nil, "key" => "txid", "value" => "this.safeString (transaction, 'transaction_id')" }, %{ "comment" => nil, "key" => "type", "value" => "type" }, %{ "comment" => nil, "key" => "currency", "value" => "code" }, %{ "comment" => nil, "key" => "network", "value" => "undefined" }, %{ "comment" => nil, "key" => "amount", "value" => "this.parseNumber (amount)" }, %{ "comment" => nil, "key" => "status", "value" => "status" }, %{ "comment" => nil, "key" => "timestamp", "value" => "timestamp" }, %{ "comment" => nil, "key" => "datetime", "value" => "this.iso8601 (timestamp)" }, %{ "comment" => nil, "key" => "address", "value" => "address" }, %{ "comment" => nil, "key" => "addressFrom", "value" => "undefined" }, %{ "comment" => nil, "key" => "addressTo", "value" => "address" }, %{ "comment" => nil, "key" => "tag", "value" => "tag" }, %{ "comment" => nil, "key" => "tagFrom", "value" => "undefined" }, %{ "comment" => nil, "key" => "tagTo", "value" => "tag" }, %{ "comment" => nil, "key" => "updated", "value" => "undefined" }, %{ "comment" => nil, "key" => "comment", "value" => "undefined" }, %{ "comment" => nil, "key" => "internal", "value" => "undefined" }, %{ "comment" => nil, "key" => "fee", "value" => "fee" }, %{ "comment" => nil, "key" => "currency", "value" => "undefined" }, %{ "comment" => nil, "key" => "cost", "value" => "undefined" }, %{ "comment" => nil, "key" => "rate", "value" => "undefined" } ], "name" => "parseTransaction", "signature" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction", "source" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction {\n //\n // fetchDepositsWithdrawals\n //\n // {\n // \"fee\": \"0.00000000\",\n // \"btc_usd\": \"0.00\",\n // \"id\": 1234567894,\n // \"usd\": 0,\n // \"btc\": 0,\n // \"datetime\": \"2018-09-08 09:00:31\",\n // \"type\": \"1\",\n // \"xrp\": \"-20.00000000\",\n // \"eur\": 0,\n // }\n //\n // fetchWithdrawals\n //\n // {\n // \"status\": 2,\n // \"datetime\": \"2018-10-17 10:58:13\",\n // \"currency\": \"BTC\",\n // \"amount\": \"0.29669259\",\n // \"address\": \"aaaaa\",\n // \"type\": 1,\n // \"id\": 111111,\n // \"transaction_id\": \"xxxx\",\n // }\n //\n // {\n // \"id\": 3386432,\n // \"type\": 14,\n // \"amount\": \"863.21332500\",\n // \"status\": 2,\n // \"address\": \"rE1sdh25BJQ3qFwngiTBwaq3zPGGYcrjp1?dt=1455\",\n // \"currency\": \"XRP\",\n // \"datetime\": \"2018-01-05 15:27:55\",\n // \"transaction_id\": \"001743B03B0C79BA166A064AC0142917B050347B4CB23BA2AB4B91B3C5608F4C\"\n // }\n //\n const timestamp = this.parse8601 (this.safeString (transaction, 'datetime'));\n const currencyId = this.getCurrencyIdFromTransaction (transaction);\n const code = this.safeCurrencyCode (currencyId, currency);\n const feeCost = this.safeString (transaction, 'fee');\n let feeCurrency = undefined;\n let amount = undefined;\n if ('amount' in transaction) {\n amount = this.safeString (transaction, 'amount');\n } else if (currency !== undefined) {\n amount = this.safeString (transaction, currency['id'], amount);\n feeCurrency = currency['code'];\n } else if ((code !== undefined) && (currencyId !== undefined)) {\n amount = this.safeString (transaction, currencyId, amount);\n feeCurrency = code;\n }\n if (amount !== undefined) {\n // withdrawals have a negative amount\n amount = Precise.stringAbs (amount);\n }\n let status = 'ok';\n if ('status' in transaction) {\n status = this.parseTransactionStatus (this.safeString (transaction, 'status'));\n }\n let type = undefined;\n if ('type' in transaction) {\n // from fetchDepositsWithdrawals\n const rawType = this.safeString (transaction, 'type');\n if (rawType === '0') {\n type = 'deposit';\n } else if (rawType === '1') {\n type = 'withdrawal';\n }\n } else {\n // from fetchWithdrawals\n type = 'withdrawal';\n }\n let tag = undefined;\n let address = this.safeString (transaction, 'address');\n if (address !== undefined) {\n // dt (destination tag) is embedded into the address field\n const addressParts = address.split ('?dt=');\n const numParts = addressParts.length;\n if (numParts > 1) {\n address = addressParts[0];\n tag = addressParts[1];\n }\n }\n let fee = {\n 'currency': undefined,\n 'cost': undefined,\n 'rate': undefined,\n };\n if (feeCost !== undefined) {\n fee = {\n 'currency': feeCurrency,\n 'cost': feeCost,\n 'rate': undefined,\n };\n }\n return {\n 'info': transaction,\n 'id': this.safeString (transaction, 'id'),\n 'txid': this.safeString (transaction, 'transaction_id'),\n 'type': type,\n 'currency': code,\n 'network': undefined,\n 'amount': this.parseNumber (amount),\n 'status': status,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'address': address,\n 'addressFrom': undefined,\n 'addressTo': address,\n 'tag': tag,\n 'tagFrom': undefined,\n 'tagTo': tag,\n 'updated': undefined,\n 'comment': undefined,\n 'internal': undefined,\n 'fee': fee,\n } as Transaction;\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 1504, "line_start" => 1486, "mappings" => [], "name" => "parseTransactionFees", "signature" => "parseTransactionFees (response, codes = undefined)", "source" => "parseTransactionFees (response, codes = undefined) {\n const result: Dict = {};\n const currencies = this.indexBy (response, 'currency');\n const ids = Object.keys (currencies);\n for (let i = 0; i < ids.length; i++) {\n const id = ids[i];\n const fees = this.safeValue (response, i, {});\n const code = this.safeCurrencyCode (id);\n if ((codes !== undefined) && !this.inArray (code, codes)) {\n continue;\n }\n result[code] = {\n 'withdraw_fee': this.safeNumber (fees, 'fee'),\n 'deposit': {},\n 'info': this.safeDict (currencies, id),\n };\n }\n return result;\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 2123, "line_start" => 2110, "mappings" => [], "name" => "parseTransactionStatus", "signature" => "parseTransactionStatus (status: Str)", "source" => "parseTransactionStatus (status: Str) {\n //\n // withdrawals:\n // 0 (open), 1 (in process), 2 (finished), 3 (canceled) or 4 (failed).\n //\n const statuses: Dict = {\n '0': 'pending', // Open\n '1': 'pending', // In process\n '2': 'ok', // Finished\n '3': 'canceled', // Canceled\n '4': 'failed', // Failed\n };\n return this.safeString (statuses, status, status);\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 2586, "line_start" => 2570, "mappings" => [ %{ "comment" => nil, "key" => "info", "value" => "transfer" }, %{ "comment" => nil, "key" => "id", "value" => "undefined" }, %{ "comment" => nil, "key" => "timestamp", "value" => "undefined" }, %{ "comment" => nil, "key" => "datetime", "value" => "undefined" }, %{ "comment" => nil, "key" => "currency", "value" => "currency['code']" }, %{ "comment" => nil, "key" => "amount", "value" => "undefined" }, %{ "comment" => nil, "key" => "fromAccount", "value" => "undefined" }, %{ "comment" => nil, "key" => "toAccount", "value" => "undefined" }, %{ "comment" => nil, "key" => "status", "value" => "this.parseTransferStatus (status)" } ], "name" => "parseTransfer", "signature" => "parseTransfer (transfer, currency = undefined)", "source" => "parseTransfer (transfer, currency = undefined) {\n //\n // { status: 'ok' }\n //\n const status = this.safeString (transfer, 'status');\n return {\n 'info': transfer,\n 'id': undefined,\n 'timestamp': undefined,\n 'datetime': undefined,\n 'currency': currency['code'],\n 'amount': undefined,\n 'fromAccount': undefined,\n 'toAccount': undefined,\n 'status': this.parseTransferStatus (status),\n };\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 2594, "line_start" => 2588, "mappings" => [], "name" => "parseTransferStatus", "signature" => "parseTransferStatus (status: Str): Str", "source" => "parseTransferStatus (status: Str): Str {\n const statuses: Dict = {\n 'ok': 'ok',\n 'error': 'failed',\n };\n return this.safeString (statuses, status, status);\n }" } ], path_prefix: "/v2/", pro: true, quote_json_numbers: nil, rate_limits: %{ interval_ms: 75, period: 1000, requests: 13, rolling_window_size: 60000 }, raw_endpoints: %{ private: [ %{ auth: false, cost: 1, method: :get, path: "/contacts/{contact_uuid}/" }, %{ auth: false, cost: 1, method: :get, path: "/earn/subscriptions/" }, %{ auth: false, cost: 1, method: :get, path: "/earn/transactions/" }, %{ auth: false, cost: 1, method: :get, path: "/trade_history/" }, %{ auth: false, cost: 1, method: :get, path: "/trade_history/{pair}" }, %{ auth: false, cost: 1, method: :get, path: "/travel_rule/contacts/" }, %{ auth: false, cost: 1, method: :post, path: "/fees/trading/{market_symbol}" }, %{ auth: false, cost: 1, method: :post, path: "/cvx_address/" }, %{ auth: false, cost: 1, method: :post, path: "/pax_address/" }, %{ auth: false, cost: 1, method: :post, path: "/jup_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/mpl_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/knc_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/uni_address/" }, %{ auth: false, cost: 1, method: :post, path: "/eurt_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/near_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/gusd_address/" }, %{ auth: false, cost: 1, method: :post, path: "/sui_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/sand_address/" }, %{ auth: false, cost: 1, method: :post, path: "/ada_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/chz_address/" }, %{ auth: false, cost: 1, method: :post, path: "/eth_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/veur_address/" }, %{ auth: false, cost: 1, method: :post, path: "/eth_address/" }, %{ auth: false, cost: 1, method: :post, path: "/cancel_all_orders/" }, %{ auth: false, cost: 1, method: :post, path: "/storj_address/" }, %{ auth: false, cost: 1, method: :post, path: "/euroc_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/algo_address/" }, %{ auth: false, cost: 1, method: :post, path: "/skl_address/" }, %{ auth: false, cost: 1, method: :post, path: "/cel_address/" }, %{ auth: false, cost: 1, method: :post, path: "/balance/" }, %{ auth: false, cost: 1, method: :post, path: "/inj_address/" }, %{ auth: false, cost: 1, method: :post, path: "/matic_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/bch_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/wecan_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/open_orders/{pair}/" }, %{ auth: false, cost: 1, method: :post, path: "/withdrawal/status/" }, %{ auth: false, cost: 1, method: :post, path: "/eurcv_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/amp_address/" }, %{ auth: false, cost: 1, method: :post, path: "/mana_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/snx_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/sell/market/{pair}/" }, %{ auth: false, cost: 1, method: :post, path: "/euroc_address/" }, %{ auth: false, cost: 1, method: :post, path: "/rly_address/" }, %{ auth: false, cost: 1, method: :post, path: "/wbtc_address/" }, %{ auth: false, cost: 1, method: :post, path: "/ust_address/" }, %{ auth: false, cost: 1, method: :post, path: "/shib_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/sgb_address/" }, %{ auth: false, cost: 1, method: :post, path: "/uma_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/dot_address/" }, %{ auth: false, cost: 1, method: :post, path: "/travel_rule/contacts/" }, %{ auth: false, cost: 1, method: :post, path: "/ftt_address/" }, %{ auth: false, cost: 1, method: :post, path: "/blur_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/crv_address/" }, %{ auth: false, cost: 1, method: :post, path: "/mkr_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/balance/{pair}/" }, %{ auth: false, cost: 1, method: :post, path: "/ltc_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/user_transactions/{pair}/" }, %{ auth: false, cost: 1, method: :post, path: "/cel_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/link_address/" }, %{ auth: false, cost: 1, method: :post, path: "/yfi_address/" }, %{ auth: false, cost: 1, method: :post, path: "/shib_address/" }, %{ auth: false, cost: 1, method: :post, path: "/perp_address/" }, %{ auth: false, cost: 1, method: :post, path: "/dai_address/" }, %{ auth: false, cost: 1, method: :post, path: "/perp_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/uni_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/liquidation_address/new/" }, %{ auth: false, cost: 1, method: :post, path: "/ldo_address/" }, %{ auth: false, cost: 1, method: :post, path: "/wif_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/rgt_address/" }, %{ auth: false, cost: 1, method: :post, path: "/doge_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/sushi_address/" }, %{ auth: false, cost: 1, method: :post, path: "/lmwr_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/snx_address/" }, %{ auth: false, cost: 1, method: :post, path: "/aave_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/usdt_address/" }, %{ auth: false, cost: 1, method: :post, path: "/usdt_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/yfi_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/wecan_address/" }, %{ auth: false, cost: 1, method: :post, path: "/grt_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/smt_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/sushi_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/sxp_address/" }, %{ auth: false, cost: 1, method: :post, path: "/algo_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/websockets_token/" }, %{ auth: false, cost: 1, method: :post, path: "/revoke_all_api_keys/" }, %{ auth: false, cost: 1, method: :post, path: "/ripple_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/buy/instant/{pair}/" }, %{ auth: false, cost: 1, method: :post, path: "/xlm_address/" }, %{ auth: false, cost: 1, method: :post, path: "/ltc_address/" }, %{ auth: false, cost: 1, method: :post, path: "/earn/unsubscribe" }, %{ auth: false, cost: 1, method: :post, path: "/crv_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/storj_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/mpl_address/" }, %{ auth: false, cost: 1, method: :post, path: "/zrx_address/" }, %{ auth: false, cost: 1, method: :post, path: "/dgld_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/transfer-to-main/" }, %{ auth: false, cost: 1, method: :post, path: "/rad_address/" }, %{ auth: false, cost: 1, method: :post, path: "/fees/withdrawal/{currency}/" }, %{ auth: false, cost: 1, method: :post, path: "/btc_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/withdrawal/cancel/" }, %{ auth: false, cost: 1, method: :post, path: "/usdc_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/pyusd_address/" }, %{ auth: false, cost: 1, method: :post, path: "/bat_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/ens_address/" }, %{ auth: false, cost: 1, method: :post, path: "/ada_address/" }, %{ auth: false, cost: 1, method: :post, path: "/xrp_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/user_transactions/" }, %{ auth: false, cost: 1, method: :post, path: "/ondo_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/pyth_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/xrp_address/" }, %{ auth: false, cost: 1, method: :post, path: "/pax_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/buy/{pair}/" }, %{ auth: false, cost: 1, method: :post, path: "/pepe_address/" }, %{ auth: false, cost: 1, method: :post, path: "/pepe_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/fet_address/" }, %{ auth: false, cost: 1, method: :post, path: "/order_status/" }, %{ auth: false, cost: 1, method: :post, path: "/rgt_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/fees/withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/wbtc_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/avax_address/" }, %{ auth: false, cost: 1, method: :post, path: "/gusd_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/imx_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/flr_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/gods_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/wif_address/" }, %{ auth: false, cost: 1, method: :post, path: "/dai_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/sand_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/lmwr_address/" }, %{ auth: false, cost: 1, method: :post, path: "/ens_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/sell/{pair}/" }, %{ auth: false, cost: 1, method: :post, path: "/veur_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/knc_address/" }, %{ auth: false, cost: 1, method: :post, path: "/account_balances/" }, %{ auth: false, cost: 1, method: :post, path: "/ant_address/" }, %{ auth: false, cost: 1, method: :post, path: "/audio_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/bch_address/" }, %{ auth: false, cost: 1, method: :post, path: "/liquidation_address/info/" }, %{ auth: false, cost: 1, method: :post, path: "/1inch_address/" }, %{ auth: false, cost: 1, method: :post, path: "/sol_address/" }, %{ auth: false, cost: 1, method: :post, path: "/1inch_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/alpha_address/" }, %{ auth: false, cost: 1, method: :post, path: "/eurcv_address/" }, %{ auth: false, cost: 1, method: :post, path: "/transfer-from-main/" }, %{ auth: false, cost: 1, method: :post, path: "/dydx_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/sol_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/dydx_address/" }, %{ auth: false, cost: 1, method: :post, path: "/my_trading_pairs/" }, %{ auth: false, cost: 1, method: :post, path: "/flr_address/" }, %{ auth: false, cost: 1, method: :post, path: "/skl_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/vchf_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/cancel_all_orders/{pair}/" }, %{ auth: false, cost: 1, method: :post, path: "/sell/instant/{pair}/" }, %{ auth: false, cost: 1, method: :post, path: "/ftm_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/sui_address/" }, %{ auth: false, cost: 1, method: :post, path: "/xlm_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/comp_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/doge_address/" }, %{ auth: false, cost: 1, method: :post, path: "/cvx_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/gala_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/withdrawal-requests/" }, %{ auth: false, cost: 1, method: :post, path: "/bat_address/" }, %{ auth: false, cost: 1, method: :post, path: "/zrx_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/eurt_address/" }, %{ auth: false, cost: 1, method: :post, path: "/imx_address/" }, %{ auth: false, cost: 1, method: :post, path: "/axs_address/" }, %{ auth: false, cost: 1, method: :post, path: "/btc_unconfirmed/" }, %{ auth: false, cost: 1, method: :post, path: "/crypto-transactions/" }, %{ auth: false, cost: 1, method: :post, path: "/hbar_address/" }, %{ auth: false, cost: 1, method: :post, path: "/rndr_address/" }, %{ auth: false, cost: 1, method: :post, path: "/blur_address/" }, %{ auth: false, cost: 1, method: :post, path: "/vext_address/" }, %{ auth: false, cost: 1, method: :post, path: "/ust_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/axs_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/fet_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/amp_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/ftm_address/" }, %{ auth: false, cost: 1, method: :post, path: "/alpha_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/near_address/" }, %{ auth: false, cost: 1, method: :post, path: "/rly_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/btc_address/" }, %{ auth: false, cost: 1, method: :post, path: "/boba_address/" }, %{ auth: false, cost: 1, method: :post, path: "/comp_address/" }, %{ auth: false, cost: 1, method: :post, path: "/band_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/inj_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/chz_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/usdc_address/" }, %{ auth: false, cost: 1, method: :post, path: "/ftt_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/lrc_address/" }, %{ auth: false, cost: 1, method: :post, path: "/sgb_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/hbar_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/lrc_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/ant_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/open_order" }, %{ auth: false, cost: 1, method: :post, path: "/open_orders/all/" }, %{ auth: false, cost: 1, method: :post, path: "/smt_address/" }, %{ auth: false, cost: 1, method: :post, path: "/vchf_address/" }, %{ auth: false, cost: 1, method: :post, path: "/mkr_address/" }, %{ auth: false, cost: 1, method: :post, path: "/enj_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/aave_address/" }, %{ auth: false, cost: 1, method: :post, path: "/withdrawal/open/" }, %{ auth: false, cost: 1, method: :post, path: "/replace_order/" }, %{ auth: false, cost: 1, method: :post, path: "/band_address/" }, %{ auth: false, cost: 1, method: :post, path: "/slp_address/" }, %{ auth: false, cost: 1, method: :post, path: "/rad_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/dot_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/matic_address/" }, %{ auth: false, cost: 1, method: :post, path: "/ctsi_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/truf_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/ldo_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/vext_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/account_balances/{currency}/" }, %{ auth: false, cost: 1, method: :post, path: "/cspr_address/" }, %{ auth: false, cost: 1, method: :post, path: "/buy/market/{pair}/" }, %{ auth: false, cost: 1, method: :post, path: "/audio_address/" }, %{ auth: false, cost: 1, method: :post, path: "/dgld_address/" }, %{ auth: false, cost: 1, method: :post, path: "/vega_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/pyth_address/" }, %{ auth: false, cost: 1, method: :post, path: "/trac_address/" }, %{ auth: false, cost: 1, method: :post, path: "/ape_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/fees/trading/" }, %{ auth: false, cost: 1, method: :post, path: "/rndr_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/gods_address/" }, %{ auth: false, cost: 1, method: :post, path: "/omg_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/nexo_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/ripple_address/" }, %{ auth: false, cost: 1, method: :post, path: "/pyusd_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/ctsi_address/" }, %{ auth: false, cost: 1, method: :post, path: "/slp_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/nexo_address/" }, %{ auth: false, cost: 1, method: :post, path: "/get_max_order_amount/" }, %{ auth: false, cost: 1, method: :post, path: "/omg_address/" }, %{ auth: false, cost: 1, method: :post, path: "/sxp_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/cancel_order/" }, %{ auth: false, cost: 1, method: :post, path: "/ape_address/" }, %{ auth: false, cost: 1, method: :post, path: "/truf_address/" }, %{ auth: false, cost: 1, method: :post, path: "/earn/subscribe/" }, %{ auth: false, cost: 1, method: :post, path: "/mana_address/" }, %{ auth: false, cost: 1, method: :post, path: "/ondo_address/" }, %{ auth: false, cost: 1, method: :post, path: "/grt_address/" }, %{ auth: false, cost: 1, method: :post, path: "/boba_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/cspr_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/uma_address/" }, %{ auth: false, cost: 1, method: :post, path: "/avax_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/earn/subscriptions/setting/" }, %{ auth: false, cost: 1, method: :post, path: "/gala_address/" }, %{ auth: false, cost: 1, method: :post, path: "/enj_address/" }, %{ auth: false, cost: 1, method: :post, path: "/jup_address/" }, %{ auth: false, cost: 1, method: :post, path: "/link_withdrawal/" }, %{ auth: false, cost: 1, method: :post, path: "/vega_address/" }, %{ auth: false, cost: 1, method: :post, path: "/trac_withdrawal/" } ], public: [ %{ auth: false, cost: 1, method: :get, path: "/currencies/" }, %{ auth: false, cost: 1, method: :get, path: "/eur_usd/" }, %{ auth: false, cost: 1, method: :get, path: "/funding_rate/{market_symbol}/" }, %{ auth: false, cost: 1, method: :get, path: "/funding_rate_history/{pair}/" }, %{ auth: false, cost: 1, method: :get, path: "/markets/" }, %{ auth: false, cost: 1, method: :get, path: "/ohlc/{pair}/" }, %{ auth: false, cost: 1, method: :get, path: "/order_book/{pair}/" }, %{ auth: false, cost: 1, method: :get, path: "/ticker/" }, %{ auth: false, cost: 1, method: :get, path: "/ticker/{pair}/" }, %{ auth: false, cost: 1, method: :get, path: "/ticker_hour/{pair}/" }, %{ auth: false, cost: 1, method: :get, path: "/trading-pairs-info/" }, %{ auth: false, cost: 1, method: :get, path: "/transactions/{pair}/" }, %{ auth: false, cost: 1, method: :get, path: "/travel_rule/vasps/" } ] }, required_credentials: %{ api_key: true, password: false, secret: true, uid: false }, requires_eddsa: false, response_error: %{ code_field: "err-code", field: "status", message_field: "err-msg", success_values: [ "ok" ], type: :success_code }, signing: %{ api_key_header: "X-Auth", confidence: :high, nonce_header: "X-Auth-Nonce", pattern: :hmac_sha256_headers, timestamp_header: "X-Auth-Timestamp" }, spec_format_version: 2, status: %{ "eta" => nil, "status" => "ok", "updated" => nil, "url" => nil }, symbol_format: nil, symbol_formats: %{ precision_mode: 4, sample_limits: %{ "amount" => %{}, "cost" => %{ "min" => 10 }, "price" => %{} }, sample_precision: %{ "amount" => 1.0e-8, "price" => 1 }, spot: %{ base: "BTC", base_id: "BTC", case: :lower, contract: false, id: "btcusd", limits: %{ "amount" => %{}, "cost" => %{ "min" => 10 }, "leverage" => %{}, "price" => %{} }, maker: 0.004, precision: %{ "amount" => 1.0e-8, "price" => 1 }, quote: "USD", quote_id: "USD", separator: "", symbol: "BTC/USD", taker: 0.004 }, swap: %{ base: "BTC", base_id: "BTC", case: :lower, contract: true, id: "btcusd-perp", inverse: false, limits: %{ "amount" => %{ "max" => 10, "min" => 1.0e-5 }, "cost" => %{ "max" => 500000, "min" => 10 }, "leverage" => %{}, "price" => %{} }, linear: true, maker: 0.004, precision: %{ "amount" => 1.0e-5, "price" => 1 }, quote: "USD", quote_id: "USD", separator: "-", settle: "USD", settle_id: "USD", symbol: "BTC/USD:USD", taker: 0.004 } }, symbol_patterns: %{ spot: %{ case: :lower, component_order: nil, date_format: nil, pattern: :no_separator_lower, prefix: nil, separator: "", suffix: nil }, swap: %{ case: :lower, component_order: nil, date_format: nil, pattern: :suffix_perp, prefix: nil, separator: "", suffix: "-PERP" } }, timeframes: %{ "12h" => "43200", "15m" => "900", "1d" => "86400", "1h" => "3600", "1m" => "60", "1w" => "259200", "2h" => "7200", "30m" => "1800", "3m" => "180", "4h" => "14400", "5m" => "300", "6h" => "21600" }, url_strategy: %{ detected_from: "sign_method", pattern: :version_slash, prefix: "/v2/" }, urls: %{ api: "https://www.bitstamp.net/api", api_sections: %{ "private" => "https://www.bitstamp.net/api", "public" => "https://www.bitstamp.net/api" }, doc: "https://www.bitstamp.net/api", other: nil, sandbox: nil, www: "https://www.bitstamp.net" }, version: "v2", ws: %{ channel_templates: %{ watch_order_book: %{ channel_name: "diff_order_book_", market_id_format: :native, params: [ %{ "default" => nil, "name" => "limit" } ], pattern: :bts_event }, watch_orders: %{ channel_name: "private-my_orders", market_id_format: :native, params: [ %{ "default" => nil, "name" => "limit" } ], pattern: :bts_event }, watch_trades: %{ channel_name: "live_trades_", market_id_format: :native, params: [ %{ "default" => nil, "name" => "limit" } ], pattern: :bts_event } }, has: %{ watch_balance: nil, 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: false, watch_tickers: false, watch_trades: true, watch_trades_for_symbols: false }, message_patterns: [ %{ args_field: "data", format: :event, keys: [ "data", "event" ], kind_field: "event", kind_value: "bts:subscribe", sources: [ :send, :watch ] } ], options: %{ "watchOrderBook" => %{ "snapshotDelay" => 6, "snapshotMaxRetries" => 3 }, "wsSessionToken" => "" }, subscription_config: %{ args_field: "data.channel", args_format: :string, market_id_format: :native, op_field: "event" }, subscription_pattern: :event_subscribe, urls: "wss://ws.bitstamp.net", watch_methods: [ "watchOrderBook", "watchOrders", "watchTrades" ] } }