# Blockchain.com Exchange Specification # # Auto-generated by: mix ccxt.extract blockchaincom # 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: [ "LX" ], currencies: %{}, currency_aliases: %{ "BCHSV" => "BSV", "XBT" => "BTC" }, dex: false, enable_rate_limit: true, endpoint_extraction_stats: %{ "capturedMethods" => 27, "coveragePercent" => 100, "enabledMethods" => 29, "excluded" => [ %{ "method" => "editOrder", "reason" => "emulated (returns cached data, no HTTP call)" } ], "excludedMethods" => 1, "extractableMethods" => 28, "failures" => [ %{ "error" => "blockchaincom fetchWithdrawalWhitelist() is not implemented (has.fetchWithdrawalWhitelist: true but method is undefined)", "method" => "fetchWithdrawalWhitelist" } ] }, endpoints: [ %{ api_section: "private", auth: true, cost: 1, expects: :list, market_type: :spot, method: :delete, name: :cancel_all_orders, param_mappings: %{}, params: [ :symbol ], path: "/orders", response_transformer: {:extract_path, ["address"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :single, market_type: :spot, method: :delete, name: :cancel_order, param_mappings: %{ "id" => "orderId" }, params: [ :id, :symbol ], path: "/orders/{orderId}", response_transformer: {:extract_path_unwrap, ["address"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ "clOrdId" => "", "ordType" => "LIMIT" }, expects: :single, market_type: :spot, method: :post, name: :create_limit_order, param_mappings: %{ "amount" => "orderQty" }, params: [ :symbol, :side, :amount, :price ], path: "/orders", response_transformer: {:extract_path_unwrap, ["address"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ "clOrdId" => "", "ordType" => "MARKET" }, expects: :single, market_type: :spot, method: :post, name: :create_market_order, param_mappings: %{ "amount" => "orderQty" }, params: [ :symbol, :side, :amount, :price ], path: "/orders", response_transformer: {:extract_path_unwrap, ["address"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ "clOrdId" => "" }, expects: :single, market_type: :spot, method: :post, name: :create_order, param_mappings: %{ "amount" => "orderQty", "type" => "ordType" }, params: [ :symbol, :type, :side, :amount, :price ], path: "/orders", response_transformer: {:extract_path_unwrap, ["address"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ "clOrdId" => "", "ordType" => "STOPLIMIT", "triggerDirection" => "below" }, expects: :single, market_type: :swap, method: :post, name: :create_stop_limit_order, param_mappings: %{ "amount" => "orderQty", "triggerPrice" => "stopPx" }, params: [ :symbol, :side, :amount, :price, :triggerPrice ], path: "/orders", response_transformer: {:extract_path_unwrap, ["address"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ "clOrdId" => "", "ordType" => "STOP", "triggerDirection" => "below" }, expects: :single, market_type: :swap, method: :post, name: :create_stop_market_order, param_mappings: %{ "amount" => "orderQty", "triggerPrice" => "stopPx" }, params: [ :symbol, :side, :amount, :triggerPrice ], path: "/orders", response_transformer: {:extract_path_unwrap, ["address"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ "clOrdId" => "", "ordType" => "STOPLIMIT", "triggerDirection" => "below" }, expects: :single, market_type: :swap, method: :post, name: :create_stop_order, param_mappings: %{ "amount" => "orderQty", "triggerPrice" => "stopPx" }, params: [ :symbol, :type, :side, :amount, :price, :triggerPrice ], path: "/orders", response_transformer: {:extract_path_unwrap, ["address"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ "account" => "primary" }, expects: :single, market_type: :spot, method: :get, name: :fetch_balance, param_mappings: %{}, params: [], path: "/accounts", response_transformer: {:extract_path_unwrap, ["address"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ "limit" => 100, "status" => "CANCELED" }, expects: :list, market_type: :spot, method: :get, name: :fetch_canceled_orders, param_mappings: %{}, params: [ :symbol, :since, :limit ], path: "/orders", response_transformer: {:extract_path, ["address"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ "limit" => 100, "status" => "FILLED" }, expects: :list, market_type: :spot, method: :get, name: :fetch_closed_orders, param_mappings: %{}, params: [ :symbol, :since, :limit ], path: "/orders", response_transformer: {:extract_path, ["address"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :single, market_type: :spot, method: :get, name: :fetch_deposit, param_mappings: %{ "id" => "depositId" }, params: [ :id, :code ], path: "/deposits/{depositId}", response_transformer: {:extract_path_unwrap, ["address"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :single, market_type: :spot, method: :post, name: :fetch_deposit_address, param_mappings: %{ "code" => "currency" }, params: [ :code ], path: "/deposits/{currency}", response_transformer: {:extract_path_unwrap, ["address"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :list, market_type: :spot, method: :get, name: :fetch_deposits, param_mappings: %{}, params: [ :code, :since, :limit ], path: "/deposits", response_transformer: {:extract_path, ["address"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, expects: :single, market_type: :spot, method: :get, name: :fetch_l2_order_book, param_mappings: %{}, params: [ :symbol, :limit ], path: "/l2/{symbol}", response_transformer: {:extract_path_unwrap, ["address"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, expects: :single, market_type: :spot, method: :get, name: :fetch_l3_order_book, param_mappings: %{}, params: [ :symbol, :limit ], path: "/l3/{symbol}", response_transformer: {:extract_path_unwrap, ["address"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, expects: :list, market_type: :spot, method: :get, name: :fetch_markets, param_mappings: %{}, params: [], path: "/symbols", response_transformer: {:extract_path, ["address"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :list, market_type: :spot, method: :get, name: :fetch_my_trades, param_mappings: %{}, params: [ :symbol, :since, :limit ], path: "/fills", response_transformer: {:extract_path, ["address"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ "limit" => 100, "status" => "OPEN" }, expects: :list, market_type: :spot, method: :get, name: :fetch_open_orders, param_mappings: %{}, params: [ :symbol, :since, :limit ], path: "/orders", response_transformer: {:extract_path, ["address"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :single, market_type: :spot, method: :get, name: :fetch_order, param_mappings: %{ "id" => "orderId" }, params: [ :id, :symbol ], path: "/orders/{orderId}", response_transformer: {:extract_path_unwrap, ["address"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, expects: :single, market_type: :spot, method: :get, name: :fetch_order_book, param_mappings: %{ "limit" => "depth" }, params: [ :symbol, :limit ], path: "/l3/{symbol}", response_transformer: {:extract_path_unwrap, ["address"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, expects: :single, market_type: :spot, method: :get, name: :fetch_ticker, param_mappings: %{}, params: [ :symbol ], path: "/tickers/{symbol}", response_transformer: {:extract_path_unwrap, ["address"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, expects: :list, market_type: :spot, method: :get, name: :fetch_tickers, param_mappings: %{}, params: [ :symbols ], path: "/tickers", response_transformer: {:extract_path, ["address"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :list, market_type: :spot, method: :get, name: :fetch_trading_fees, param_mappings: %{}, params: [], path: "/fees", response_transformer: {:extract_path, ["address"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :single, market_type: :spot, method: :get, name: :fetch_withdrawal, param_mappings: %{ "id" => "withdrawalId" }, params: [ :id, :code ], path: "/withdrawals/{withdrawalId}", response_transformer: {:extract_path_unwrap, ["address"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :list, market_type: :spot, method: :get, name: :fetch_withdrawals, param_mappings: %{}, params: [ :code, :since, :limit ], path: "/withdrawals", response_transformer: {:extract_path, ["address"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ "sendMax" => false }, expects: :single, market_type: :spot, method: :post, name: :withdraw, param_mappings: %{ "address" => "beneficiary", "code" => "currency" }, params: [ :code, :amount, :address, :tag ], path: "/withdrawals", response_transformer: {:extract_path_unwrap, ["address"]}, source: :intercepted } ], error_code_details: %{ 401 => %{ description: nil, type: :invalid_credentials }, 404 => %{ description: nil, type: :order_not_found } }, error_codes: %{ 401 => :invalid_credentials, 404 => :order_not_found }, exceptions: %{ exact: %{ "401" => :authentication_error, "404" => :order_not_found } }, exchange_options: %{ "defaultNetworkCodeReplacements" => %{ "BRC20" => %{ "BRC20" => "BTC" }, "CRO" => %{ "CRC20" => "CRONOS" }, "ETH" => %{ "ERC20" => "ETH" }, "TRX" => %{ "TRC20" => "TRX" } }, "networks" => %{ "ADA" => "ADA", "ALGO" => "ALGO", "AR" => "AR", "ATOM" => "ATOM", "AVAXC" => "AVAX", "BCH" => "BCH", "BSV" => "BSV", "BTC" => "BTC", "CELO" => "CELO", "CHZ" => "CHZ", "DASH" => "DASH", "DCR" => "DCR", "DESO" => "DESO", "DOGE" => "DOGE", "DOT" => "DOT", "EOS" => "EOS", "ERC20" => "ETH", "ETC" => "ETC", "FIL" => "FIL", "IOTA" => "MIOTA", "KAVA" => "KAVA", "LTC" => "LTC", "MATIC" => "MATIC", "NEAR" => "NEAR", "SOL" => "SOL", "STX" => "STX", "TRC20" => "TRX", "XLM" => "XLM", "XMR" => "XMR", "XRP" => "XRP", "XTZ" => "XTZ", "ZEC" => "ZEC", "ZIL" => "ZIL" }, "networksById" => %{ "ADA" => "ADA", "ALGO" => "ALGO", "AR" => "AR", "ATOM" => "ATOM", "AVAX" => "AVAXC", "BCH" => "BCH", "BSV" => "BSV", "BTC" => "BTC", "CELO" => "CELO", "CHZ" => "CHZ", "DASH" => "DASH", "DCR" => "DCR", "DESO" => "DESO", "DOGE" => "DOGE", "DOT" => "DOT", "EOS" => "EOS", "ETC" => "ETC", "ETH" => "ERC20", "FIL" => "FIL", "KAVA" => "KAVA", "LTC" => "LTC", "MATIC" => "MATIC", "MIOTA" => "IOTA", "NEAR" => "NEAR", "SOL" => "SOL", "STX" => "STX", "TRX" => "TRC20", "XLM" => "XLM", "XMR" => "XMR", "XRP" => "XRP", "XTZ" => "XTZ", "ZEC" => "ZEC", "ZIL" => "ZIL" } }, extended_metadata: %{ fees_url: "https://exchange.blockchain.com/fees", limits: %{ "amount" => %{}, "cost" => %{}, "leverage" => %{}, "price" => %{} }, logo_url: "https://github.com/user-attachments/assets/975e3054-3399-4363-bcee-ec3c6d63d4e8" }, 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: false }, trailing: false, trigger_direction: false, trigger_price: true }, fetch_closed_orders: %{ days_back: 100000, days_back_canceled: 1, limit: 1000, margin_mode: false, symbol_required: false, trailing: false, trigger: false, until_days: 100000 }, fetch_my_trades: %{ days_back: 100000, limit: 1000, margin_mode: false, symbol_required: false, until_days: 100000 }, fetch_open_orders: %{ limit: 1000, 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: %{ trading: %{ fee_side: "get", percentage: true, tier_based: true, tiers: %{ maker: [ %{ fee: 0.004, volume: 0 }, %{ fee: 0.0017, volume: 10000 }, %{ fee: 0.0015, volume: 50000 }, %{ fee: 0.0008, volume: 100000 }, %{ fee: 0.0007, volume: 500000 }, %{ fee: 0.0006, volume: 1000000 }, %{ fee: 0.0005, volume: 2500000 }, %{ fee: 0.0004, volume: 5000000 }, %{ fee: 0.0003, volume: 25000000 }, %{ fee: 0.0002, volume: 100000000 }, %{ fee: 0.0001, volume: 500000000 }, %{ fee: 0, volume: 1000000000 } ], taker: [ %{ fee: 0.0045, volume: 0 }, %{ fee: 0.0035, volume: 10000 }, %{ fee: 0.0018, volume: 50000 }, %{ fee: 0.0018, volume: 100000 }, %{ fee: 0.0018, volume: 500000 }, %{ fee: 0.0018, volume: 1000000 }, %{ fee: 0.0018, volume: 2500000 }, %{ fee: 0.0016, volume: 5000000 }, %{ fee: 0.0014, volume: 25000000 }, %{ fee: 0.0011, volume: 100000000 }, %{ fee: 0.0008, volume: 500000000 }, %{ fee: 0.0006, volume: 1000000000 } ] } } }, forward_aliases: nil, handle_content_type_application_zip: nil, handle_errors_source: "handleErrors(code, reason, url, method, headers, body, response, requestHeaders, requestBody) {\n // {\"timestamp\":\"2021-10-21T15:13:58.837+00:00\",\"status\":404,\"error\":\"Not Found\",\"message\":\"\",\"path\":\"/orders/505050\"\n if (response === undefined) {\n return undefined;\n }\n const text = this.safeString(response, 'text');\n if (text !== undefined) { // if trade currency account is empty returns 200 with rejected order\n if (text === 'Insufficient Balance') {\n throw new errors.InsufficientFunds(this.id + ' ' + body);\n }\n }\n const errorCode = this.safeString(response, 'status');\n const errorMessage = this.safeString(response, 'error');\n if (code !== undefined) {\n const feedback = this.id + ' ' + this.json(response);\n this.throwExactlyMatchedException(this.exceptions['exact'], errorCode, feedback);\n this.throwBroadlyMatchedException(this.exceptions['broad'], errorMessage, feedback);\n }\n return undefined;\n }", has: %{ add_margin: false, borrow_cross_margin: false, borrow_isolated_margin: false, borrow_margin: false, c_o_r_s: false, cancel_all_orders: true, cancel_all_orders_ws: false, cancel_order: true, cancel_order_with_client_order_id: false, cancel_order_ws: false, cancel_orders: false, cancel_orders_with_client_order_id: false, cancel_orders_ws: false, close_all_positions: false, close_position: false, create_deposit_address: false, create_limit_buy_order: false, create_limit_buy_order_ws: false, create_limit_order: true, create_limit_order_ws: false, create_limit_sell_order: false, create_limit_sell_order_ws: false, create_market_buy_order: false, create_market_buy_order_with_cost: false, create_market_buy_order_with_cost_ws: false, create_market_buy_order_ws: false, create_market_order: true, create_market_order_with_cost: false, create_market_order_with_cost_ws: false, create_market_order_ws: true, create_market_sell_order: false, create_market_sell_order_with_cost: false, create_market_sell_order_with_cost_ws: false, create_market_sell_order_ws: false, create_order: true, create_order_with_take_profit_and_stop_loss: false, create_order_with_take_profit_and_stop_loss_ws: false, create_order_ws: false, create_orders: false, create_post_only_order: false, create_post_only_order_ws: false, create_reduce_only_order: false, create_reduce_only_order_ws: false, create_stop_limit_order: true, create_stop_limit_order_ws: false, create_stop_loss_order: false, create_stop_loss_order_ws: false, create_stop_market_order: true, create_stop_market_order_ws: false, create_stop_order: true, 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: true, fetch_closed_order: false, fetch_closed_orders: true, fetch_closed_orders_ws: false, fetch_convert_currencies: false, fetch_convert_quote: false, fetch_convert_trade: false, fetch_convert_trade_history: false, fetch_cross_borrow_rate: false, fetch_cross_borrow_rates: false, fetch_currencies: false, fetch_currencies_ws: true, fetch_deposit: true, fetch_deposit_address: true, fetch_deposit_addresses: false, fetch_deposit_addresses_by_network: false, fetch_deposit_withdraw_fee: false, fetch_deposit_withdraw_fees: false, fetch_deposits: true, 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: true, fetch_last_prices: false, fetch_ledger: false, fetch_ledger_entry: false, fetch_leverage: false, fetch_leverage_tiers: false, fetch_leverages: false, fetch_liquidations: false, fetch_long_short_ratio: false, fetch_long_short_ratio_history: false, fetch_margin_adjustment_history: false, fetch_margin_mode: false, fetch_margin_modes: false, fetch_mark_ohlcv: false, fetch_mark_prices: false, fetch_market_leverage_tiers: false, fetch_markets: true, fetch_markets_ws: false, fetch_my_liquidations: false, fetch_my_settlement_history: false, fetch_my_trades: true, fetch_my_trades_ws: false, fetch_ohlcv: false, 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: false, fetch_trades_ws: false, fetch_trading_fee: false, fetch_trading_fees: true, 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: true, fetch_withdrawal_whitelist: true, 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: 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: true, 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: false, watch_trades: true, watch_trades_for_symbols: false, withdraw: true, ws: false }, http_config: nil, id: "blockchaincom", markets: nil, name: "Blockchain.com", ohlcv_timestamp_resolution: :unknown, options: %{ networks: %{ "ADA" => "ADA", "ALGO" => "ALGO", "AR" => "AR", "ATOM" => "ATOM", "AVAXC" => "AVAX", "BCH" => "BCH", "BSV" => "BSV", "BTC" => "BTC", "CELO" => "CELO", "CHZ" => "CHZ", "DASH" => "DASH", "DCR" => "DCR", "DESO" => "DESO", "DOGE" => "DOGE", "DOT" => "DOT", "EOS" => "EOS", "ERC20" => "ETH", "ETC" => "ETC", "FIL" => "FIL", "IOTA" => "MIOTA", "KAVA" => "KAVA", "LTC" => "LTC", "MATIC" => "MATIC", "NEAR" => "NEAR", "SOL" => "SOL", "STX" => "STX", "TRC20" => "TRX", "XLM" => "XLM", "XMR" => "XMR", "XRP" => "XRP", "XTZ" => "XTZ", "ZEC" => "ZEC", "ZIL" => "ZIL" } }, order_mappings: %{ side_format: :uppercase, side_key: "side", type_format: :uppercase, type_key: "ordType" }, param_mappings: %{ "address" => "beneficiary", "amount" => "orderQty", "code" => "currency", "id" => "withdrawalId", "limit" => "depth", "triggerPrice" => "stopPx", "type" => "ordType" }, parse_methods: [ %{ "comment" => nil, "examples" => [ "{\n \"clOrdId\": \"00001\",\n \"ordType\": \"MARKET\",\n \"ordStatus\": \"FILLED\",\n \"side\": \"BUY\",\n \"symbol\": \"USDC-USDT\",\n \"exOrdId\": \"281775861306290\",\n \"price\": null,\n \"text\": \"Fill\",\n \"lastShares\": \"30.0\",\n \"lastPx\": \"0.9999\",\n \"leavesQty\": \"0.0\",\n \"cumQty\": \"30.0\",\n \"avgPx\": \"0.9999\",\n \"timestamp\": \"1633940339619\"\n }" ], "line_end" => 615, "line_start" => 560, "mappings" => [ %{ "comment" => nil, "key" => "id", "value" => "exchangeOrderId" }, %{ "comment" => nil, "key" => "clientOrderId", "value" => "clientOrderId" }, %{ "comment" => nil, "key" => "datetime", "value" => "datetime" }, %{ "comment" => nil, "key" => "timestamp", "value" => "timestamp" }, %{ "comment" => nil, "key" => "lastTradeTimestamp", "value" => "undefined" }, %{ "comment" => nil, "key" => "status", "value" => "state" }, %{ "comment" => nil, "key" => "symbol", "value" => "symbol" }, %{ "comment" => nil, "key" => "type", "value" => "type" }, %{ "comment" => nil, "key" => "timeInForce", "value" => "undefined" }, %{ "comment" => nil, "key" => "side", "value" => "side" }, %{ "comment" => nil, "key" => "price", "value" => "price" }, %{ "comment" => nil, "key" => "average", "value" => "average" }, %{ "comment" => nil, "key" => "amount", "value" => "undefined" }, %{ "comment" => nil, "key" => "filled", "value" => "filled" }, %{ "comment" => nil, "key" => "remaining", "value" => "remaining" }, %{ "comment" => nil, "key" => "cost", "value" => "undefined" }, %{ "comment" => nil, "key" => "trades", "value" => "[]" }, %{ "comment" => nil, "key" => "fees", "value" => "[]" }, %{ "comment" => nil, "key" => "info", "value" => "order" } ], "name" => "parseOrder", "signature" => "parseOrder (order: Dict, market: Market = undefined): Order", "source" => "parseOrder (order: Dict, market: Market = undefined): Order {\n //\n // {\n // \"clOrdId\": \"00001\",\n // \"ordType\": \"MARKET\",\n // \"ordStatus\": \"FILLED\",\n // \"side\": \"BUY\",\n // \"symbol\": \"USDC-USDT\",\n // \"exOrdId\": \"281775861306290\",\n // \"price\": null,\n // \"text\": \"Fill\",\n // \"lastShares\": \"30.0\",\n // \"lastPx\": \"0.9999\",\n // \"leavesQty\": \"0.0\",\n // \"cumQty\": \"30.0\",\n // \"avgPx\": \"0.9999\",\n // \"timestamp\": \"1633940339619\"\n // }\n //\n const clientOrderId = this.safeString (order, 'clOrdId');\n const type = this.safeStringLower (order, 'ordType');\n const statusId = this.safeString (order, 'ordStatus');\n const state = this.parseOrderState (statusId);\n const side = this.safeStringLower (order, 'side');\n const marketId = this.safeString (order, 'symbol');\n const symbol = this.safeSymbol (marketId, market, '-');\n const exchangeOrderId = this.safeString (order, 'exOrdId');\n const price = (type !== 'market') ? this.safeString (order, 'price') : undefined;\n const average = this.safeNumber (order, 'avgPx');\n const timestamp = this.safeInteger (order, 'timestamp');\n const datetime = this.iso8601 (timestamp);\n const filled = this.safeString (order, 'cumQty');\n const remaining = this.safeString (order, 'leavesQty');\n const result = this.safeOrder ({\n 'id': exchangeOrderId,\n 'clientOrderId': clientOrderId,\n 'datetime': datetime,\n 'timestamp': timestamp,\n 'lastTradeTimestamp': undefined,\n 'status': state,\n 'symbol': symbol,\n 'type': type,\n 'timeInForce': undefined,\n 'side': side,\n 'price': price,\n 'average': average,\n 'amount': undefined,\n 'filled': filled,\n 'remaining': remaining,\n 'cost': undefined,\n 'trades': [],\n 'fees': [],\n 'info': order,\n });\n return result;\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 558, "line_start" => 548, "mappings" => [], "name" => "parseOrderState", "signature" => "parseOrderState (state)", "source" => "parseOrderState (state) {\n const states: Dict = {\n 'OPEN': 'open',\n 'REJECTED': 'rejected',\n 'FILLED': 'closed',\n 'CANCELED': 'canceled',\n 'PART_FILLED': 'open',\n 'EXPIRED': 'expired',\n };\n return this.safeString (states, state, state);\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"symbol\": \"BTC-USD\",\n \"price_24h\": 47791.86,\n \"volume_24h\": 362.88635738,\n \"last_trade_price\": 47587.75\n }" ], "line_end" => 512, "line_start" => 476, "mappings" => [ %{ "comment" => nil, "key" => "symbol", "value" => "symbol" }, %{ "comment" => nil, "key" => "timestamp", "value" => "undefined" }, %{ "comment" => nil, "key" => "datetime", "value" => "undefined" }, %{ "comment" => nil, "key" => "high", "value" => "undefined" }, %{ "comment" => nil, "key" => "low", "value" => "undefined" }, %{ "comment" => nil, "key" => "bid", "value" => "undefined" }, %{ "comment" => nil, "key" => "bidVolume", "value" => "undefined" }, %{ "comment" => nil, "key" => "ask", "value" => "undefined" }, %{ "comment" => nil, "key" => "askVolume", "value" => "undefined" }, %{ "comment" => nil, "key" => "vwap", "value" => "undefined" }, %{ "comment" => nil, "key" => "open", "value" => "open" }, %{ "comment" => nil, "key" => "close", "value" => "undefined" }, %{ "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" => "undefined" }, %{ "comment" => nil, "key" => "info", "value" => "ticker" } ], "name" => "parseTicker", "signature" => "parseTicker (ticker: Dict, market: Market = undefined): Ticker", "source" => "parseTicker (ticker: Dict, market: Market = undefined): Ticker {\n //\n // {\n // \"symbol\": \"BTC-USD\",\n // \"price_24h\": 47791.86,\n // \"volume_24h\": 362.88635738,\n // \"last_trade_price\": 47587.75\n // }\n //\n const marketId = this.safeString (ticker, 'symbol');\n const symbol = this.safeSymbol (marketId, market, '-');\n const last = this.safeString (ticker, 'last_trade_price');\n const baseVolume = this.safeString (ticker, 'volume_24h');\n const open = this.safeString (ticker, 'price_24h');\n return this.safeTicker ({\n 'symbol': symbol,\n 'timestamp': undefined,\n 'datetime': undefined,\n 'high': undefined,\n 'low': undefined,\n 'bid': undefined,\n 'bidVolume': undefined,\n 'ask': undefined,\n 'askVolume': undefined,\n 'vwap': undefined,\n 'open': open,\n 'close': undefined,\n 'last': last,\n 'previousClose': undefined,\n 'change': undefined,\n 'percentage': undefined,\n 'average': undefined,\n 'baseVolume': baseVolume,\n 'quoteVolume': undefined,\n 'info': ticker,\n }, market);\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"exOrdId\":281685751028507,\n \"tradeId\":281685434947633,\n \"execId\":8847494003,\n \"side\":\"BUY\",\n \"symbol\":\"AAVE-USDT\",\n \"price\":405.34,\n \"qty\":0.1,\n \"fee\":0.162136,\n \"timestamp\":1634559249687\n }" ], "line_end" => 875, "line_start" => 830, "mappings" => [ %{ "comment" => nil, "key" => "id", "value" => "tradeId" }, %{ "comment" => nil, "key" => "timestamp", "value" => "timestamp" }, %{ "comment" => nil, "key" => "datetime", "value" => "datetime" }, %{ "comment" => nil, "key" => "symbol", "value" => "symbol" }, %{ "comment" => nil, "key" => "order", "value" => "orderId" }, %{ "comment" => nil, "key" => "type", "value" => "undefined" }, %{ "comment" => nil, "key" => "side", "value" => "side" }, %{ "comment" => nil, "key" => "takerOrMaker", "value" => "undefined" }, %{ "comment" => nil, "key" => "price", "value" => "priceString" }, %{ "comment" => nil, "key" => "amount", "value" => "amountString" }, %{ "comment" => nil, "key" => "cost", "value" => "undefined" }, %{ "comment" => nil, "key" => "fee", "value" => "fee" }, %{ "comment" => nil, "key" => "info", "value" => "trade" } ], "name" => "parseTrade", "signature" => "parseTrade (trade: Dict, market: Market = undefined): Trade", "source" => "parseTrade (trade: Dict, market: Market = undefined): Trade {\n //\n // {\n // \"exOrdId\":281685751028507,\n // \"tradeId\":281685434947633,\n // \"execId\":8847494003,\n // \"side\":\"BUY\",\n // \"symbol\":\"AAVE-USDT\",\n // \"price\":405.34,\n // \"qty\":0.1,\n // \"fee\":0.162136,\n // \"timestamp\":1634559249687\n // }\n //\n const orderId = this.safeString (trade, 'exOrdId');\n const tradeId = this.safeString (trade, 'tradeId');\n const side = this.safeString (trade, 'side').toLowerCase ();\n const marketId = this.safeString (trade, 'symbol');\n const priceString = this.safeString (trade, 'price');\n const amountString = this.safeString (trade, 'qty');\n const timestamp = this.safeInteger (trade, 'timestamp');\n const datetime = this.iso8601 (timestamp);\n market = this.safeMarket (marketId, market, '-');\n const symbol = market['symbol'];\n let fee = undefined;\n const feeCostString = this.safeString (trade, 'fee');\n if (feeCostString !== undefined) {\n const feeCurrency = market['quote'];\n fee = { 'cost': feeCostString, 'currency': feeCurrency };\n }\n return this.safeTrade ({\n 'id': tradeId,\n 'timestamp': timestamp,\n 'datetime': datetime,\n 'symbol': symbol,\n 'order': orderId,\n 'type': undefined,\n 'side': side,\n 'takerOrMaker': undefined,\n 'price': priceString,\n 'amount': amountString,\n 'cost': undefined,\n 'fee': fee,\n 'info': trade,\n }, market);\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"depositId\":\"748e9180-be0d-4a80-e175-0156150efc95\",\n \"amount\":0.009,\n \"currency\":\"ETH\",\n \"address\":\"0xEC6B5929D454C8D9546d4221ace969E1810Fa92c\",\n \"state\":\"COMPLETED\",\n \"txHash\":\"582114562140e51a80b481c2dfebaf62b4ab9769b8ff54820bb67e34d4a3ab0c\",\n \"timestamp\":1633697196241\n }", "{\n \"amount\":30.0,\n \"currency\":\"USDT\",\n \"beneficiary\":\"cab00d11-6e7f-46b7-b453-2e8ef6f101fa\", // blockchain specific id\n \"withdrawalId\":\"99df5ef7-eab6-4033-be49-312930fbd1ea\",\n \"fee\":34.005078,\n \"state\":\"COMPLETED\",\n \"timestamp\":1634218452549\n }" ], "line_end" => 1017, "line_start" => 948, "mappings" => [ %{ "comment" => nil, "key" => "info", "value" => "transaction" }, %{ "comment" => nil, "key" => "id", "value" => "id" }, %{ "comment" => nil, "key" => "txid", "value" => "txid" }, %{ "comment" => nil, "key" => "timestamp", "value" => "timestamp" }, %{ "comment" => nil, "key" => "datetime", "value" => "this.iso8601 (timestamp)" }, %{ "comment" => nil, "key" => "network", "value" => "undefined" }, %{ "comment" => nil, "key" => "addressFrom", "value" => "undefined" }, %{ "comment" => nil, "key" => "address", "value" => "address" }, %{ "comment" => nil, "key" => "addressTo", "value" => "address" }, %{ "comment" => nil, "key" => "tagFrom", "value" => "undefined" }, %{ "comment" => nil, "key" => "tag", "value" => "undefined" }, %{ "comment" => nil, "key" => "tagTo", "value" => "undefined" }, %{ "comment" => nil, "key" => "type", "value" => "type" }, %{ "comment" => nil, "key" => "amount", "value" => "amount" }, %{ "comment" => nil, "key" => "currency", "value" => "code" }, %{ "comment" => nil, "key" => "status", "value" => "this.parseTransactionState (state)" }, %{ "comment" => nil, "key" => "comment", "value" => "undefined" }, %{ "comment" => nil, "key" => "internal", "value" => "undefined" }, %{ "comment" => nil, "key" => "fee", "value" => "fee" } ], "name" => "parseTransaction", "signature" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction", "source" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction {\n //\n // deposit\n //\n // {\n // \"depositId\":\"748e9180-be0d-4a80-e175-0156150efc95\",\n // \"amount\":0.009,\n // \"currency\":\"ETH\",\n // \"address\":\"0xEC6B5929D454C8D9546d4221ace969E1810Fa92c\",\n // \"state\":\"COMPLETED\",\n // \"txHash\":\"582114562140e51a80b481c2dfebaf62b4ab9769b8ff54820bb67e34d4a3ab0c\",\n // \"timestamp\":1633697196241\n // }\n //\n // withdrawal\n //\n // {\n // \"amount\":30.0,\n // \"currency\":\"USDT\",\n // \"beneficiary\":\"cab00d11-6e7f-46b7-b453-2e8ef6f101fa\", // blockchain specific id\n // \"withdrawalId\":\"99df5ef7-eab6-4033-be49-312930fbd1ea\",\n // \"fee\":34.005078,\n // \"state\":\"COMPLETED\",\n // \"timestamp\":1634218452549\n // }\n //\n let type = undefined;\n let id = undefined;\n const amount = this.safeNumber (transaction, 'amount');\n const timestamp = this.safeInteger (transaction, 'timestamp');\n const currencyId = this.safeString (transaction, 'currency');\n const code = this.safeCurrencyCode (currencyId, currency);\n const state = this.safeString (transaction, 'state');\n if ('depositId' in transaction) {\n type = 'deposit';\n id = this.safeString (transaction, 'depositId');\n } else if ('withdrawalId' in transaction) {\n type = 'withdrawal';\n id = this.safeString (transaction, 'withdrawalId');\n }\n const feeCost = (type === 'withdrawal') ? this.safeNumber (transaction, 'fee') : undefined;\n let fee = undefined;\n if (feeCost !== undefined) {\n fee = { 'currency': code, 'cost': feeCost };\n }\n const address = this.safeString (transaction, 'address');\n const txid = this.safeString (transaction, 'txhash');\n return {\n 'info': transaction,\n 'id': id,\n 'txid': txid,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'network': undefined,\n 'addressFrom': undefined,\n 'address': address,\n 'addressTo': address,\n 'tagFrom': undefined,\n 'tag': undefined,\n 'tagTo': undefined,\n 'type': type,\n 'amount': amount,\n 'currency': code,\n 'status': this.parseTransactionState (state), // 'status': 'pending', // 'ok', 'failed', 'canceled', string\n 'updated': undefined,\n 'comment': undefined,\n 'internal': undefined,\n 'fee': fee,\n } as Transaction;\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 946, "line_start" => 937, "mappings" => [], "name" => "parseTransactionState", "signature" => "parseTransactionState (state)", "source" => "parseTransactionState (state) {\n const states: Dict = {\n 'COMPLETED': 'ok', //\n 'REJECTED': 'failed',\n 'PENDING': 'pending',\n 'FAILED': 'failed',\n 'REFUNDED': 'refunded',\n };\n return this.safeString (states, state, state);\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: [ %{ auth: false, cost: 1, method: :get, path: "/accounts" }, %{ auth: false, cost: 1, method: :get, path: "/accounts/{account}/{currency}" }, %{ auth: false, cost: 1, method: :get, path: "/deposits" }, %{ auth: false, cost: 1, method: :get, path: "/deposits/{depositId}" }, %{ auth: false, cost: 1, method: :get, path: "/fees" }, %{ auth: false, cost: 1, method: :get, path: "/fills" }, %{ auth: false, cost: 1, method: :get, path: "/orders" }, %{ auth: false, cost: 1, method: :get, path: "/orders/{orderId}" }, %{ auth: false, cost: 1, method: :get, path: "/trades" }, %{ auth: false, cost: 1, method: :get, path: "/whitelist" }, %{ auth: false, cost: 1, method: :get, path: "/whitelist/{currency}" }, %{ auth: false, cost: 1, method: :get, path: "/withdrawals" }, %{ auth: false, cost: 1, method: :get, path: "/withdrawals/{withdrawalId}" }, %{ auth: false, cost: 1, method: :post, path: "/deposits/{currency}" }, %{ auth: false, cost: 1, method: :post, path: "/orders" }, %{ auth: false, cost: 1, method: :post, path: "/withdrawals" }, %{ auth: false, cost: 1, method: :delete, path: "/orders" }, %{ auth: false, cost: 1, method: :delete, path: "/orders/{orderId}" } ], public: [ %{ auth: false, cost: 1, method: :get, path: "/l2/{symbol}" }, %{ auth: false, cost: 1, method: :get, path: "/l3/{symbol}" }, %{ auth: false, cost: 1, method: :get, path: "/symbols" }, %{ auth: false, cost: 1, method: :get, path: "/symbols/{symbol}" }, %{ auth: false, cost: 1, method: :get, path: "/tickers" }, %{ auth: false, cost: 1, method: :get, path: "/tickers/{symbol}" } ] }, required_credentials: %{ api_key: false, password: false, secret: true, uid: false }, requires_eddsa: false, response_error: nil, signing: %{ confidence: :medium, pattern: :hmac_sha256_headers }, spec_format_version: 2, status: %{ "eta" => nil, "status" => "ok", "updated" => nil, "url" => nil }, symbol_format: nil, symbol_formats: %{ precision_mode: 4, sample_limits: %{ "amount" => %{ "min" => 0.018 }, "cost" => %{}, "price" => %{} }, sample_precision: %{ "amount" => 1.0e-8, "price" => 0.01 }, spot: %{ base: "BCH", base_id: "BCH", case: :upper, contract: false, id: "BCH-USD", limits: %{ "amount" => %{ "min" => 0.018 }, "cost" => %{}, "leverage" => %{}, "price" => %{} }, precision: %{ "amount" => 1.0e-8, "price" => 0.01 }, quote: "USD", quote_id: "USD", separator: "-", symbol: "BCH/USD" } }, symbol_patterns: %{ spot: %{ case: :upper, component_order: nil, date_format: nil, pattern: :dash_upper, prefix: nil, separator: "-", suffix: nil } }, timeframes: %{}, url_strategy: %{ detected_from: "fallback", pattern: :no_prefix, prefix: nil }, urls: %{ api: "https://api.blockchain.com/v3/exchange", api_sections: %{ "private" => "https://api.blockchain.com/v3/exchange", "public" => "https://api.blockchain.com/v3/exchange" }, doc: [ "https://api.blockchain.com/v3" ], other: nil, sandbox: %{ "private" => "https://testnet-api.delta.exchange", "public" => "https://testnet-api.delta.exchange" }, www: "https://blockchain.com" }, version: "v3", ws: %{ channel_templates: %{ watch_balance: %{ auth_required: true, market_id_format: :native, params: [], pattern: :action_subscribe }, watch_ohlcv: %{ market_id_format: :native, params: [ %{ "default" => nil, "name" => "limit" } ], pattern: :action_subscribe }, watch_order_book: %{ market_id_format: :native, params: [ %{ "default" => "l2", "name" => "type" }, %{ "default" => nil, "name" => "limit" } ], pattern: :action_subscribe }, watch_orders: %{ auth_required: true, market_id_format: :native, params: [ %{ "default" => nil, "name" => "limit" } ], pattern: :action_subscribe }, watch_ticker: %{ market_id_format: :native, params: [], pattern: :action_subscribe }, watch_trades: %{ market_id_format: :native, params: [ %{ "default" => nil, "name" => "limit" } ], pattern: :action_subscribe } }, 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: false, watch_ohlcv: true, 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: false, watch_trades: true, watch_trades_for_symbols: false }, message_patterns: [ %{ args_field: "channel", format: :action, keys: [ "action", "channel" ], kind_field: "action", kind_value: "subscribe", sources: [ :send, :watch ] }, %{ args_field: "channel", format: :action, keys: [ "action", "channel", "granularity", "symbol" ], kind_field: "action", kind_value: "subscribe", sources: [ :send, :watch ] }, %{ args_field: "channel", format: :action, keys: [ "action", "channel", "symbol" ], kind_field: "action", kind_value: "subscribe", sources: [ :send, :watch ] }, %{ args_field: "channel", format: :action, keys: [ "action", "channel", "token" ], kind_field: "action", kind_value: "subscribe", sources: [ :send, :watch ] } ], options: %{ "ws" => %{ "noOriginHeader" => false, "options" => %{ "headers" => %{ "Origin" => "https://exchange.blockchain.com" } } } }, subscription_config: %{ args_field: "params", args_format: :params_object, market_id_format: :native, op_field: "action" }, subscription_pattern: :action_subscribe, urls: "wss://ws.blockchain.info/mercury-gateway/v1/ws", watch_methods: [ "watchBalance", "watchOHLCV", "watchOrderBook", "watchOrders", "watchTicker", "watchTrades" ] } }