# Bequant Exchange Specification # # Auto-generated by: mix ccxt.extract bequant # 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: [ "MT" ], currencies: %{}, currency_aliases: %{ "AUTO" => "Cube", "BCC" => "BCC", "BCHSV" => "BSV", "BDP" => "BidiPass", "BET" => "DAO.Casino", "BIT" => "BitRewards", "BOX" => "BOX Token", "CPT" => "Cryptaur", "GET" => "Themis", "GMT" => "GMT Token", "HSR" => "HC", "IQ" => "IQ.Cash", "LNC" => "LinkerCoin", "PLA" => "PlayChip", "PNT" => "Penta", "SBTC" => "Super Bitcoin", "STEPN" => "GMT", "STX" => "STOX", "TV" => "Tokenville", "XBT" => "BTC", "XMT" => "MTL", "XPNT" => "PNT" }, dex: false, enable_rate_limit: true, endpoint_extraction_stats: %{ "capturedMethods" => 48, "coveragePercent" => 100, "enabledMethods" => 53, "excluded" => [ %{ "method" => "fetchDepositWithdrawFee", "reason" => "emulated (returns cached data, no HTTP call)" }, %{ "method" => "fetchMarginMode", "reason" => "emulated (returns cached data, no HTTP call)" }, %{ "method" => "fetchTransactions", "reason" => "emulated (returns cached data, no HTTP call)" } ], "excludedMethods" => 3, "extractableMethods" => 50, "failures" => [ %{ "error" => "bequant fetchPosition() not support this market type", "method" => "fetchPosition" }, %{ "error" => "bequant setLeverage() requires a margin_balance parameter that will transfer margin to the specified trading pair", "method" => "setLeverage" } ] }, endpoints: [ %{ api_section: "private", auth: true, cost: 1, expects: :list, market_type: :spot, method: :delete, name: :cancel_all_orders, param_mappings: %{}, params: [ :symbol ], path: "/spot/order", response_transformer: {:extract_path, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :single, market_type: :spot, method: :delete, name: :cancel_order, param_mappings: %{ "id" => "client_order_id" }, params: [ :id, :symbol ], path: "/spot/order/{client_order_id}", response_transformer: {:extract_path_unwrap, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 30, expects: :single, market_type: :spot, method: :post, name: :create_deposit_address, param_mappings: %{ "code" => "currency" }, params: [ :code ], path: "/wallet/crypto/address", response_transformer: {:extract_path_unwrap, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ _by_market_type: %{ spot: %{ "type" => "limit" }, swap: %{ "margin_mode" => "cross", "type" => "limit" } } }, expects: :single, market_type: :spot, method: :post, name: :create_limit_order, param_mappings: %{ "amount" => "quantity" }, params: [ :symbol, :side, :amount, :price ], path: "/spot/order", response_transformer: {:extract_path_unwrap, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ _by_market_type: %{ spot: %{ "type" => "market" }, swap: %{ "margin_mode" => "cross", "type" => "market" } } }, expects: :single, market_type: :spot, method: :post, name: :create_market_order, param_mappings: %{ "amount" => "quantity" }, params: [ :symbol, :side, :amount, :price ], path: "/spot/order", response_transformer: {:extract_path_unwrap, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ _by_market_type: %{ spot: %{}, swap: %{ "margin_mode" => "cross" } } }, expects: :single, market_type: :spot, method: :post, name: :create_order, param_mappings: %{ "amount" => "quantity" }, params: [ :symbol, :type, :side, :amount, :price ], path: "/spot/order", response_transformer: {:extract_path_unwrap, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ _by_market_type: %{ spot: %{ "post_only" => true }, swap: %{ "margin_mode" => "cross", "post_only" => true } } }, expects: :single, market_type: :spot, method: :post, name: :create_post_only_order, param_mappings: %{ "amount" => "quantity" }, params: [ :symbol, :type, :side, :amount, :price ], path: "/spot/order", response_transformer: {:extract_path_unwrap, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ "margin_mode" => "cross", "reduce_only" => true }, expects: :single, market_type: :swap, method: :post, name: :create_reduce_only_order, param_mappings: %{ "amount" => "quantity" }, params: [ :symbol, :type, :side, :amount, :price ], path: "/futures/order", response_transformer: {:extract_path_unwrap, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ "margin_mode" => "cross", "triggerDirection" => "below", "type" => "stopLimit" }, expects: :single, market_type: :swap, method: :post, name: :create_stop_limit_order, param_mappings: %{ "amount" => "quantity", "triggerPrice" => "stop_price" }, params: [ :symbol, :side, :amount, :price, :triggerPrice ], path: "/futures/order", response_transformer: {:extract_path_unwrap, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ "margin_mode" => "cross", "triggerDirection" => "below", "type" => "stopMarket" }, expects: :single, market_type: :swap, method: :post, name: :create_stop_market_order, param_mappings: %{ "amount" => "quantity", "triggerPrice" => "stop_price" }, params: [ :symbol, :side, :amount, :triggerPrice ], path: "/futures/order", response_transformer: {:extract_path_unwrap, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, default_params: %{ "margin_mode" => "cross", "triggerDirection" => "below", "type" => "stopLimit" }, expects: :single, market_type: :swap, method: :post, name: :create_stop_order, param_mappings: %{ "amount" => "quantity", "triggerPrice" => "stop_price" }, params: [ :symbol, :type, :side, :amount, :price, :triggerPrice ], path: "/futures/order", response_transformer: {:extract_path_unwrap, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :single, market_type: :spot, method: :patch, name: :edit_order, param_mappings: %{ "amount" => "quantity", "id" => "client_order_id" }, params: [ :id, :symbol, :type, :side, :amount, :price ], path: "/spot/order/{client_order_id}", response_transformer: {:extract_path_unwrap, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 15, expects: :single, market_type: :spot, method: :get, name: :fetch_balance, param_mappings: %{}, params: [], path: "/spot/balance", response_transformer: {:extract_path_unwrap, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 15, expects: :list, market_type: :spot, method: :get, name: :fetch_closed_orders, param_mappings: %{}, params: [ :symbol, :since, :limit ], path: "/spot/history/order", response_transformer: {:extract_path, ["config"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 10, expects: :list, market_type: :spot, method: :get, name: :fetch_currencies, param_mappings: %{}, params: [], path: "/public/currency", response_transformer: {:extract_path, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 30, expects: :single, market_type: :spot, method: :get, name: :fetch_deposit_address, param_mappings: %{ "code" => "currency" }, params: [ :code ], path: "/wallet/crypto/address", response_transformer: {:extract_path_unwrap, ["config"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 10, expects: :list, market_type: :spot, method: :get, name: :fetch_deposit_withdraw_fees, param_mappings: %{}, params: [ :codes ], path: "/public/currency", response_transformer: {:extract_path, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 30, default_params: %{ "types" => "DEPOSIT" }, expects: :list, market_type: :spot, method: :get, name: :fetch_deposits, param_mappings: %{ "code" => "currencies" }, params: [ :code, :since, :limit ], path: "/wallet/transactions", response_transformer: {:extract_path, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 30, default_params: %{ "types" => "DEPOSIT,WITHDRAW" }, expects: :list, market_type: :spot, method: :get, name: :fetch_deposits_withdrawals, param_mappings: %{ "code" => "currencies" }, params: [ :code, :since, :limit ], path: "/wallet/transactions", response_transformer: {:extract_path, ["config"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 10, expects: :single, market_type: :swap, method: :get, name: :fetch_funding_rate, param_mappings: %{}, params: [ :symbol ], path: "/public/futures/info/{symbol}", response_transformer: {:extract_path_unwrap, ["config"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 10, default_params: %{ "symbols" => "BTCUSDT" }, expects: :list, market_type: :swap, method: :get, name: :fetch_funding_rate_history, pagination: %{ style: :time_window }, param_mappings: %{}, params: [ :symbol, :since, :limit ], path: "/public/futures/history/funding", response_transformer: {:extract_path, ["config"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 10, default_params: %{ "symbols" => "BTCUSDT" }, expects: :list, market_type: :swap, method: :get, name: :fetch_funding_rates, param_mappings: %{}, params: [ :symbols ], path: "/public/futures/info", response_transformer: {:extract_path, ["config"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 10, default_params: %{ "period" => "M1" }, expects: :list, market_type: :swap, method: :get, name: :fetch_index_ohlcv, pagination: %{ style: :time_window }, param_mappings: %{ "timeframe" => "period" }, params: [ :symbol, :timeframe, :since, :limit ], path: "/public/futures/candles/index_price/{symbol}", response_transformer: {:extract_path, ["config"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 10, expects: :single, market_type: :spot, method: :get, name: :fetch_l2_order_book, param_mappings: %{}, params: [ :symbol, :limit ], path: "/public/orderbook/{symbol}", response_transformer: {:extract_path_unwrap, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :single, market_type: :swap, method: :get, name: :fetch_leverage, param_mappings: %{}, params: [ :symbol ], path: "/futures/account/isolated/{symbol}", response_transformer: {:extract_path_unwrap, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 15, expects: :list, market_type: :swap, method: :get, name: :fetch_margin_modes, param_mappings: %{}, params: [ :symbols ], path: "/futures/config", response_transformer: {:extract_path, ["config"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 10, default_params: %{ "period" => "M1" }, expects: :list, market_type: :swap, method: :get, name: :fetch_mark_ohlcv, pagination: %{ style: :time_window }, param_mappings: %{ "timeframe" => "period" }, params: [ :symbol, :timeframe, :since, :limit ], path: "/public/futures/candles/mark_price/{symbol}", response_transformer: {:extract_path, ["config"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 10, expects: :list, market_type: :spot, method: :get, name: :fetch_markets, param_mappings: %{}, params: [], path: "/public/symbol", response_transformer: {:extract_path, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 15, expects: :list, market_type: :spot, method: :get, name: :fetch_my_trades, param_mappings: %{}, params: [ :symbol, :since, :limit ], path: "/spot/history/trade", response_transformer: {:extract_path, ["config"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 10, default_params: %{ "limit" => 1000, "period" => "H1" }, expects: :list, market_type: :spot, method: :get, name: :fetch_ohlcv, pagination: %{ style: :time_window }, param_mappings: %{ "since" => "from", "timeframe" => "period" }, params: [ :symbol, :timeframe, :since, :limit ], path: "/public/candles/{symbol}", response_transformer: {:extract_path, ["config"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 10, expects: :single, market_type: :swap, method: :get, name: :fetch_open_interest, param_mappings: %{}, params: [ :symbol ], path: "/public/futures/info/{symbol}", response_transformer: {:extract_path_unwrap, ["config"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 10, default_params: %{ "symbols" => "BTCUSDT" }, expects: :list, market_type: :spot, method: :get, name: :fetch_open_interests, param_mappings: %{}, params: [ :symbols ], path: "/public/futures/info", response_transformer: {:extract_path, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :single, market_type: :spot, method: :get, name: :fetch_open_order, param_mappings: %{ "id" => "client_order_id" }, params: [ :id, :symbol ], path: "/spot/order/{client_order_id}", response_transformer: {:extract_path_unwrap, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :list, market_type: :spot, method: :get, name: :fetch_open_orders, param_mappings: %{}, params: [ :symbol, :since, :limit ], path: "/spot/order", response_transformer: {:extract_path, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 15, expects: :single, market_type: :spot, method: :get, name: :fetch_order, param_mappings: %{ "id" => "client_order_id" }, params: [ :id, :symbol ], path: "/spot/history/order", response_transformer: {:extract_path_unwrap, ["config"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 10, expects: :single, market_type: :spot, method: :get, name: :fetch_order_book, param_mappings: %{ "limit" => "depth" }, params: [ :symbol, :limit ], path: "/public/orderbook/{symbol}", response_transformer: {:extract_path_unwrap, ["config"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 10, default_params: %{ "symbols" => "BTCUSDT" }, expects: :list, market_type: :spot, method: :get, name: :fetch_order_books, param_mappings: %{}, params: [ :symbols, :limit ], path: "/public/orderbook", response_transformer: {:extract_path, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 15, expects: :list, market_type: :spot, method: :get, name: :fetch_order_trades, param_mappings: %{ "id" => "order_id" }, params: [ :id, :symbol, :since, :limit ], path: "/spot/history/trade", response_transformer: {:extract_path, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 1, expects: :list, market_type: :swap, method: :get, name: :fetch_positions, param_mappings: %{}, params: [ :symbols ], path: "/futures/account", response_transformer: {:extract_path, ["config"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 10, default_params: %{ "period" => "M1" }, expects: :list, market_type: :swap, method: :get, name: :fetch_premium_index_ohlcv, pagination: %{ style: :time_window }, param_mappings: %{ "timeframe" => "period" }, params: [ :symbol, :timeframe, :since, :limit ], path: "/public/futures/candles/premium_index/{symbol}", response_transformer: {:extract_path, ["config"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 10, expects: :single, market_type: :spot, method: :get, name: :fetch_ticker, param_mappings: %{}, params: [ :symbol ], path: "/public/ticker/{symbol}", response_transformer: {:extract_path_unwrap, ["config"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 10, default_params: %{ "symbols" => "BTCUSDT" }, expects: :list, market_type: :spot, method: :get, name: :fetch_tickers, param_mappings: %{}, params: [ :symbols ], path: "/public/ticker", response_transformer: {:extract_path, ["config"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 10, expects: :list, market_type: :spot, method: :get, name: :fetch_trades, param_mappings: %{ "since" => "from" }, params: [ :symbol, :since, :limit ], path: "/public/trades/{symbol}", response_transformer: {:extract_path, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 15, expects: :single, market_type: :spot, method: :get, name: :fetch_trading_fee, param_mappings: %{}, params: [ :symbol ], path: "/spot/fee/{symbol}", response_transformer: {:extract_path_unwrap, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 15, expects: :list, market_type: :spot, method: :get, name: :fetch_trading_fees, param_mappings: %{}, params: [], path: "/spot/fee", response_transformer: {:extract_path, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 30, default_params: %{ "types" => "WITHDRAW" }, expects: :list, market_type: :spot, method: :get, name: :fetch_withdrawals, param_mappings: %{ "code" => "currencies" }, params: [ :code, :since, :limit ], path: "/wallet/transactions", response_transformer: {:extract_path, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 30, default_params: %{ "destination" => "derivatives" }, expects: :single, market_type: :spot, method: :post, name: :transfer, param_mappings: %{ "code" => "currency", "fromAccount" => "source", "toAccount" => "destination" }, params: [ :code, :amount, :fromAccount, :toAccount ], path: "/wallet/transfer", response_transformer: {:extract_path_unwrap, ["config"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 30, expects: :single, market_type: :spot, method: :post, name: :withdraw, param_mappings: %{ "code" => "currency" }, params: [ :code, :amount, :address, :tag ], path: "/wallet/crypto/withdraw", response_transformer: {:extract_path_unwrap, ["config"]}, source: :intercepted } ], error_code_details: %{ 10001 => %{ description: nil, type: :invalid_parameters }, 1002 => %{ description: nil, type: :invalid_credentials }, 10021 => %{ description: nil, type: :access_restricted }, 10022 => %{ description: nil, type: :invalid_parameters }, 1003 => %{ description: nil, type: :access_restricted }, 1004 => %{ description: nil, type: :invalid_credentials }, 1005 => %{ description: nil, type: :invalid_credentials }, 20001 => %{ description: nil, type: :insufficient_balance }, 20002 => %{ description: nil, type: :order_not_found }, 20003 => %{ description: nil, type: :exchange_error }, 20004 => %{ description: nil, type: :exchange_error }, 20005 => %{ description: nil, type: :exchange_error }, 20006 => %{ description: nil, type: :exchange_error }, 20007 => %{ description: nil, type: :exchange_error }, 20008 => %{ description: nil, type: :invalid_order }, 20009 => %{ description: nil, type: :invalid_order }, 2001 => %{ description: nil, type: :invalid_order }, 20010 => %{ description: nil, type: :network_error }, 20011 => %{ description: nil, type: :exchange_error }, 20012 => %{ description: nil, type: :exchange_error }, 20014 => %{ description: nil, type: :exchange_error }, 20016 => %{ description: nil, type: :exchange_error }, 20018 => %{ description: nil, type: :exchange_error }, 2002 => %{ description: nil, type: :invalid_parameters }, 2003 => %{ description: nil, type: :invalid_parameters }, 20031 => %{ description: nil, type: :exchange_error }, 20032 => %{ description: nil, type: :exchange_error }, 20033 => %{ description: nil, type: :exchange_error }, 20034 => %{ description: nil, type: :exchange_error }, 20040 => %{ description: nil, type: :exchange_error }, 20041 => %{ description: nil, type: :exchange_error }, 20042 => %{ description: nil, type: :exchange_error }, 20043 => %{ description: nil, type: :exchange_error }, 20044 => %{ description: nil, type: :access_restricted }, 20045 => %{ description: nil, type: :invalid_order }, 20047 => %{ description: nil, type: :invalid_order }, 20048 => %{ description: nil, type: :invalid_order }, 20049 => %{ description: nil, type: :invalid_order }, 20080 => %{ description: nil, type: :exchange_error }, 2010 => %{ description: nil, type: :invalid_parameters }, 2011 => %{ description: nil, type: :invalid_parameters }, 2012 => %{ description: nil, type: :invalid_parameters }, 2020 => %{ description: nil, type: :invalid_parameters }, 2022 => %{ description: nil, type: :invalid_parameters }, 2024 => %{ description: nil, type: :invalid_order }, 21001 => %{ description: nil, type: :exchange_error }, 21003 => %{ description: nil, type: :access_restricted }, 21004 => %{ description: nil, type: :access_restricted }, 22004 => %{ description: nil, type: :exchange_error }, 22008 => %{ description: nil, type: :exchange_error }, 429 => %{ description: nil, type: :rate_limited }, 500 => %{ description: nil, type: :exchange_error }, 503 => %{ description: nil, type: :network_error }, 504 => %{ description: nil, type: :network_error }, 600 => %{ description: nil, type: :access_restricted }, 800 => %{ description: nil, type: :exchange_error } }, error_codes: %{ 10001 => :invalid_parameters, 1002 => :invalid_credentials, 10021 => :access_restricted, 10022 => :invalid_parameters, 1003 => :access_restricted, 1004 => :invalid_credentials, 1005 => :invalid_credentials, 20001 => :insufficient_balance, 20002 => :order_not_found, 20003 => :exchange_error, 20004 => :exchange_error, 20005 => :exchange_error, 20006 => :exchange_error, 20007 => :exchange_error, 20008 => :invalid_order, 20009 => :invalid_order, 2001 => :invalid_order, 20010 => :network_error, 20011 => :exchange_error, 20012 => :exchange_error, 20014 => :exchange_error, 20016 => :exchange_error, 20018 => :exchange_error, 2002 => :invalid_parameters, 2003 => :invalid_parameters, 20031 => :exchange_error, 20032 => :exchange_error, 20033 => :exchange_error, 20034 => :exchange_error, 20040 => :exchange_error, 20041 => :exchange_error, 20042 => :exchange_error, 20043 => :exchange_error, 20044 => :access_restricted, 20045 => :invalid_order, 20047 => :invalid_order, 20048 => :invalid_order, 20049 => :invalid_order, 20080 => :exchange_error, 2010 => :invalid_parameters, 2011 => :invalid_parameters, 2012 => :invalid_parameters, 2020 => :invalid_parameters, 2022 => :invalid_parameters, 2024 => :invalid_order, 21001 => :exchange_error, 21003 => :access_restricted, 21004 => :access_restricted, 22004 => :exchange_error, 22008 => :exchange_error, 429 => :rate_limited, 500 => :exchange_error, 503 => :network_error, 504 => :network_error, 600 => :access_restricted, 800 => :exchange_error }, exceptions: %{ exact: %{ "10001" => :bad_request, "1002" => :authentication_error, "10021" => :account_suspended, "10022" => :bad_request, "1003" => :permission_denied, "1004" => :authentication_error, "1005" => :authentication_error, "20001" => :insufficient_funds, "20002" => :order_not_found, "20003" => :exchange_error, "20004" => :exchange_error, "20005" => :exchange_error, "20006" => :exchange_error, "20007" => :exchange_error, "20008" => :invalid_order, "20009" => :invalid_order, "2001" => :bad_symbol, "20010" => :on_maintenance, "20011" => :exchange_error, "20012" => :exchange_error, "20014" => :exchange_error, "20016" => :exchange_error, "20018" => :exchange_error, "2002" => :bad_request, "2003" => :bad_request, "20031" => :exchange_error, "20032" => :exchange_error, "20033" => :exchange_error, "20034" => :exchange_error, "20040" => :exchange_error, "20041" => :exchange_error, "20042" => :exchange_error, "20043" => :exchange_error, "20044" => :permission_denied, "20045" => :invalid_order, "20047" => :invalid_order, "20048" => :invalid_order, "20049" => :invalid_order, "20080" => :exchange_error, "2010" => :bad_request, "2011" => :bad_request, "2012" => :bad_request, "2020" => :bad_request, "2022" => :bad_request, "2024" => :invalid_order, "21001" => :exchange_error, "21003" => :account_suspended, "21004" => :account_suspended, "22004" => :exchange_error, "22008" => :exchange_error, "429" => :rate_limit_exceeded, "500" => :exchange_error, "503" => :exchange_not_available, "504" => :exchange_not_available, "600" => :permission_denied, "800" => :exchange_error } }, exchange_options: %{ "accountsByType" => %{ "funding" => "wallet", "future" => "derivatives", "spot" => "spot", "swap" => "derivatives" }, "defaultNetwork" => "ERC20", "defaultNetworkCodeReplacements" => %{ "BRC20" => %{ "BRC20" => "BTC" }, "CRO" => %{ "CRC20" => "CRONOS" }, "ETH" => %{ "ERC20" => "ETH" }, "TRX" => %{ "TRC20" => "TRX" } }, "defaultNetworks" => %{ "ETH" => "ETH", "USDT" => "TRC20" }, "networks" => %{ "ABBC" => "ABBC", "ADA" => "ADA", "AE" => "AE", "ALGO" => "ALGO", "APT" => "APT", "AR" => "AR", "ATOM" => "ATOM", "AVAXC" => "AVAC", "AVAXX" => "AVAX", "BEP2" => "BNB", "BEP20" => "BSC", "BSV" => "BCHSV", "BTC" => "btc", "CELO" => "CELO", "CHZ" => "CHZ", "CKB" => "CKB", "CTXC" => "CTXC", "DASH" => "DASH", "DCR" => "DCR", "DGB" => "DGB", "DOGE" => "doge", "EGLD" => "EGLD", "EOS" => "EOS", "ERC20" => "ETH", "ETC" => "ETC", "ETH" => "eth", "ETHW" => "ETHW", "EVER" => "EVER", "FET" => "FET", "FIL" => "FIL", "FLOW" => "FLOW", "GLMR" => "GLMR", "GRIN" => "GRIN", "HBAR" => "HBAR", "HIVE" => "HIVE", "HYDRA" => "HYDRA", "ICP" => "ICP", "ICX" => "ICX", "IOST" => "IOST", "IOTA" => "IOTA", "IOTX" => "IOTX", "KAVA" => "KAVA", "KLAY" => "KIM", "KOMODO" => "KMD", "KSM" => "KSM", "LSK" => "LSK", "LTC" => "ltc", "MATIC" => "POLYGON", "MINA" => "MINA", "MOVR" => "MOVR", "NANO" => "NANO", "NEAR" => "NEAR", "NEM" => "XEM", "NEO" => "NEO", "OASIS" => "ROSE", "OMNI" => "BTC", "ONE" => "ONE", "ONT" => "ONT", "OPTIMISM" => "OP", "PLCU" => "PLCU", "QTUM" => "QTUM", "REI" => "REI", "RVN" => "RVN", "SC" => "SC", "SCRT" => "SCRT", "SOL" => "SOL", "STEEM" => "STEEM", "THETA" => "Theta", "TRC20" => "TRX", "TRUE" => "TRUE", "VET" => "VET", "VSYS" => "VSYS", "WAVES" => "WAVES", "WAX" => "WAX", "XCH" => "XCH", "XEC" => "XEC", "XLM" => "XLM", "XMR" => "xmr", "XRD" => "XRD", "XRP" => "XRP", "XTZ" => "XTZ", "XVG" => "XVG", "XYM" => "XYM", "ZEC" => "ZEC", "ZEN" => "ZEN", "ZIL" => "ZIL" }, "networksById" => %{ "ABBC" => "ABBC", "ADA" => "ADA", "AE" => "AE", "ALGO" => "ALGO", "APT" => "APT", "AR" => "AR", "ATOM" => "ATOM", "AVAC" => "AVAXC", "AVAX" => "AVAXX", "BCHSV" => "BSV", "BNB" => "BEP2", "BSC" => "BEP20", "BTC" => "OMNI", "CELO" => "CELO", "CHZ" => "CHZ", "CKB" => "CKB", "CTXC" => "CTXC", "DASH" => "DASH", "DCR" => "DCR", "DGB" => "DGB", "EGLD" => "EGLD", "EOS" => "EOS", "ETC" => "ETC", "ETH" => "ERC20", "ETHW" => "ETHW", "EVER" => "EVER", "FET" => "FET", "FIL" => "FIL", "FLOW" => "FLOW", "GLMR" => "GLMR", "GRIN" => "GRIN", "HBAR" => "HBAR", "HIVE" => "HIVE", "HYDRA" => "HYDRA", "ICP" => "ICP", "ICX" => "ICX", "IOST" => "IOST", "IOTA" => "IOTA", "IOTX" => "IOTX", "KAVA" => "KAVA", "KIM" => "KLAY", "KMD" => "KOMODO", "KSM" => "KSM", "LSK" => "LSK", "MINA" => "MINA", "MOVR" => "MOVR", "NANO" => "NANO", "NEAR" => "NEAR", "NEO" => "NEO", "ONE" => "ONE", "ONT" => "ONT", "OP" => "OPTIMISM", "PLCU" => "PLCU", "POLYGON" => "MATIC", "QTUM" => "QTUM", "REI" => "REI", "ROSE" => "OASIS", "RVN" => "RVN", "SC" => "SC", "SCRT" => "SCRT", "SOL" => "SOL", "STEEM" => "STEEM", "TRUE" => "TRUE", "TRX" => "TRC20", "Theta" => "THETA", "VET" => "VET", "VSYS" => "VSYS", "WAVES" => "WAVES", "WAX" => "WAX", "XCH" => "XCH", "XEC" => "XEC", "XEM" => "NEM", "XLM" => "XLM", "XRD" => "XRD", "XRP" => "XRP", "XTZ" => "XTZ", "XVG" => "XVG", "XYM" => "XYM", "ZEC" => "ZEC", "ZEN" => "ZEN", "ZIL" => "ZIL", "btc" => "BTC", "doge" => "DOGE", "eth" => "ETH", "ltc" => "LTC", "xmr" => "XMR" }, "withdraw" => %{ "includeFee" => false } }, extended_metadata: %{ limits: %{ "amount" => %{}, "cost" => %{}, "leverage" => %{}, "price" => %{} }, logo_url: "https://github.com/user-attachments/assets/0583ef1f-29fe-4b7c-8189-63565a0e2867", referral_url: "https://bequant.io/referral/dd104e3bee7634ec" }, extracted_metadata: %{ ccxt_version: "4.5.42" }, features: %{ default: %{ create_order: %{ hedged: false, iceberg: true, 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: true }, fetch_closed_orders: %{ days_back: 100000, days_back_canceled: 1, limit: 1000, margin_mode: true, market_type: true, symbol_required: false, trailing: false, trigger: false, until_days: 100000 }, fetch_my_trades: %{ days_back: 100000, limit: 1000, margin_mode: true, market_type: true, symbol_required: false, until_days: 100000 }, fetch_ohlcv: %{ limit: 1000 }, fetch_open_orders: %{ limit: 1000, margin_mode: true, market_type: true, symbol_required: false, trailing: false, trigger: false }, fetch_order: %{ margin_mode: true, market_type: true, symbol_required: false, trailing: false, trigger: false }, sandbox: true }, for_derivatives: %{ create_order: %{ margin_mode: true }, extends: "default", fetch_closed_orders: %{ margin_mode: false }, fetch_my_trades: %{ margin_mode: false }, fetch_open_orders: %{ margin_mode: false }, fetch_order: %{ margin_mode: false } }, future: %{ inverse: %{ extends: "forDerivatives" }, linear: %{ extends: "forDerivatives" } }, spot: %{ extends: "default" }, swap: %{ inverse: %{ extends: "forDerivatives" }, linear: %{ extends: "forDerivatives" } } }, fees: %{ trading: %{ maker: 0.0009, percentage: true, taker: 0.0009, tier_based: true, tiers: %{ maker: [ %{ fee: 0.0009, volume: 0 }, %{ fee: 0.0007, volume: 10 }, %{ fee: 0.0006, volume: 100 }, %{ fee: 0.0005, volume: 500 }, %{ fee: 0.0003, volume: 1000 }, %{ fee: 0.0002, volume: 5000 }, %{ fee: 0.0001, volume: 10000 }, %{ fee: 0, volume: 20000 }, %{ fee: -0.0001, volume: 50000 }, %{ fee: -0.0001, volume: 100000 } ], taker: [ %{ fee: 0.0009, volume: 0 }, %{ fee: 0.0008, volume: 10 }, %{ fee: 0.0007, volume: 100 }, %{ fee: 0.0007, volume: 500 }, %{ fee: 0.0006, volume: 1000 }, %{ fee: 0.0006, volume: 5000 }, %{ fee: 0.0005, volume: 10000 }, %{ fee: 0.0004, volume: 20000 }, %{ fee: 0.0003, volume: 50000 }, %{ fee: 0.0002, volume: 100000 } ] } } }, forward_aliases: %{ spot: %{ "STOX" => "STX" } }, handle_content_type_application_zip: nil, handle_errors_source: "handleErrors(code, reason, url, method, headers, body, response, requestHeaders, requestBody) {\n //\n // {\n // \"error\": {\n // \"code\": 20001,\n // \"message\": \"Insufficient funds\",\n // \"description\": \"Check that the funds are sufficient, given commissions\"\n // }\n // }\n //\n // {\n // \"error\": {\n // \"code\": \"600\",\n // \"message\": \"Action not allowed\"\n // }\n // }\n //\n const error = this.safeValue(response, 'error');\n const errorCode = this.safeString(error, 'code');\n if (errorCode !== undefined) {\n const feedback = this.id + ' ' + body;\n const message = this.safeString2(error, 'message', 'description');\n this.throwExactlyMatchedException(this.exceptions['exact'], errorCode, feedback);\n this.throwBroadlyMatchedException(this.exceptions['broad'], message, feedback);\n throw new errors.ExchangeError(feedback);\n }\n return undefined;\n }", has: %{ add_margin: true, 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: true, 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: true, create_post_only_order_ws: false, create_reduce_only_order: true, 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: false, fetch_closed_order: false, fetch_closed_orders: true, fetch_closed_orders_ws: false, fetch_convert_currencies: false, fetch_convert_quote: false, fetch_convert_trade: false, fetch_convert_trade_history: false, fetch_cross_borrow_rate: false, fetch_cross_borrow_rates: false, fetch_currencies: 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: true, fetch_deposits_withdrawals: true, fetch_deposits_ws: false, fetch_funding_history: false, fetch_funding_interval: false, fetch_funding_intervals: false, fetch_funding_rate: true, fetch_funding_rate_history: true, fetch_funding_rates: true, fetch_greeks: false, fetch_index_ohlcv: true, fetch_isolated_borrow_rate: false, fetch_isolated_borrow_rates: false, fetch_isolated_positions: false, fetch_l2_order_book: true, fetch_l3_order_book: false, fetch_last_prices: false, fetch_ledger: false, fetch_ledger_entry: false, fetch_leverage: true, 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: true, fetch_margin_modes: true, fetch_mark_ohlcv: true, 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: true, fetch_open_interest_history: false, fetch_open_interests: true, fetch_open_order: true, 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: true, fetch_order_trades: true, 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: true, fetch_position_a_d_l_rank: false, fetch_position_history: false, fetch_position_mode: false, fetch_position_ws: false, fetch_positions: true, 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: true, 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: false, fetch_transactions: true, fetch_transfer: false, fetch_transfers: false, fetch_underlying_assets: false, fetch_volatility_history: false, fetch_withdraw_addresses: false, fetch_withdrawal: false, fetch_withdrawal_whitelist: false, fetch_withdrawals: true, fetch_withdrawals_ws: false, future: false, margin: true, option: false, private_api: true, public_api: true, reduce_margin: true, repay_cross_margin: false, repay_isolated_margin: false, sandbox: true, set_leverage: true, set_margin: false, set_margin_mode: false, set_position_mode: false, sign_in: false, spot: true, swap: true, 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: true, watch_bids_asks: true, 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: true, watch_trades: true, watch_trades_for_symbols: false, withdraw: true, ws: false }, http_config: nil, id: "bequant", markets: nil, name: "Bequant", ohlcv_timestamp_resolution: :unknown, options: %{ accounts_by_type: %{ "funding" => "wallet", "future" => "derivatives", "spot" => "spot", "swap" => "derivatives" }, default_network: "ERC20", default_networks: %{ "ETH" => "ETH", "USDT" => "TRC20" }, networks: %{ "ABBC" => "ABBC", "ADA" => "ADA", "AE" => "AE", "ALGO" => "ALGO", "APT" => "APT", "AR" => "AR", "ATOM" => "ATOM", "AVAXC" => "AVAC", "AVAXX" => "AVAX", "BEP2" => "BNB", "BEP20" => "BSC", "BSV" => "BCHSV", "BTC" => "btc", "CELO" => "CELO", "CHZ" => "CHZ", "CKB" => "CKB", "CTXC" => "CTXC", "DASH" => "DASH", "DCR" => "DCR", "DGB" => "DGB", "DOGE" => "doge", "EGLD" => "EGLD", "EOS" => "EOS", "ERC20" => "ETH", "ETC" => "ETC", "ETH" => "eth", "ETHW" => "ETHW", "EVER" => "EVER", "FET" => "FET", "FIL" => "FIL", "FLOW" => "FLOW", "GLMR" => "GLMR", "GRIN" => "GRIN", "HBAR" => "HBAR", "HIVE" => "HIVE", "HYDRA" => "HYDRA", "ICP" => "ICP", "ICX" => "ICX", "IOST" => "IOST", "IOTA" => "IOTA", "IOTX" => "IOTX", "KAVA" => "KAVA", "KLAY" => "KIM", "KOMODO" => "KMD", "KSM" => "KSM", "LSK" => "LSK", "LTC" => "ltc", "MATIC" => "POLYGON", "MINA" => "MINA", "MOVR" => "MOVR", "NANO" => "NANO", "NEAR" => "NEAR", "NEM" => "XEM", "NEO" => "NEO", "OASIS" => "ROSE", "OMNI" => "BTC", "ONE" => "ONE", "ONT" => "ONT", "OPTIMISM" => "OP", "PLCU" => "PLCU", "QTUM" => "QTUM", "REI" => "REI", "RVN" => "RVN", "SC" => "SC", "SCRT" => "SCRT", "SOL" => "SOL", "STEEM" => "STEEM", "THETA" => "Theta", "TRC20" => "TRX", "TRUE" => "TRUE", "VET" => "VET", "VSYS" => "VSYS", "WAVES" => "WAVES", "WAX" => "WAX", "XCH" => "XCH", "XEC" => "XEC", "XLM" => "XLM", "XMR" => "xmr", "XRD" => "XRD", "XRP" => "XRP", "XTZ" => "XTZ", "XVG" => "XVG", "XYM" => "XYM", "ZEC" => "ZEC", "ZEN" => "ZEN", "ZIL" => "ZIL" }, withdraw: %{ "includeFee" => false } }, order_mappings: %{ side_format: :lowercase, side_key: "side", type_format: :lowercase, type_key: "type" }, param_mappings: %{ "amount" => "quantity", "code" => "currency", "fromAccount" => "source", "id" => "order_id", "limit" => "depth", "since" => "from", "timeframe" => "period", "toAccount" => "destination", "triggerPrice" => "stop_price" }, parse_methods: [ %{ "comment" => nil, "examples" => [], "inherited" => true, "inherited_from" => "hitbtc", "line_end" => 1107, "line_start" => 1095, "mappings" => [], "name" => "parseBalance", "signature" => "parseBalance (response): Balances", "source" => "parseBalance (response): Balances {\n const result: Dict = { 'info': response };\n for (let i = 0; i < response.length; i++) {\n const entry = response[i];\n const currencyId = this.safeString (entry, 'currency');\n const code = this.safeCurrencyCode (currencyId);\n const account = this.account ();\n account['free'] = this.safeString (entry, 'available');\n account['used'] = this.safeString (entry, 'reserved');\n result[code] = account;\n }\n return this.safeBalance (result);\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"full_name\": \"ConnectWealth\",\n \"payin_enabled\": false,\n \"payout_enabled\": false,\n \"transfer_enabled\": true,\n \"precision_transfer\": \"0.001\",\n \"networks\": [\n {\n \"network\": \"ETH\",\n \"protocol\": \"ERC20\",\n \"default\": true,\n \"payin_enabled\": false,\n \"payout_enabled\": false,\n \"precision_payout\": \"0.001\",\n \"payout_fee\": \"0.016800000000\",\n \"payout_is_payment_id\": false,\n \"payin_payment_id\": false,\n \"payin_confirmations\": \"2\"\n }\n ]\n }" ], "inherited" => true, "inherited_from" => "hitbtc", "line_end" => 3712, "line_start" => 3663, "mappings" => [ %{ "comment" => nil, "key" => "fee", "value" => "withdrawFee" }, %{ "comment" => nil, "key" => "percentage", "value" => "(withdrawFee !== undefined) ? false : undefined" } ], "name" => "parseDepositWithdrawFee", "signature" => "parseDepositWithdrawFee (fee, currency: Currency = undefined)", "source" => "parseDepositWithdrawFee (fee, currency: Currency = undefined) {\n //\n // {\n // \"full_name\": \"ConnectWealth\",\n // \"payin_enabled\": false,\n // \"payout_enabled\": false,\n // \"transfer_enabled\": true,\n // \"precision_transfer\": \"0.001\",\n // \"networks\": [\n // {\n // \"network\": \"ETH\",\n // \"protocol\": \"ERC20\",\n // \"default\": true,\n // \"payin_enabled\": false,\n // \"payout_enabled\": false,\n // \"precision_payout\": \"0.001\",\n // \"payout_fee\": \"0.016800000000\",\n // \"payout_is_payment_id\": false,\n // \"payin_payment_id\": false,\n // \"payin_confirmations\": \"2\"\n // }\n // ]\n // }\n //\n const networks = this.safeValue (fee, 'networks', []);\n const result = this.depositWithdrawFee (fee);\n for (let j = 0; j < networks.length; j++) {\n const networkEntry = networks[j];\n const networkId = this.safeString (networkEntry, 'network');\n let networkCode = this.networkIdToCode (networkId);\n networkCode = (networkCode !== undefined) ? networkCode.toUpperCase () : undefined;\n const withdrawFee = this.safeNumber (networkEntry, 'payout_fee');\n const isDefault = this.safeValue (networkEntry, 'default');\n const withdrawResult: Dict = {\n 'fee': withdrawFee,\n 'percentage': (withdrawFee !== undefined) ? false : undefined,\n };\n if (isDefault === true) {\n result['withdraw'] = withdrawResult;\n }\n result['networks'][networkCode] = {\n 'withdraw': withdrawResult,\n 'deposit': {\n 'fee': undefined,\n 'percentage': undefined,\n },\n };\n }\n return result;\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"contract_type\": \"perpetual\",\n \"mark_price\": \"42307.43\",\n \"index_price\": \"42303.27\",\n \"funding_rate\": \"0.0001\",\n \"open_interest\": \"30.9826\",\n \"next_funding_time\": \"2022-03-22T16:00:00.000Z\",\n \"indicative_funding_rate\": \"0.0001\",\n \"premium_index\": \"0\",\n \"avg_premium_index\": \"0.000029587712038098\",\n \"interest_rate\": \"0.0001\",\n \"timestamp\": \"2022-03-22T08:08:26.687Z\"\n }" ], "inherited" => true, "inherited_from" => "hitbtc", "line_end" => 3370, "line_start" => 3332, "mappings" => [ %{ "comment" => nil, "key" => "info", "value" => "contract" }, %{ "comment" => nil, "key" => "symbol", "value" => "this.safeSymbol (undefined, market)" }, %{ "comment" => nil, "key" => "markPrice", "value" => "this.safeNumber (contract, 'mark_price')" }, %{ "comment" => nil, "key" => "indexPrice", "value" => "this.safeNumber (contract, 'index_price')" }, %{ "comment" => nil, "key" => "interestRate", "value" => "this.safeNumber (contract, 'interest_rate')" }, %{ "comment" => nil, "key" => "estimatedSettlePrice", "value" => "undefined" }, %{ "comment" => nil, "key" => "timestamp", "value" => "this.parse8601 (datetime)" }, %{ "comment" => nil, "key" => "datetime", "value" => "datetime" }, %{ "comment" => nil, "key" => "fundingRate", "value" => "this.safeNumber (contract, 'funding_rate')" }, %{ "comment" => nil, "key" => "fundingTimestamp", "value" => "this.parse8601 (fundingDateTime)" }, %{ "comment" => nil, "key" => "fundingDatetime", "value" => "fundingDateTime" }, %{ "comment" => nil, "key" => "nextFundingRate", "value" => "this.safeNumber (contract, 'indicative_funding_rate')" }, %{ "comment" => nil, "key" => "nextFundingTimestamp", "value" => "undefined" }, %{ "comment" => nil, "key" => "nextFundingDatetime", "value" => "undefined" }, %{ "comment" => nil, "key" => "previousFundingRate", "value" => "undefined" }, %{ "comment" => nil, "key" => "previousFundingTimestamp", "value" => "undefined" }, %{ "comment" => nil, "key" => "previousFundingDatetime", "value" => "undefined" }, %{ "comment" => nil, "key" => "interval", "value" => "undefined" } ], "name" => "parseFundingRate", "signature" => "parseFundingRate (contract, market: Market = undefined): FundingRate", "source" => "parseFundingRate (contract, market: Market = undefined): FundingRate {\n //\n // {\n // \"contract_type\": \"perpetual\",\n // \"mark_price\": \"42307.43\",\n // \"index_price\": \"42303.27\",\n // \"funding_rate\": \"0.0001\",\n // \"open_interest\": \"30.9826\",\n // \"next_funding_time\": \"2022-03-22T16:00:00.000Z\",\n // \"indicative_funding_rate\": \"0.0001\",\n // \"premium_index\": \"0\",\n // \"avg_premium_index\": \"0.000029587712038098\",\n // \"interest_rate\": \"0.0001\",\n // \"timestamp\": \"2022-03-22T08:08:26.687Z\"\n // }\n //\n const fundingDateTime = this.safeString (contract, 'next_funding_time');\n const datetime = this.safeString (contract, 'timestamp');\n return {\n 'info': contract,\n 'symbol': this.safeSymbol (undefined, market),\n 'markPrice': this.safeNumber (contract, 'mark_price'),\n 'indexPrice': this.safeNumber (contract, 'index_price'),\n 'interestRate': this.safeNumber (contract, 'interest_rate'),\n 'estimatedSettlePrice': undefined,\n 'timestamp': this.parse8601 (datetime),\n 'datetime': datetime,\n 'fundingRate': this.safeNumber (contract, 'funding_rate'),\n 'fundingTimestamp': this.parse8601 (fundingDateTime),\n 'fundingDatetime': fundingDateTime,\n 'nextFundingRate': this.safeNumber (contract, 'indicative_funding_rate'),\n 'nextFundingTimestamp': undefined,\n 'nextFundingDatetime': undefined,\n 'previousFundingRate': undefined,\n 'previousFundingTimestamp': undefined,\n 'previousFundingDatetime': undefined,\n 'interval': undefined,\n } as FundingRate;\n }" }, %{ "comment" => nil, "examples" => [], "inherited" => true, "inherited_from" => "hitbtc", "line_end" => 3585, "line_start" => 3575, "mappings" => [ %{ "comment" => nil, "key" => "info", "value" => "leverage" }, %{ "comment" => nil, "key" => "symbol", "value" => "this.safeSymbol (marketId, market)" }, %{ "comment" => nil, "key" => "marginMode", "value" => "this.safeStringLower (leverage, 'type')" }, %{ "comment" => nil, "key" => "longLeverage", "value" => "leverageValue" }, %{ "comment" => nil, "key" => "shortLeverage", "value" => "leverageValue" } ], "name" => "parseLeverage", "signature" => "parseLeverage (leverage: Dict, market: Market = undefined): Leverage", "source" => "parseLeverage (leverage: Dict, market: Market = undefined): Leverage {\n const marketId = this.safeString (leverage, 'symbol');\n const leverageValue = this.safeInteger (leverage, 'leverage');\n return {\n 'info': leverage,\n 'symbol': this.safeSymbol (marketId, market),\n 'marginMode': this.safeStringLower (leverage, 'type'),\n 'longLeverage': leverageValue,\n 'shortLeverage': leverageValue,\n } as Leverage;\n }" }, %{ "comment" => nil, "examples" => [], "inherited" => true, "inherited_from" => "hitbtc", "line_end" => 2676, "line_start" => 2669, "mappings" => [ %{ "comment" => nil, "key" => "info", "value" => "marginMode" }, %{ "comment" => nil, "key" => "symbol", "value" => "this.safeSymbol (marketId, market)" }, %{ "comment" => nil, "key" => "marginMode", "value" => "this.safeStringLower (marginMode, 'margin_mode')" } ], "name" => "parseMarginMode", "signature" => "parseMarginMode (marginMode: Dict, market = undefined): MarginMode", "source" => "parseMarginMode (marginMode: Dict, market = undefined): MarginMode {\n const marketId = this.safeString (marginMode, 'symbol');\n return {\n 'info': marginMode,\n 'symbol': this.safeSymbol (marketId, market),\n 'marginMode': this.safeStringLower (marginMode, 'margin_mode'),\n } as MarginMode;\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"symbol\": \"BTCUSDT_PERP\",\n \"type\": \"isolated\",\n \"leverage\": \"8.00\",\n \"created_at\": \"2022-03-30T23:34:27.161Z\",\n \"updated_at\": \"2022-03-30T23:34:27.161Z\",\n \"currencies\": [\n {\n \"code\": \"USDT\",\n \"margin_balance\": \"7.000000000000\",\n \"reserved_orders\": \"0\",\n \"reserved_positions\": \"0\"\n }\n ],\n \"positions\": null\n }" ], "inherited" => true, "inherited_from" => "hitbtc", "line_end" => 3468, "line_start" => 3432, "mappings" => [ %{ "comment" => nil, "key" => "info", "value" => "data" }, %{ "comment" => nil, "key" => "symbol", "value" => "market['symbol']" }, %{ "comment" => nil, "key" => "type", "value" => "undefined" }, %{ "comment" => nil, "key" => "marginMode", "value" => "'isolated'" }, %{ "comment" => nil, "key" => "amount", "value" => "undefined" }, %{ "comment" => nil, "key" => "total", "value" => "undefined" }, %{ "comment" => nil, "key" => "code", "value" => "this.safeString (currencyInfo, 'code')" }, %{ "comment" => nil, "key" => "status", "value" => "undefined" }, %{ "comment" => nil, "key" => "timestamp", "value" => "this.parse8601 (datetime)" }, %{ "comment" => nil, "key" => "datetime", "value" => "datetime" } ], "name" => "parseMarginModification", "signature" => "parseMarginModification (data: Dict, market: Market = undefined): MarginModification", "source" => "parseMarginModification (data: Dict, market: Market = undefined): MarginModification {\n //\n // addMargin/reduceMargin\n //\n // {\n // \"symbol\": \"BTCUSDT_PERP\",\n // \"type\": \"isolated\",\n // \"leverage\": \"8.00\",\n // \"created_at\": \"2022-03-30T23:34:27.161Z\",\n // \"updated_at\": \"2022-03-30T23:34:27.161Z\",\n // \"currencies\": [\n // {\n // \"code\": \"USDT\",\n // \"margin_balance\": \"7.000000000000\",\n // \"reserved_orders\": \"0\",\n // \"reserved_positions\": \"0\"\n // }\n // ],\n // \"positions\": null\n // }\n //\n const currencies = this.safeValue (data, 'currencies', []);\n const currencyInfo = this.safeValue (currencies, 0);\n const datetime = this.safeString (data, 'updated_at');\n return {\n 'info': data,\n 'symbol': market['symbol'],\n 'type': undefined,\n 'marginMode': 'isolated',\n 'amount': undefined,\n 'total': undefined,\n 'code': this.safeString (currencyInfo, 'code'),\n 'status': undefined,\n 'timestamp': this.parse8601 (datetime),\n 'datetime': datetime,\n };\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"timestamp\":\"2015-08-20T19:01:00.000Z\",\n \"open\":\"0.006\",\n \"close\":\"0.006\",\n \"min\":\"0.006\",\n \"max\":\"0.006\",\n \"volume\":\"0.003\",\n \"volume_quote\":\"0.000018\"\n }", "{\n \"timestamp\": \"2022-04-01T01:28:00.000Z\",\n \"open\": \"45146.39\",\n \"close\": \"45219.43\",\n \"min\": \"45146.39\",\n \"max\": \"45219.43\"\n }," ], "inherited" => true, "inherited_from" => "hitbtc", "line_end" => 1924, "line_start" => 1892, "mappings" => [], "name" => "parseOHLCV", "signature" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV", "source" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV {\n //\n // Spot and Swap\n //\n // {\n // \"timestamp\":\"2015-08-20T19:01:00.000Z\",\n // \"open\":\"0.006\",\n // \"close\":\"0.006\",\n // \"min\":\"0.006\",\n // \"max\":\"0.006\",\n // \"volume\":\"0.003\",\n // \"volume_quote\":\"0.000018\"\n // }\n //\n // Mark, Index and Premium Index\n //\n // {\n // \"timestamp\": \"2022-04-01T01:28:00.000Z\",\n // \"open\": \"45146.39\",\n // \"close\": \"45219.43\",\n // \"min\": \"45146.39\",\n // \"max\": \"45219.43\"\n // },\n //\n return [\n this.parse8601 (this.safeString (ohlcv, 'timestamp')),\n this.safeNumber (ohlcv, 'open'),\n this.safeNumber (ohlcv, 'max'),\n this.safeNumber (ohlcv, 'min'),\n this.safeNumber (ohlcv, 'close'),\n this.safeNumber (ohlcv, 'volume'),\n ];\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"contract_type\": \"perpetual\",\n \"mark_price\": \"42307.43\",\n \"index_price\": \"42303.27\",\n \"funding_rate\": \"0.0001\",\n \"open_interest\": \"30.9826\",\n \"next_funding_time\": \"2022-03-22T16:00:00.000Z\",\n \"indicative_funding_rate\": \"0.0001\",\n \"premium_index\": \"0\",\n \"avg_premium_index\": \"0.000029587712038098\",\n \"interest_rate\": \"0.0001\",\n \"timestamp\": \"2022-03-22T08:08:26.687Z\"\n }" ], "inherited" => true, "inherited_from" => "hitbtc", "line_end" => 3210, "line_start" => 3184, "mappings" => [ %{ "comment" => nil, "key" => "symbol", "value" => "this.safeSymbol (undefined, market)" }, %{ "comment" => nil, "key" => "openInterestAmount", "value" => "undefined" }, %{ "comment" => nil, "key" => "openInterestValue", "value" => "value" }, %{ "comment" => nil, "key" => "timestamp", "value" => "this.parse8601 (datetime)" }, %{ "comment" => nil, "key" => "datetime", "value" => "datetime" }, %{ "comment" => nil, "key" => "info", "value" => "interest" } ], "name" => "parseOpenInterest", "signature" => "parseOpenInterest (interest, market: Market = undefined)", "source" => "parseOpenInterest (interest, market: Market = undefined) {\n //\n // {\n // \"contract_type\": \"perpetual\",\n // \"mark_price\": \"42307.43\",\n // \"index_price\": \"42303.27\",\n // \"funding_rate\": \"0.0001\",\n // \"open_interest\": \"30.9826\",\n // \"next_funding_time\": \"2022-03-22T16:00:00.000Z\",\n // \"indicative_funding_rate\": \"0.0001\",\n // \"premium_index\": \"0\",\n // \"avg_premium_index\": \"0.000029587712038098\",\n // \"interest_rate\": \"0.0001\",\n // \"timestamp\": \"2022-03-22T08:08:26.687Z\"\n // }\n //\n const datetime = this.safeString (interest, 'timestamp');\n const value = this.safeNumber (interest, 'open_interest');\n return this.safeOpenInterest ({\n 'symbol': this.safeSymbol (undefined, market),\n 'openInterestAmount': undefined,\n 'openInterestValue': value,\n 'timestamp': this.parse8601 (datetime),\n 'datetime': datetime,\n 'info': interest,\n }, market);\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"id\": 488953123149,\n \"client_order_id\": \"103ad305301e4c3590045b13de15b36e\",\n \"symbol\": \"BTCUSDT\",\n \"side\": \"buy\",\n \"status\": \"new\",\n \"type\": \"limit\",\n \"time_in_force\": \"GTC\",\n \"quantity\": \"0.00001\",\n \"quantity_cumulative\": \"0\",\n \"price\": \"0.01\",\n \"price_average\": \"0.01\",\n \"post_only\": false,\n \"created_at\": \"2021-04-13T13:06:16.567Z\",\n \"updated_at\": \"2021-04-13T13:06:16.567Z\"\n }", "{\n \"id\": \"685877626834\",\n \"client_order_id\": \"Yshl7G-EjaREyXQYaGbsmdtVbW-nzQwu\",\n \"symbol\": \"BTCUSDT\",\n \"side\": \"buy\",\n \"status\": \"filled\",\n \"type\": \"market\",\n \"time_in_force\": \"GTC\",\n \"quantity\": \"0.00010\",\n \"quantity_cumulative\": \"0.00010\",\n \"post_only\": false,\n \"created_at\": \"2021-10-26T08:55:55.1Z\",\n \"updated_at\": \"2021-10-26T08:55:55.1Z\",\n \"trades\": [\n {\n \"id\": \"1437229630\",\n \"position_id\": \"0\",\n \"quantity\": \"0.00010\",\n \"price\": \"62884.78\",\n \"fee\": \"0.005659630200\",\n \"timestamp\": \"2021-10-26T08:55:55.1Z\",\n \"taker\": true\n }\n ]\n }", "{\n \"id\": 58418961892,\n \"client_order_id\": \"r42gdPjNMZN-H_xs8RKl2wljg_dfgdg4\",\n \"symbol\": \"BTCUSDT_PERP\",\n \"side\": \"buy\",\n \"status\": \"new\",\n \"type\": \"limit\",\n \"time_in_force\": \"GTC\",\n \"quantity\": \"0.0005\",\n \"quantity_cumulative\": \"0\",\n \"price\": \"30000.00\",\n \"post_only\": false,\n \"reduce_only\": false,\n \"created_at\": \"2022-03-16T08:16:53.039Z\",\n \"updated_at\": \"2022-03-16T08:16:53.039Z\"\n }" ], "inherited" => true, "inherited_from" => "hitbtc", "line_end" => 2602, "line_start" => 2485, "mappings" => [ %{ "comment" => nil, "key" => "info", "value" => "order" }, %{ "comment" => nil, "key" => "id", "value" => "id" }, %{ "comment" => nil, "key" => "clientOrderId", "value" => "id" }, %{ "comment" => nil, "key" => "timestamp", "value" => "timestamp" }, %{ "comment" => nil, "key" => "datetime", "value" => "this.iso8601 (timestamp)" }, %{ "comment" => nil, "key" => "lastTradeTimestamp", "value" => "lastTradeTimestamp" }, %{ "comment" => nil, "key" => "lastUpdateTimestamp", "value" => "lastTradeTimestamp" }, %{ "comment" => nil, "key" => "symbol", "value" => "symbol" }, %{ "comment" => nil, "key" => "price", "value" => "price" }, %{ "comment" => nil, "key" => "amount", "value" => "amount" }, %{ "comment" => nil, "key" => "type", "value" => "type" }, %{ "comment" => nil, "key" => "side", "value" => "side" }, %{ "comment" => nil, "key" => "timeInForce", "value" => "timeInForce" }, %{ "comment" => nil, "key" => "postOnly", "value" => "postOnly" }, %{ "comment" => nil, "key" => "reduceOnly", "value" => "this.safeValue (order, 'reduce_only')" }, %{ "comment" => nil, "key" => "filled", "value" => "filled" }, %{ "comment" => nil, "key" => "remaining", "value" => "undefined" }, %{ "comment" => nil, "key" => "cost", "value" => "undefined" }, %{ "comment" => nil, "key" => "status", "value" => "status" }, %{ "comment" => nil, "key" => "average", "value" => "average" }, %{ "comment" => nil, "key" => "trades", "value" => "rawTrades" }, %{ "comment" => nil, "key" => "fee", "value" => "undefined" }, %{ "comment" => nil, "key" => "triggerPrice", "value" => "this.safeString (order, 'stop_price')" }, %{ "comment" => nil, "key" => "takeProfitPrice", "value" => "undefined" }, %{ "comment" => nil, "key" => "stopLossPrice", "value" => "undefined" } ], "name" => "parseOrder", "signature" => "parseOrder (order: Dict, market: Market = undefined): Order", "source" => "parseOrder (order: Dict, market: Market = undefined): Order {\n //\n // limit\n // {\n // \"id\": 488953123149,\n // \"client_order_id\": \"103ad305301e4c3590045b13de15b36e\",\n // \"symbol\": \"BTCUSDT\",\n // \"side\": \"buy\",\n // \"status\": \"new\",\n // \"type\": \"limit\",\n // \"time_in_force\": \"GTC\",\n // \"quantity\": \"0.00001\",\n // \"quantity_cumulative\": \"0\",\n // \"price\": \"0.01\",\n // \"price_average\": \"0.01\",\n // \"post_only\": false,\n // \"created_at\": \"2021-04-13T13:06:16.567Z\",\n // \"updated_at\": \"2021-04-13T13:06:16.567Z\"\n // }\n //\n // market\n // {\n // \"id\": \"685877626834\",\n // \"client_order_id\": \"Yshl7G-EjaREyXQYaGbsmdtVbW-nzQwu\",\n // \"symbol\": \"BTCUSDT\",\n // \"side\": \"buy\",\n // \"status\": \"filled\",\n // \"type\": \"market\",\n // \"time_in_force\": \"GTC\",\n // \"quantity\": \"0.00010\",\n // \"quantity_cumulative\": \"0.00010\",\n // \"post_only\": false,\n // \"created_at\": \"2021-10-26T08:55:55.1Z\",\n // \"updated_at\": \"2021-10-26T08:55:55.1Z\",\n // \"trades\": [\n // {\n // \"id\": \"1437229630\",\n // \"position_id\": \"0\",\n // \"quantity\": \"0.00010\",\n // \"price\": \"62884.78\",\n // \"fee\": \"0.005659630200\",\n // \"timestamp\": \"2021-10-26T08:55:55.1Z\",\n // \"taker\": true\n // }\n // ]\n // }\n //\n // swap and margin\n //\n // {\n // \"id\": 58418961892,\n // \"client_order_id\": \"r42gdPjNMZN-H_xs8RKl2wljg_dfgdg4\",\n // \"symbol\": \"BTCUSDT_PERP\",\n // \"side\": \"buy\",\n // \"status\": \"new\",\n // \"type\": \"limit\",\n // \"time_in_force\": \"GTC\",\n // \"quantity\": \"0.0005\",\n // \"quantity_cumulative\": \"0\",\n // \"price\": \"30000.00\",\n // \"post_only\": false,\n // \"reduce_only\": false,\n // \"created_at\": \"2022-03-16T08:16:53.039Z\",\n // \"updated_at\": \"2022-03-16T08:16:53.039Z\"\n // }\n //\n const id = this.safeString (order, 'client_order_id');\n // we use clientOrderId as the order id with this exchange intentionally\n // because most of their endpoints will require clientOrderId\n // explained here: https://github.com/ccxt/ccxt/issues/5674\n const side = this.safeString (order, 'side');\n const type = this.safeString (order, 'type');\n const amount = this.safeString (order, 'quantity');\n const price = this.safeString (order, 'price');\n const average = this.safeString (order, 'price_average');\n const created = this.safeString (order, 'created_at');\n const timestamp = this.parse8601 (created);\n const updated = this.safeString (order, 'updated_at');\n let lastTradeTimestamp = undefined;\n if (updated !== created) {\n lastTradeTimestamp = this.parse8601 (updated);\n }\n const filled = this.safeString (order, 'quantity_cumulative');\n const status = this.parseOrderStatus (this.safeString (order, 'status'));\n const marketId = this.safeString (order, 'symbol');\n market = this.safeMarket (marketId, market);\n const symbol = market['symbol'];\n const postOnly = this.safeValue (order, 'post_only');\n const timeInForce = this.safeString (order, 'time_in_force');\n const rawTrades = this.safeValue (order, 'trades');\n return this.safeOrder ({\n 'info': order,\n 'id': id,\n 'clientOrderId': id,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'lastTradeTimestamp': lastTradeTimestamp,\n 'lastUpdateTimestamp': lastTradeTimestamp,\n 'symbol': symbol,\n 'price': price,\n 'amount': amount,\n 'type': type,\n 'side': side,\n 'timeInForce': timeInForce,\n 'postOnly': postOnly,\n 'reduceOnly': this.safeValue (order, 'reduce_only'),\n 'filled': filled,\n 'remaining': undefined,\n 'cost': undefined,\n 'status': status,\n 'average': average,\n 'trades': rawTrades,\n 'fee': undefined,\n 'triggerPrice': this.safeString (order, 'stop_price'),\n 'takeProfitPrice': undefined,\n 'stopLossPrice': undefined,\n }, market);\n }" }, %{ "comment" => nil, "examples" => [], "inherited" => true, "inherited_from" => "hitbtc", "line_end" => 2483, "line_start" => 2473, "mappings" => [], "name" => "parseOrderStatus", "signature" => "parseOrderStatus (status: Str)", "source" => "parseOrderStatus (status: Str) {\n const statuses: Dict = {\n 'new': 'open',\n 'suspended': 'open',\n 'partiallyFilled': 'open',\n 'filled': 'closed',\n 'canceled': 'canceled',\n 'expired': 'failed',\n };\n return this.safeString (statuses, status, status);\n }" }, %{ "comment" => nil, "examples" => [ "[\n {\n \"symbol\": \"ETHUSDT_PERP\",\n \"type\": \"isolated\",\n \"leverage\": \"10.00\",\n \"created_at\": \"2022-03-19T07:54:35.24Z\",\n \"updated_at\": \"2022-03-19T07:54:58.922Z\",\n currencies\": [\n {\n \"code\": \"USDT\",\n \"margin_balance\": \"7.478100643043\",\n \"reserved_orders\": \"0\",\n \"reserved_positions\": \"0.303530761300\"\n }\n ],\n \"positions\": [\n {\n \"id\": 2470568,\n \"symbol\": \"ETHUSDT_PERP\",\n \"quantity\": \"0.001\",\n \"price_entry\": \"2927.509\",\n \"price_margin_call\": \"0\",\n \"price_liquidation\": \"0\",\n \"pnl\": \"0\",\n \"created_at\": \"2022-03-19T07:54:35.24Z\",\n \"updated_at\": \"2022-03-19T07:54:58.922Z\"\n }\n ]\n },\n ]" ], "inherited" => true, "inherited_from" => "hitbtc", "line_end" => 3182, "line_start" => 3097, "mappings" => [ %{ "comment" => nil, "key" => "info", "value" => "position" }, %{ "comment" => nil, "key" => "id", "value" => "undefined" }, %{ "comment" => nil, "key" => "symbol", "value" => "symbol" }, %{ "comment" => nil, "key" => "notional", "value" => "undefined" }, %{ "comment" => nil, "key" => "marginMode", "value" => "marginMode" }, %{ "comment" => nil, "key" => "marginType", "value" => "marginMode" }, %{ "comment" => nil, "key" => "liquidationPrice", "value" => "liquidationPrice" }, %{ "comment" => nil, "key" => "entryPrice", "value" => "entryPrice" }, %{ "comment" => nil, "key" => "unrealizedPnl", "value" => "undefined" }, %{ "comment" => nil, "key" => "percentage", "value" => "undefined" }, %{ "comment" => nil, "key" => "contracts", "value" => "contracts" }, %{ "comment" => nil, "key" => "contractSize", "value" => "undefined" }, %{ "comment" => nil, "key" => "markPrice", "value" => "undefined" }, %{ "comment" => nil, "key" => "lastPrice", "value" => "undefined" }, %{ "comment" => nil, "key" => "side", "value" => "undefined" }, %{ "comment" => nil, "key" => "hedged", "value" => "undefined" }, %{ "comment" => nil, "key" => "timestamp", "value" => "this.parse8601 (datetime)" }, %{ "comment" => nil, "key" => "datetime", "value" => "datetime" }, %{ "comment" => nil, "key" => "lastUpdateTimestamp", "value" => "undefined" }, %{ "comment" => nil, "key" => "maintenanceMargin", "value" => "undefined" }, %{ "comment" => nil, "key" => "maintenanceMarginPercentage", "value" => "undefined" }, %{ "comment" => nil, "key" => "collateral", "value" => "collateral" }, %{ "comment" => nil, "key" => "initialMargin", "value" => "undefined" }, %{ "comment" => nil, "key" => "initialMarginPercentage", "value" => "undefined" }, %{ "comment" => nil, "key" => "leverage", "value" => "leverage" }, %{ "comment" => nil, "key" => "marginRatio", "value" => "undefined" }, %{ "comment" => nil, "key" => "stopLossPrice", "value" => "undefined" }, %{ "comment" => nil, "key" => "takeProfitPrice", "value" => "undefined" } ], "name" => "parsePosition", "signature" => "parsePosition (position: Dict, market: Market = undefined)", "source" => "parsePosition (position: Dict, market: Market = undefined) {\n //\n // [\n // {\n // \"symbol\": \"ETHUSDT_PERP\",\n // \"type\": \"isolated\",\n // \"leverage\": \"10.00\",\n // \"created_at\": \"2022-03-19T07:54:35.24Z\",\n // \"updated_at\": \"2022-03-19T07:54:58.922Z\",\n // currencies\": [\n // {\n // \"code\": \"USDT\",\n // \"margin_balance\": \"7.478100643043\",\n // \"reserved_orders\": \"0\",\n // \"reserved_positions\": \"0.303530761300\"\n // }\n // ],\n // \"positions\": [\n // {\n // \"id\": 2470568,\n // \"symbol\": \"ETHUSDT_PERP\",\n // \"quantity\": \"0.001\",\n // \"price_entry\": \"2927.509\",\n // \"price_margin_call\": \"0\",\n // \"price_liquidation\": \"0\",\n // \"pnl\": \"0\",\n // \"created_at\": \"2022-03-19T07:54:35.24Z\",\n // \"updated_at\": \"2022-03-19T07:54:58.922Z\"\n // }\n // ]\n // },\n // ]\n //\n const marginMode = this.safeString (position, 'type');\n const leverage = this.safeNumber (position, 'leverage');\n const datetime = this.safeString (position, 'updated_at');\n const positions = this.safeValue (position, 'positions', []);\n let liquidationPrice = undefined;\n let entryPrice = undefined;\n let contracts = undefined;\n for (let i = 0; i < positions.length; i++) {\n const entry = positions[i];\n liquidationPrice = this.safeNumber (entry, 'price_liquidation');\n entryPrice = this.safeNumber (entry, 'price_entry');\n contracts = this.safeNumber (entry, 'quantity');\n }\n const currencies = this.safeValue (position, 'currencies', []);\n let collateral = undefined;\n for (let i = 0; i < currencies.length; i++) {\n const entry = currencies[i];\n collateral = this.safeNumber (entry, 'margin_balance');\n }\n const marketId = this.safeString (position, 'symbol');\n market = this.safeMarket (marketId, market);\n const symbol = market['symbol'];\n return this.safePosition ({\n 'info': position,\n 'id': undefined,\n 'symbol': symbol,\n 'notional': undefined,\n 'marginMode': marginMode,\n 'marginType': marginMode,\n 'liquidationPrice': liquidationPrice,\n 'entryPrice': entryPrice,\n 'unrealizedPnl': undefined,\n 'percentage': undefined,\n 'contracts': contracts,\n 'contractSize': undefined,\n 'markPrice': undefined,\n 'lastPrice': undefined,\n 'side': undefined,\n 'hedged': undefined,\n 'timestamp': this.parse8601 (datetime),\n 'datetime': datetime,\n 'lastUpdateTimestamp': undefined,\n 'maintenanceMargin': undefined,\n 'maintenanceMarginPercentage': undefined,\n 'collateral': collateral,\n 'initialMargin': undefined,\n 'initialMarginPercentage': undefined,\n 'leverage': leverage,\n 'marginRatio': undefined,\n 'stopLossPrice': undefined,\n 'takeProfitPrice': undefined,\n });\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"ask\": \"62756.01\",\n \"bid\": \"62754.09\",\n \"last\": \"62755.87\",\n \"low\": \"62010.00\",\n \"high\": \"66657.99\",\n \"open\": \"65089.27\",\n \"volume\": \"16719.50366\",\n \"volume_quote\": \"1063422878.8156828\",\n \"timestamp\": \"2021-10-22T07:29:14.585Z\"\n }" ], "inherited" => true, "inherited_from" => "hitbtc", "line_end" => 1269, "line_start" => 1227, "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" => "undefined" }, %{ "comment" => nil, "key" => "open", "value" => "open" }, %{ "comment" => nil, "key" => "close", "value" => "last" }, %{ "comment" => nil, "key" => "last", "value" => "last" }, %{ "comment" => nil, "key" => "previousClose", "value" => "undefined" }, %{ "comment" => nil, "key" => "change", "value" => "undefined" }, %{ "comment" => nil, "key" => "percentage", "value" => "undefined" }, %{ "comment" => nil, "key" => "average", "value" => "undefined" }, %{ "comment" => nil, "key" => "baseVolume", "value" => "baseVolume" }, %{ "comment" => nil, "key" => "quoteVolume", "value" => "quoteVolume" }, %{ "comment" => nil, "key" => "info", "value" => "ticker" } ], "name" => "parseTicker", "signature" => "parseTicker (ticker: Dict, market: Market = undefined): Ticker", "source" => "parseTicker (ticker: Dict, market: Market = undefined): Ticker {\n //\n // {\n // \"ask\": \"62756.01\",\n // \"bid\": \"62754.09\",\n // \"last\": \"62755.87\",\n // \"low\": \"62010.00\",\n // \"high\": \"66657.99\",\n // \"open\": \"65089.27\",\n // \"volume\": \"16719.50366\",\n // \"volume_quote\": \"1063422878.8156828\",\n // \"timestamp\": \"2021-10-22T07:29:14.585Z\"\n // }\n //\n const timestamp = this.parse8601 (ticker['timestamp']);\n const symbol = this.safeSymbol (undefined, market);\n const baseVolume = this.safeString (ticker, 'volume');\n const quoteVolume = this.safeString (ticker, 'volume_quote');\n const open = this.safeString (ticker, 'open');\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': undefined,\n 'open': open,\n 'close': last,\n 'last': last,\n 'previousClose': undefined,\n 'change': undefined,\n 'percentage': undefined,\n 'average': undefined,\n 'baseVolume': baseVolume,\n 'quoteVolume': quoteVolume,\n 'info': ticker,\n }, market);\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"id\": \"1569252895\",\n \"position_id\": \"0\",\n \"quantity\": \"10\",\n \"price\": \"0.03919424\",\n \"fee\": \"0.000979856000\",\n \"timestamp\": \"2022-01-25T19:38:36.153Z\",\n \"taker\": true\n }", "{\n \"id\": 974786185,\n \"price\": \"0.032462\",\n \"qty\": \"0.3673\",\n \"side\": \"buy\",\n \"timestamp\": \"2020-10-16T12:57:39.846Z\"\n }", "{\n \"id\": 277210397,\n \"clientOrderId\": \"6e102f3e7f3f4e04aeeb1cdc95592f1a\",\n \"orderId\": 28102855393,\n \"symbol\": \"ETHBTC\",\n \"side\": \"sell\",\n \"quantity\": \"0.002\",\n \"price\": \"0.073365\",\n \"fee\": \"0.000000147\",\n \"timestamp\": \"2018-04-28T18:39:55.345Z\",\n \"taker\": true\n }", "{\n \"id\": 4718564,\n \"order_id\": 58730811958,\n \"client_order_id\": \"475c47d97f867f09726186eb22b4c3d4\",\n \"symbol\": \"BTCUSDT_PERP\",\n \"side\": \"sell\",\n \"quantity\": \"0.0001\",\n \"price\": \"41118.51\",\n \"fee\": \"0.002055925500\",\n \"timestamp\": \"2022-03-17T05:23:17.795Z\",\n \"taker\": true,\n \"position_id\": 2350122,\n \"pnl\": \"0.002255000000\",\n \"liquidation\": false\n }" ], "inherited" => true, "inherited_from" => "hitbtc", "line_end" => 1468, "line_start" => 1366, "mappings" => [ %{ "comment" => nil, "key" => "info", "value" => "trade" }, %{ "comment" => nil, "key" => "id", "value" => "id" }, %{ "comment" => nil, "key" => "order", "value" => "orderId" }, %{ "comment" => nil, "key" => "timestamp", "value" => "timestamp" }, %{ "comment" => nil, "key" => "datetime", "value" => "this.iso8601 (timestamp)" }, %{ "comment" => nil, "key" => "symbol", "value" => "symbol" }, %{ "comment" => nil, "key" => "type", "value" => "undefined" }, %{ "comment" => nil, "key" => "side", "value" => "side" }, %{ "comment" => nil, "key" => "takerOrMaker", "value" => "takerOrMaker" }, %{ "comment" => nil, "key" => "price", "value" => "priceString" }, %{ "comment" => nil, "key" => "amount", "value" => "amountString" }, %{ "comment" => nil, "key" => "cost", "value" => "undefined" }, %{ "comment" => nil, "key" => "fee", "value" => "fee" }, %{ "comment" => nil, "key" => "cost", "value" => "feeCostString" }, %{ "comment" => nil, "key" => "currency", "value" => "feeCurrencyCode" } ], "name" => "parseTrade", "signature" => "parseTrade (trade: Dict, market: Market = undefined): Trade", "source" => "parseTrade (trade: Dict, market: Market = undefined): Trade {\n //\n // createOrder (market)\n //\n // {\n // \"id\": \"1569252895\",\n // \"position_id\": \"0\",\n // \"quantity\": \"10\",\n // \"price\": \"0.03919424\",\n // \"fee\": \"0.000979856000\",\n // \"timestamp\": \"2022-01-25T19:38:36.153Z\",\n // \"taker\": true\n // }\n //\n // fetchTrades\n //\n // {\n // \"id\": 974786185,\n // \"price\": \"0.032462\",\n // \"qty\": \"0.3673\",\n // \"side\": \"buy\",\n // \"timestamp\": \"2020-10-16T12:57:39.846Z\"\n // }\n //\n // fetchMyTrades spot\n //\n // {\n // \"id\": 277210397,\n // \"clientOrderId\": \"6e102f3e7f3f4e04aeeb1cdc95592f1a\",\n // \"orderId\": 28102855393,\n // \"symbol\": \"ETHBTC\",\n // \"side\": \"sell\",\n // \"quantity\": \"0.002\",\n // \"price\": \"0.073365\",\n // \"fee\": \"0.000000147\",\n // \"timestamp\": \"2018-04-28T18:39:55.345Z\",\n // \"taker\": true\n // }\n //\n // fetchMyTrades swap and margin\n //\n // {\n // \"id\": 4718564,\n // \"order_id\": 58730811958,\n // \"client_order_id\": \"475c47d97f867f09726186eb22b4c3d4\",\n // \"symbol\": \"BTCUSDT_PERP\",\n // \"side\": \"sell\",\n // \"quantity\": \"0.0001\",\n // \"price\": \"41118.51\",\n // \"fee\": \"0.002055925500\",\n // \"timestamp\": \"2022-03-17T05:23:17.795Z\",\n // \"taker\": true,\n // \"position_id\": 2350122,\n // \"pnl\": \"0.002255000000\",\n // \"liquidation\": false\n // }\n //\n const timestamp = this.parse8601 (trade['timestamp']);\n const marketId = this.safeString (trade, 'symbol');\n market = this.safeMarket (marketId, market);\n const symbol = market['symbol'];\n let fee = undefined;\n const feeCostString = this.safeString (trade, 'fee');\n const taker = this.safeValue (trade, 'taker');\n let takerOrMaker: string;\n if (taker !== undefined) {\n takerOrMaker = taker ? 'taker' : 'maker';\n } else {\n takerOrMaker = 'taker'; // the only case when `taker` field is missing, is public fetchTrades and it must be taker\n }\n if (feeCostString !== undefined) {\n const info = this.safeValue (market, 'info', {});\n const feeCurrency = this.safeString (info, 'fee_currency');\n const feeCurrencyCode = this.safeCurrencyCode (feeCurrency);\n fee = {\n 'cost': feeCostString,\n 'currency': feeCurrencyCode,\n };\n }\n // we use clientOrderId as the order id with this exchange intentionally\n // because most of their endpoints will require clientOrderId\n // explained here: https://github.com/ccxt/ccxt/issues/5674\n const orderId = this.safeString2 (trade, 'clientOrderId', 'client_order_id');\n const priceString = this.safeString (trade, 'price');\n const amountString = this.safeString2 (trade, 'quantity', 'qty');\n const side = this.safeString (trade, 'side');\n const id = this.safeString (trade, 'id');\n return this.safeTrade ({\n 'info': trade,\n 'id': id,\n 'order': orderId,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'symbol': symbol,\n 'type': undefined,\n 'side': side,\n 'takerOrMaker': takerOrMaker,\n 'price': priceString,\n 'amount': amountString,\n 'cost': undefined,\n 'fee': fee,\n }, market);\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"symbol\":\"ARVUSDT\", // returned from fetchTradingFees only\n \"take_rate\":\"0.0009\",\n \"make_rate\":\"0.0009\"\n }" ], "inherited" => true, "inherited_from" => "hitbtc", "line_end" => 1741, "line_start" => 1721, "mappings" => [ %{ "comment" => nil, "key" => "info", "value" => "fee" }, %{ "comment" => nil, "key" => "symbol", "value" => "symbol" }, %{ "comment" => nil, "key" => "taker", "value" => "taker" }, %{ "comment" => nil, "key" => "maker", "value" => "maker" }, %{ "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 //\n // {\n // \"symbol\":\"ARVUSDT\", // returned from fetchTradingFees only\n // \"take_rate\":\"0.0009\",\n // \"make_rate\":\"0.0009\"\n // }\n //\n const taker = this.safeNumber (fee, 'take_rate');\n const maker = this.safeNumber (fee, 'make_rate');\n const marketId = this.safeString (fee, 'symbol');\n const symbol = this.safeSymbol (marketId, market);\n return {\n 'info': fee,\n 'symbol': symbol,\n 'taker': taker,\n 'maker': maker,\n 'percentage': undefined,\n 'tierBased': undefined,\n };\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"id\": \"101609495\",\n \"created_at\": \"2018-03-06T22:05:06.507Z\",\n \"updated_at\": \"2018-03-06T22:11:45.03Z\",\n \"status\": \"SUCCESS\",\n \"type\": \"DEPOSIT\", // DEPOSIT, WITHDRAW, ..\n \"subtype\": \"BLOCKCHAIN\",\n \"native\": {\n \"tx_id\": \"e20b0965-4024-44d0-b63f-7fb8996a6706\",\n \"index\": \"881652766\",\n \"currency\": \"ETH\",\n \"amount\": \"0.01418088\",\n \"hash\": \"d95dbbff3f9234114f1211ab0ba2a94f03f394866fd5749d74a1edab80e6c5d3\",\n \"address\": \"0xd9259302c32c0a0295d86a39185c9e14f6ba0a0d\",\n \"confirmations\": \"20\",\n \"senders\": [\n \"0x243bec9256c9a3469da22103891465b47583d9f1\"\n ],\n \"fee\": \"1.22\" // only for WITHDRAW\n }\n },", "{\n \"id\":\"084cfcd5-06b9-4826-882e-fdb75ec3625d\"\n }" ], "inherited" => true, "inherited_from" => "hitbtc", "line_end" => 1617, "line_start" => 1533, "mappings" => [ %{ "comment" => nil, "key" => "info", "value" => "transaction" }, %{ "comment" => nil, "key" => "id", "value" => "id" }, %{ "comment" => nil, "key" => "txid", "value" => "txhash" }, %{ "comment" => nil, "key" => "type", "value" => "type" }, %{ "comment" => nil, "key" => "currency", "value" => "code" }, %{ "comment" => nil, "key" => "network", "value" => "undefined" }, %{ "comment" => nil, "key" => "amount", "value" => "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" => "addressFrom" }, %{ "comment" => nil, "key" => "addressTo", "value" => "addressTo" }, %{ "comment" => nil, "key" => "tag", "value" => "tag" }, %{ "comment" => nil, "key" => "tagFrom", "value" => "undefined" }, %{ "comment" => nil, "key" => "tagTo", "value" => "tagTo" }, %{ "comment" => nil, "key" => "updated", "value" => "updated" }, %{ "comment" => nil, "key" => "comment", "value" => "undefined" }, %{ "comment" => nil, "key" => "internal", "value" => "internal" }, %{ "comment" => nil, "key" => "fee", "value" => "fee" }, %{ "comment" => nil, "key" => "currency", "value" => "undefined" }, %{ "comment" => nil, "key" => "cost", "value" => "undefined" }, %{ "comment" => nil, "key" => "rate", "value" => "undefined" }, %{ "comment" => nil, "key" => "cost", "value" => "feeCost" } ], "name" => "parseTransaction", "signature" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction", "source" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction {\n //\n // transaction\n //\n // {\n // \"id\": \"101609495\",\n // \"created_at\": \"2018-03-06T22:05:06.507Z\",\n // \"updated_at\": \"2018-03-06T22:11:45.03Z\",\n // \"status\": \"SUCCESS\",\n // \"type\": \"DEPOSIT\", // DEPOSIT, WITHDRAW, ..\n // \"subtype\": \"BLOCKCHAIN\",\n // \"native\": {\n // \"tx_id\": \"e20b0965-4024-44d0-b63f-7fb8996a6706\",\n // \"index\": \"881652766\",\n // \"currency\": \"ETH\",\n // \"amount\": \"0.01418088\",\n // \"hash\": \"d95dbbff3f9234114f1211ab0ba2a94f03f394866fd5749d74a1edab80e6c5d3\",\n // \"address\": \"0xd9259302c32c0a0295d86a39185c9e14f6ba0a0d\",\n // \"confirmations\": \"20\",\n // \"senders\": [\n // \"0x243bec9256c9a3469da22103891465b47583d9f1\"\n // ],\n // \"fee\": \"1.22\" // only for WITHDRAW\n // }\n // },\n // \"operation_id\": \"084cfcd5-06b9-4826-882e-fdb75ec3625d\", // only for WITHDRAW\n // \"commit_risk\": {}\n // withdraw\n //\n // {\n // \"id\":\"084cfcd5-06b9-4826-882e-fdb75ec3625d\"\n // }\n //\n const id = this.safeString2 (transaction, 'operation_id', 'id');\n const timestamp = this.parse8601 (this.safeString (transaction, 'created_at'));\n const updated = this.parse8601 (this.safeString (transaction, 'updated_at'));\n const type = this.parseTransactionType (this.safeString (transaction, 'type'));\n const status = this.parseTransactionStatus (this.safeString (transaction, 'status'));\n const native = this.safeValue (transaction, 'native', {});\n const currencyId = this.safeString (native, 'currency');\n const code = this.safeCurrencyCode (currencyId);\n const txhash = this.safeString (native, 'hash');\n const address = this.safeString (native, 'address');\n const addressTo = address;\n const tag = this.safeString (native, 'payment_id');\n const tagTo = tag;\n const sender = this.safeValue (native, 'senders');\n const addressFrom = this.safeString (sender, 0);\n const amount = this.safeNumber (native, 'amount');\n const subType = this.safeString (transaction, 'subtype');\n const internal = subType === 'OFFCHAIN';\n // https://api.hitbtc.com/#check-if-offchain-is-available\n const fee = {\n 'currency': undefined,\n 'cost': undefined,\n 'rate': undefined,\n };\n const feeCost = this.safeNumber (native, 'fee');\n if (feeCost !== undefined) {\n fee['currency'] = code;\n fee['cost'] = feeCost;\n }\n return {\n 'info': transaction,\n 'id': id,\n 'txid': txhash,\n 'type': type,\n 'currency': code,\n 'network': undefined,\n 'amount': amount,\n 'status': status,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'address': address,\n 'addressFrom': addressFrom,\n 'addressTo': addressTo,\n 'tag': tag,\n 'tagFrom': undefined,\n 'tagTo': tagTo,\n 'updated': updated,\n 'comment': undefined,\n 'internal': internal,\n 'fee': fee,\n } as Transaction;\n }" }, %{ "comment" => nil, "examples" => [], "inherited" => true, "inherited_from" => "hitbtc", "line_end" => 1523, "line_start" => 1514, "mappings" => [], "name" => "parseTransactionStatus", "signature" => "parseTransactionStatus (status: Str)", "source" => "parseTransactionStatus (status: Str) {\n const statuses: Dict = {\n 'CREATED': 'pending',\n 'PENDING': 'pending',\n 'FAILED': 'failed',\n 'ROLLED_BACK': 'failed',\n 'SUCCESS': 'ok',\n };\n return this.safeString (statuses, status, status);\n }" }, %{ "comment" => nil, "examples" => [], "inherited" => true, "inherited_from" => "hitbtc", "line_end" => 1531, "line_start" => 1525, "mappings" => [], "name" => "parseTransactionType", "signature" => "parseTransactionType (type)", "source" => "parseTransactionType (type) {\n const types: Dict = {\n 'DEPOSIT': 'deposit',\n 'WITHDRAW': 'withdrawal',\n };\n return this.safeString (types, type, type);\n }" }, %{ "comment" => nil, "examples" => [ "[\n \"2db6ebab-fb26-4537-9ef8-1a689472d236\"\n ]" ], "inherited" => true, "inherited_from" => "hitbtc", "line_end" => 2737, "line_start" => 2718, "mappings" => [ %{ "comment" => nil, "key" => "id", "value" => "this.safeString (transfer, 0)" }, %{ "comment" => nil, "key" => "timestamp", "value" => "undefined" }, %{ "comment" => nil, "key" => "datetime", "value" => "undefined" }, %{ "comment" => nil, "key" => "currency", "value" => "this.safeCurrencyCode (undefined, currency)" }, %{ "comment" => nil, "key" => "amount", "value" => "undefined" }, %{ "comment" => nil, "key" => "fromAccount", "value" => "undefined" }, %{ "comment" => nil, "key" => "toAccount", "value" => "undefined" }, %{ "comment" => nil, "key" => "status", "value" => "undefined" }, %{ "comment" => nil, "key" => "info", "value" => "transfer" } ], "name" => "parseTransfer", "signature" => "parseTransfer (transfer: Dict, currency: Currency = undefined): TransferEntry", "source" => "parseTransfer (transfer: Dict, currency: Currency = undefined): TransferEntry {\n //\n // transfer\n //\n // [\n // \"2db6ebab-fb26-4537-9ef8-1a689472d236\"\n // ]\n //\n return {\n 'id': this.safeString (transfer, 0),\n 'timestamp': undefined,\n 'datetime': undefined,\n 'currency': this.safeCurrencyCode (undefined, currency),\n 'amount': undefined,\n 'fromAccount': undefined,\n 'toAccount': undefined,\n 'status': undefined,\n 'info': transfer,\n };\n }" } ], path_prefix: "", pro: true, quote_json_numbers: nil, rate_limits: %{ interval_ms: 3, period: 1000, requests: 333, rolling_window_size: 60000 }, raw_endpoints: %{ private: [ %{ auth: false, cost: 15, method: :get, path: "/futures/history/positions" }, %{ auth: false, cost: 15, method: :get, path: "/sub-account/crypto/address/{subAccID}/{currency}" }, %{ auth: false, cost: 30, method: :get, path: "/wallet/transactions/{tx_id}" }, %{ auth: false, cost: 1, method: :get, path: "/futures/order" }, %{ auth: false, cost: 15, method: :get, path: "/sub-account" }, %{ auth: false, cost: 30, method: :get, path: "/wallet/transactions" }, %{ auth: false, cost: 30, method: :get, path: "/wallet/crypto/address" }, %{ auth: false, cost: 30, method: :get, path: "/wallet/balance/{currency}" }, %{ auth: false, cost: 1, method: :get, path: "/spot/order/{client_order_id}" }, %{ auth: false, cost: 30, method: :get, path: "/wallet/crypto/address/recent-deposit" }, %{ auth: false, cost: 30, method: :get, path: "/wallet/airdrops" }, %{ auth: false, cost: 30, method: :get, path: "/wallet/amount-locks" }, %{ auth: false, cost: 15, method: :get, path: "/futures/balance" }, %{ auth: false, cost: 15, method: :get, path: "/futures/history/trade" }, %{ auth: false, cost: 15, method: :get, path: "/futures/history/order" }, %{ auth: false, cost: 15, method: :get, path: "/margin/history/positions" }, %{ auth: false, cost: 15, method: :get, path: "/spot/balance/{currency}" }, %{ auth: false, cost: 1, method: :get, path: "/futures/order/{client_order_id}" }, %{ auth: false, cost: 15, method: :get, path: "/spot/fee/{symbol}" }, %{ auth: false, cost: 30, method: :get, path: "/wallet/crypto/address/recent-withdraw" }, %{ auth: false, cost: 15, method: :get, path: "/spot/history/trade" }, %{ auth: false, cost: 15, method: :get, path: "/margin/history/order" }, %{ auth: false, cost: 1, method: :get, path: "/futures/account" }, %{ auth: false, cost: 15, method: :get, path: "/sub-account/acl" }, %{ auth: false, cost: 15, method: :get, path: "/futures/history/clearing" }, %{ auth: false, cost: 15, method: :get, path: "/spot/balance" }, %{ auth: false, cost: 15, method: :get, path: "/futures/fee/{symbol}" }, %{ auth: false, cost: 15, method: :get, path: "/margin/config" }, %{ auth: false, cost: 1, method: :get, path: "/spot/order" }, %{ auth: false, cost: 15, method: :get, path: "/futures/balance/{currency}" }, %{ auth: false, cost: 15, method: :get, path: "/spot/fee" }, %{ auth: false, cost: 1, method: :get, path: "/margin/order/{client_order_id}" }, %{ auth: false, cost: 15, method: :get, path: "/futures/config" }, %{ auth: false, cost: 1, method: :get, path: "/margin/order" }, %{ auth: false, cost: 1, method: :get, path: "/margin/account/cross/{currency}" }, %{ auth: false, cost: 1, method: :get, path: "/margin/account" }, %{ auth: false, cost: 15, method: :get, path: "/margin/history/clearing" }, %{ auth: false, cost: 15, method: :get, path: "/sub-account/balance/{subAccID}" }, %{ auth: false, cost: 15, method: :get, path: "/spot/history/order" }, %{ auth: false, cost: 1, method: :get, path: "/futures/account/isolated/{symbol}" }, %{ auth: false, cost: 30, method: :get, path: "/wallet/crypto/fee/estimate" }, %{ auth: false, cost: 15, method: :get, path: "/futures/fee" }, %{ auth: false, cost: 30, method: :get, path: "/wallet/balance" }, %{ auth: false, cost: 15, method: :get, path: "/margin/history/trade" }, %{ auth: false, cost: 30, method: :get, path: "/wallet/crypto/address/check-mine" }, %{ auth: false, cost: 1, method: :get, path: "/margin/account/isolated/{symbol}" }, %{ auth: false, cost: 1, method: :post, path: "/futures/order" }, %{ auth: false, cost: 1, method: :post, path: "/futures/order/list" }, %{ auth: false, cost: 1, method: :post, path: "/margin/order" }, %{ auth: false, cost: 1, method: :post, path: "/margin/order/list" }, %{ auth: false, cost: 1, method: :post, path: "/spot/order" }, %{ auth: false, cost: 1, method: :post, path: "/spot/order/list" }, %{ auth: false, cost: 15, method: :post, path: "/sub-account/acl" }, %{ auth: false, cost: 15, method: :post, path: "/sub-account/activate" }, %{ auth: false, cost: 15, method: :post, path: "/sub-account/freeze" }, %{ auth: false, cost: 15, method: :post, path: "/sub-account/transfer" }, %{ auth: false, cost: 30, method: :post, path: "/wallet/airdrops/{id}/claim" }, %{ auth: false, cost: 30, method: :post, path: "/wallet/convert" }, %{ auth: false, cost: 30, method: :post, path: "/wallet/crypto/address" }, %{ auth: false, cost: 30, method: :post, path: "/wallet/crypto/check-offchain-available" }, %{ auth: false, cost: 30, method: :post, path: "/wallet/crypto/fees/estimate" }, %{ auth: false, cost: 30, method: :post, path: "/wallet/crypto/withdraw" }, %{ auth: false, cost: 30, method: :post, path: "/wallet/internal/withdraw" }, %{ auth: false, cost: 30, method: :post, path: "/wallet/transfer" }, %{ auth: false, cost: 1, method: :put, path: "/futures/account/isolated/{symbol}" }, %{ auth: false, cost: 1, method: :put, path: "/margin/account/isolated/{symbol}" }, %{ auth: false, cost: 30, method: :put, path: "/wallet/crypto/withdraw/{id}" }, %{ auth: false, cost: 1, method: :delete, path: "/futures/order" }, %{ auth: false, cost: 1, method: :delete, path: "/futures/order/{client_order_id}" }, %{ auth: false, cost: 1, method: :delete, path: "/futures/position" }, %{ auth: false, cost: 1, method: :delete, path: "/futures/position/{margin_mode}/{symbol}" }, %{ auth: false, cost: 1, method: :delete, path: "/margin/order" }, %{ auth: false, cost: 1, method: :delete, path: "/margin/order/{client_order_id}" }, %{ auth: false, cost: 1, method: :delete, path: "/margin/position" }, %{ auth: false, cost: 1, method: :delete, path: "/margin/position/isolated/{symbol}" }, %{ auth: false, cost: 1, method: :delete, path: "/spot/order" }, %{ auth: false, cost: 1, method: :delete, path: "/spot/order/{client_order_id}" }, %{ auth: false, cost: 30, method: :delete, path: "/wallet/crypto/withdraw/{id}" }, %{ auth: false, cost: 1, method: :patch, path: "/futures/order/{client_order_id}" }, %{ auth: false, cost: 1, method: :patch, path: "/margin/order/{client_order_id}" }, %{ auth: false, cost: 1, method: :patch, path: "/spot/order/{client_order_id}" } ], public: [ %{ auth: false, cost: 10, method: :get, path: "/public/candles" }, %{ auth: false, cost: 10, method: :get, path: "/public/candles/{symbol}" }, %{ auth: false, cost: 10, method: :get, path: "/public/converted/candles" }, %{ auth: false, cost: 10, method: :get, path: "/public/converted/candles/{symbol}" }, %{ auth: false, cost: 10, method: :get, path: "/public/currency" }, %{ auth: false, cost: 10, method: :get, path: "/public/currency/{currency}" }, %{ auth: false, cost: 10, method: :get, path: "/public/futures/candles/index_price" }, %{ auth: false, cost: 10, method: :get, path: "/public/futures/candles/index_price/{symbol}" }, %{ auth: false, cost: 10, method: :get, path: "/public/futures/candles/mark_price" }, %{ auth: false, cost: 10, method: :get, path: "/public/futures/candles/mark_price/{symbol}" }, %{ auth: false, cost: 10, method: :get, path: "/public/futures/candles/open_interest" }, %{ auth: false, cost: 10, method: :get, path: "/public/futures/candles/open_interest/{symbol}" }, %{ auth: false, cost: 10, method: :get, path: "/public/futures/candles/premium_index" }, %{ auth: false, cost: 10, method: :get, path: "/public/futures/candles/premium_index/{symbol}" }, %{ auth: false, cost: 10, method: :get, path: "/public/futures/history/funding" }, %{ auth: false, cost: 10, method: :get, path: "/public/futures/history/funding/{symbol}" }, %{ auth: false, cost: 10, method: :get, path: "/public/futures/info" }, %{ auth: false, cost: 10, method: :get, path: "/public/futures/info/{symbol}" }, %{ auth: false, cost: 10, method: :get, path: "/public/orderbook" }, %{ auth: false, cost: 10, method: :get, path: "/public/orderbook/{symbol}" }, %{ auth: false, cost: 10, method: :get, path: "/public/price/history" }, %{ auth: false, cost: 10, method: :get, path: "/public/price/rate" }, %{ auth: false, cost: 10, method: :get, path: "/public/price/ticker" }, %{ auth: false, cost: 10, method: :get, path: "/public/price/ticker/{symbol}" }, %{ auth: false, cost: 10, method: :get, path: "/public/symbol" }, %{ auth: false, cost: 10, method: :get, path: "/public/symbol/{symbol}" }, %{ auth: false, cost: 10, method: :get, path: "/public/ticker" }, %{ auth: false, cost: 10, method: :get, path: "/public/ticker/{symbol}" }, %{ auth: false, cost: 10, method: :get, path: "/public/trades" }, %{ auth: false, cost: 10, method: :get, path: "/public/trades/{symbol}" } ] }, required_credentials: %{ api_key: true, password: false, secret: true, uid: false }, requires_eddsa: false, response_error: nil, signing: %{ confidence: :medium, pattern: :hmac_sha256_headers, signature_encoding: :hex }, 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.1 }, "cost" => %{ "min" => 1.0e-7 }, "price" => %{ "min" => 1.0e-6 } }, sample_precision: %{ "amount" => 0.1, "price" => 1.0e-6 }, spot: %{ base: "XDC", base_id: "XDC", case: :upper, contract: false, id: "XDCUSDT", limits: %{ "amount" => %{ "min" => 0.1 }, "cost" => %{ "min" => 1.0e-7 }, "leverage" => %{ "max" => 1, "min" => 1 }, "price" => %{ "min" => 1.0e-6 } }, maker: 0.0001, precision: %{ "amount" => 0.1, "price" => 1.0e-6 }, quote: "USDT", quote_id: "USDT", separator: "", symbol: "XDC/USDT", taker: 0.001 } }, symbol_patterns: %{ spot: %{ case: :upper, component_order: nil, date_format: nil, pattern: :no_separator_upper, prefix: nil, separator: "", suffix: nil } }, timeframes: %{ "15m" => "M15", "1M" => "1M", "1d" => "D1", "1h" => "H1", "1m" => "M1", "1w" => "D7", "30m" => "M30", "3m" => "M3", "4h" => "H4", "5m" => "M5" }, url_strategy: %{ detected_from: "fallback", pattern: :no_prefix, prefix: nil }, urls: %{ api: "https://api.bequant.io/api/3", api_sections: %{ "private" => "https://api.bequant.io/api/3", "public" => "https://api.bequant.io/api/3" }, doc: [ "https://api.bequant.io/" ], other: nil, sandbox: %{ "private" => "https://api.demo.hitbtc.com/api/3", "public" => "https://api.demo.hitbtc.com/api/3" }, www: "https://bequant.io" }, version: "3", ws: %{ has: %{ watch_balance: true, watch_bids_asks: true, 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: true, watch_trades: true, watch_trades_for_symbols: false }, message_patterns: [ %{ args_field: "params", format: :method, keys: [ "method", "params" ], kind_field: "method", kind_value: "login", sources: [ :send, :watch ] }, %{ args_field: "params", format: :method, id_field: "id", keys: [ "id", "method", "params" ], kind_field: "method", kind_value: "spot_balance_subscribe", sources: [ :send, :watch ] }, %{ args_field: "params", format: :method, id_field: "id", keys: [ "id", "method", "params" ], kind_field: "method", kind_value: "spot_subscribe", sources: [ :send, :watch ] }, %{ args_field: "params", format: :method, id_field: "id", keys: [ "ch", "id", "limit", "method", "params" ], kind_field: "method", kind_value: "subscribe", sources: [ :send, :watch_multiple ] }, %{ args_field: "params", format: :method, id_field: "id", keys: [ "ch", "id", "method", "params" ], kind_field: "method", kind_value: "subscribe", sources: [ :send, :watch_multiple ] } ], options: %{ "watchBidsAsks" => %{ "method" => "orderbook/top/{speed}" }, "watchOrderBook" => %{ "method" => "orderbook/full" }, "watchTicker" => %{ "method" => "ticker/{speed}" }, "watchTickers" => %{ "method" => "ticker/{speed}" } }, streaming: %{ keep_alive: 4000 }, subscription_pattern: :custom, test_urls: %{ "private" => "wss://api.demo.hitbtc.com/api/3/ws/trading", "public" => "wss://api.demo.hitbtc.com/api/3/ws/public" }, urls: %{ "private" => "wss://api.bequant.io/api/3/ws/trading", "public" => "wss://api.bequant.io/api/3/ws/public" } } }