# Foxbit Exchange Specification # # Auto-generated by: mix ccxt.extract foxbit # CCXT version: 4.5.34 # Spec format version: 1 # # Review before use: # - signing: Detected from sign() method, verify with testnet # - endpoints: Raw paths extracted, map to unified API as needed # - exceptions: Extracted (exact, broad, HTTP status codes) # - features/options: Extracted from describe() # - classification: Set to :supported initially, promote after validation # %{ api_param_requirements: nil, certified: false, classification: :supported, comment: "Foxbit Exchange", countries: [ "pt-BR" ], currencies: %{}, currency_aliases: %{ "BCHSV" => "BSV", "XBT" => "BTC" }, dex: false, enable_rate_limit: true, endpoint_extraction_stats: %{ "capturedMethods" => 31, "coveragePercent" => 100, "enabledMethods" => 33, "excluded" => [ %{ "method" => "editOrder", "reason" => "emulated (returns cached data, no HTTP call)" } ], "excludedMethods" => 1, "extractableMethods" => 32, "failures" => [ %{ "error" => "foxbit does not have currency code BTC/USDT", "method" => "fetchTransactions" } ] }, endpoints: [ %{ api_section: "v3/private", auth: true, cost: 2, default_params: %{ "type" => "MARKET" }, market_type: :spot, method: :put, name: :cancel_all_orders, param_mappings: %{ "symbol" => "market_symbol" }, params: [ :symbol ], path: "/orders/cancel", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "v3/private", auth: true, cost: 2, default_params: %{ "type" => "ID" }, market_type: :spot, method: :put, name: :cancel_order, param_mappings: %{}, params: [ :id, :symbol ], path: "/orders/cancel", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "v3/private", auth: true, cost: 2, default_params: %{ "side" => "BUY", "type" => "LIMIT" }, market_type: :spot, method: :post, name: :create_limit_buy_order, param_mappings: %{ "amount" => "quantity", "symbol" => "market_symbol" }, params: [ :symbol, :amount, :price ], path: "/orders", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "v3/private", auth: true, cost: 2, default_params: %{ "type" => "LIMIT" }, market_type: :spot, method: :post, name: :create_limit_order, param_mappings: %{ "amount" => "quantity", "symbol" => "market_symbol" }, params: [ :symbol, :side, :amount, :price ], path: "/orders", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "v3/private", auth: true, cost: 2, default_params: %{ "side" => "SELL", "type" => "LIMIT" }, market_type: :spot, method: :post, name: :create_limit_sell_order, param_mappings: %{ "amount" => "quantity", "symbol" => "market_symbol" }, params: [ :symbol, :amount, :price ], path: "/orders", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "v3/private", auth: true, cost: 2, default_params: %{ "side" => "BUY", "type" => "MARKET" }, market_type: :spot, method: :post, name: :create_market_buy_order, param_mappings: %{ "amount" => "quantity", "symbol" => "market_symbol" }, params: [ :symbol, :amount ], path: "/orders", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "v3/private", auth: true, cost: 2, default_params: %{ "type" => "MARKET" }, market_type: :spot, method: :post, name: :create_market_order, param_mappings: %{ "amount" => "quantity", "symbol" => "market_symbol" }, params: [ :symbol, :side, :amount, :price ], path: "/orders", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "v3/private", auth: true, cost: 2, default_params: %{ "side" => "SELL", "type" => "MARKET" }, market_type: :spot, method: :post, name: :create_market_sell_order, param_mappings: %{ "amount" => "quantity", "symbol" => "market_symbol" }, params: [ :symbol, :amount ], path: "/orders", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "v3/private", auth: true, cost: 2, market_type: :spot, method: :post, name: :create_order, param_mappings: %{ "amount" => "quantity", "symbol" => "market_symbol" }, params: [ :symbol, :type, :side, :amount, :price ], path: "/orders", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "v3/private", auth: true, cost: 2, market_type: :spot, method: :get, name: :fetch_balance, param_mappings: %{}, params: [], path: "/accounts", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "v3/private", auth: true, cost: 2, default_params: %{ "state" => "CANCELED" }, market_type: :spot, method: :get, name: :fetch_canceled_orders, param_mappings: %{ "symbol" => "market_symbol" }, params: [ :symbol, :since, :limit ], path: "/orders", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "v3/private", auth: true, cost: 2, default_params: %{ "state" => "FILLED" }, market_type: :spot, method: :get, name: :fetch_closed_orders, param_mappings: %{ "symbol" => "market_symbol" }, params: [ :symbol, :since, :limit ], path: "/orders", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "v3/public", auth: false, cost: 5, market_type: :spot, method: :get, name: :fetch_currencies, param_mappings: %{}, params: [], path: "/currencies", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "v3/private", auth: true, cost: 10, market_type: :spot, method: :get, name: :fetch_deposit_address, param_mappings: %{ "code" => "currency_symbol" }, params: [ :code ], path: "/deposits/address", response_transformer: {:extract_path_unwrap, ["data"]}, source: :intercepted }, %{ api_section: "v3/private", auth: true, cost: 10, market_type: :spot, method: :get, name: :fetch_deposits, param_mappings: %{}, params: [ :code, :since, :limit ], path: "/deposits", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "v3/public", auth: false, cost: 6, default_params: %{ "depth" => 20 }, market_type: :spot, method: :get, name: :fetch_l2_order_book, param_mappings: %{ "symbol" => "market" }, params: [ :symbol, :limit ], path: "/markets/{market}/orderbook", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "v3/private", auth: true, cost: 60, market_type: :spot, method: :get, name: :fetch_ledger, param_mappings: %{ "code" => "symbol" }, params: [ :code, :since, :limit ], path: "/accounts/{symbol}/transactions", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "v3/public", auth: false, cost: 5, market_type: :spot, method: :get, name: :fetch_markets, param_mappings: %{}, params: [], path: "/markets", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "v3/private", auth: true, cost: 6, market_type: :spot, method: :get, name: :fetch_my_trades, param_mappings: %{ "symbol" => "market_symbol" }, params: [ :symbol, :since, :limit ], path: "/trades", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "v3/public", auth: false, cost: 12, default_params: %{ "start_time" => "2024-01-01T00:00:00.000Z" }, market_type: :spot, method: :get, name: :fetch_ohlcv, param_mappings: %{ "symbol" => "market", "timeframe" => "interval" }, params: [ :symbol, :timeframe, :since, :limit ], path: "/markets/{market}/candlesticks", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "v3/private", auth: true, cost: 2, default_params: %{ "state" => "ACTIVE" }, market_type: :spot, method: :get, name: :fetch_open_orders, param_mappings: %{ "symbol" => "market_symbol" }, params: [ :symbol, :since, :limit ], path: "/orders", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "v3/private", auth: true, cost: 2, market_type: :spot, method: :get, name: :fetch_order, param_mappings: %{}, params: [ :id, :symbol ], path: "/orders/by-order-id/{id}", response_transformer: {:extract_path_unwrap, ["data"]}, source: :intercepted }, %{ api_section: "v3/public", auth: false, cost: 6, market_type: :spot, method: :get, name: :fetch_order_book, param_mappings: %{ "limit" => "depth", "symbol" => "market" }, params: [ :symbol, :limit ], path: "/markets/{market}/orderbook", response_transformer: {:extract_path_unwrap, ["data"]}, source: :intercepted }, %{ api_section: "v3/private", auth: true, cost: 2, market_type: :spot, method: :get, name: :fetch_orders, param_mappings: %{ "symbol" => "market_symbol" }, params: [ :symbol, :since, :limit ], path: "/orders", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "v3/public", auth: false, cost: 15, market_type: :spot, method: :get, name: :fetch_ticker, param_mappings: %{ "symbol" => "market" }, params: [ :symbol ], path: "/markets/{market}/ticker/24hr", response_transformer: {:extract_path_unwrap, ["data"]}, source: :intercepted }, %{ api_section: "v3/public", auth: false, cost: 60, market_type: :spot, method: :get, name: :fetch_tickers, param_mappings: %{}, params: [ :symbols ], path: "/markets/ticker/24hr", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "v3/public", auth: false, cost: 12, market_type: :spot, method: :get, name: :fetch_trades, param_mappings: %{ "limit" => "page_size", "symbol" => "market" }, params: [ :symbol, :since, :limit ], path: "/markets/{market}/trades/history", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "v3/private", auth: true, cost: 60, market_type: :spot, method: :get, name: :fetch_trading_fee, param_mappings: %{}, params: [ :symbol ], path: "/me/fees/trading", response_transformer: {:extract_path_unwrap, ["data"]}, source: :intercepted }, %{ api_section: "v3/private", auth: true, cost: 60, market_type: :spot, method: :get, name: :fetch_trading_fees, param_mappings: %{}, params: [], path: "/me/fees/trading", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "v3/private", auth: true, cost: 10, market_type: :spot, method: :get, name: :fetch_withdrawals, param_mappings: %{}, params: [ :code, :since, :limit ], path: "/withdrawals", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "v3/private", auth: true, cost: 10, market_type: :spot, method: :post, name: :withdraw, param_mappings: %{ "address" => "destination_address", "code" => "currency_symbol" }, params: [ :code, :amount, :address, :tag ], path: "/withdrawals", response_transformer: {:extract_path, ["data"]}, source: :intercepted } ], error_code_details: %{ 2001 => %{ description: "Authentication error. Error authenticating request.", type: :invalid_credentials }, 2002 => %{ description: "Invalid signature. The signature for this request is not valid.", type: :invalid_credentials }, 2003 => %{ description: "Invalid access key. Access key missing, invalid or not found.", type: :invalid_credentials }, 2004 => %{ description: "Invalid timestamp. Invalid or missing timestamp.", type: :invalid_parameters }, 2005 => %{ description: "IP not allowed. The IP address {IP_ADDR} isn't on the trusted list for this API key.", type: :access_restricted }, 3001 => %{ description: "Permission denied. Permission denied for this request.", type: :access_restricted }, 3002 => %{ description: "KYC required. A greater level of KYC verification is required to proceed with this request.", type: :access_restricted }, 3003 => %{ description: "Member disabled. This member is disabled. Please get in touch with our support for more information.", type: :access_restricted }, 400 => %{ description: "Bad request. An unknown error occurred while processing request parameters.", type: :invalid_parameters }, 4001 => %{ description: "Validation error. A validation error occurred.", type: :invalid_parameters }, 4002 => %{ description: "Insufficient funds. Insufficient funds to proceed with this request.", type: :insufficient_balance }, 4003 => %{ description: "Quantity below the minimum allowed. Quantity below the minimum allowed to proceed with this request.", type: :invalid_order }, 4004 => %{ description: "Invalid symbol. The market or asset symbol is invalid or was not found.", type: :invalid_order }, 4005 => %{ description: "Invalid idempotent. Characters allowed are \"a-z\", \"0-9\", \"_\" or \"-\", and 36 at max. We recommend UUID v4 in lowercase.", type: :invalid_parameters }, 4007 => %{ description: "Locked error. There was an error in your allocated balance, please contact us.", type: :exchange_error }, 4008 => %{ description: "Cannot submit order. The order cannot be created.", type: :invalid_order }, 4009 => %{ description: "Invalid level. The sub-member does not have the required level to create the transaction.", type: :access_restricted }, 4011 => %{ description: "Too many open orders. You have reached the limit of open orders per market/side.", type: :rate_limited }, 4012 => %{ description: "Too many simultaneous account operations. We are currently unable to process your balance change due to simultaneous operations on your account. Please retry shortly.", type: :exchange_error }, 404 => %{ description: "Resource not found. A resource was not found while processing the request.", type: :invalid_parameters }, 429 => %{ description: "Too many requests. Request limit exceeded. Try again later.", type: :rate_limited }, 500 => %{ description: "Internal server error. An unknown error occurred while processing the request.", type: :exchange_error }, 5001 => %{ description: "Service unavailable. The requested resource is currently unavailable. Try again later.", type: :network_error }, 5002 => %{ description: "Service under maintenance. The requested resource is currently under maintenance. Try again later.", type: :network_error }, 5003 => %{ description: "Market under maintenance. The market is under maintenance. Try again later.", type: :network_error }, 5004 => %{ description: "Market is not deep enough. The market is not deep enough to complete your request.", type: :invalid_order }, 5005 => %{ description: "Price out of range from market. The order price is out of range from market to complete your request.", type: :invalid_order }, 5006 => %{ description: "Significant price deviation detected, exceeding acceptable limits. The order price is exceeding acceptable limits from market to complete your request.", type: :invalid_order } }, error_codes: %{ 2001 => :invalid_credentials, 2002 => :invalid_credentials, 2003 => :invalid_credentials, 2004 => :invalid_parameters, 2005 => :access_restricted, 3001 => :access_restricted, 3002 => :access_restricted, 3003 => :access_restricted, 400 => :invalid_parameters, 4001 => :invalid_parameters, 4002 => :insufficient_balance, 4003 => :invalid_order, 4004 => :invalid_order, 4005 => :invalid_parameters, 4007 => :exchange_error, 4008 => :invalid_order, 4009 => :access_restricted, 4011 => :rate_limited, 4012 => :exchange_error, 404 => :invalid_parameters, 429 => :rate_limited, 500 => :exchange_error, 5001 => :network_error, 5002 => :network_error, 5003 => :network_error, 5004 => :invalid_order, 5005 => :invalid_order, 5006 => :invalid_order }, exceptions: %{ exact: %{ "2001" => :authentication_error, "2002" => :authentication_error, "2003" => :authentication_error, "2004" => :bad_request, "2005" => :permission_denied, "3001" => :permission_denied, "3002" => :permission_denied, "3003" => :account_suspended, "400" => :bad_request, "4001" => :bad_request, "4002" => :insufficient_funds, "4003" => :invalid_order, "4004" => :bad_symbol, "4005" => :bad_request, "4007" => :exchange_error, "4008" => :invalid_order, "4009" => :permission_denied, "4011" => :rate_limit_exceeded, "4012" => :exchange_error, "404" => :bad_request, "429" => :rate_limit_exceeded, "500" => :exchange_error, "5001" => :exchange_not_available, "5002" => :on_maintenance, "5003" => :on_maintenance, "5004" => :invalid_order, "5005" => :invalid_order, "5006" => :invalid_order } }, exchange_options: %{ "defaultNetworkCodeReplacements" => %{ "BRC20" => %{ "BRC20" => "BTC" }, "CRO" => %{ "CRC20" => "CRONOS" }, "ETH" => %{ "ERC20" => "ETH" }, "TRX" => %{ "TRC20" => "TRX" } }, "networks" => %{ "ADA" => "cardano", "ALGO" => "algorand", "ARBITRUM" => "arbitrum", "ATOM" => "cosmos", "AVAX" => "avalanchecchain", "BCH" => "bitcoincash", "BEP20" => "bsc", "BTC" => "bitcoin", "DOGE" => "dogecoin", "DOT" => "polkadot", "ETH" => "erc20", "HBAR" => "hedera", "LTC" => "litecoin", "MATIC" => "polygon", "NEAR" => "near", "OPTIMISM" => "optimism", "SOL" => "solana", "STX" => "stacks", "TRC20" => "trc20", "XLM" => "stellar", "XRP" => "ripple", "XTZ" => "tezos" }, "networksById" => %{ "algorand" => "ALGO", "arbitrum" => "ARBITRUM", "avalanchecchain" => "AVAX", "bitcoin" => "BTC", "bitcoincash" => "BCH", "bsc" => "BEP20", "cardano" => "ADA", "cosmos" => "ATOM", "dogecoin" => "DOGE", "erc20" => "ETH", "hedera" => "HBAR", "litecoin" => "LTC", "near" => "NEAR", "optimism" => "OPTIMISM", "polkadot" => "DOT", "polygon" => "MATIC", "ripple" => "XRP", "solana" => "SOL", "stacks" => "STX", "stellar" => "XLM", "tezos" => "XTZ", "trc20" => "TRC20" }, "sandboxMode" => false }, extended_metadata: %{ limits: %{ "amount" => %{}, "cost" => %{}, "leverage" => %{}, "price" => %{} }, logo_url: "https://github.com/user-attachments/assets/1f8faca2-ae2f-4222-b33e-5671e7d873dd" }, extracted_metadata: %{ ccxt_version: "4.5.34" }, features: %{ spot: %{ create_order: %{ hedged: false, iceberg_amount: false, leverage: false, margin_mode: false, market_buy_by_cost: false, market_buy_requires_price: false, self_trade_prevention: %{ expire_both: true, expire_maker: true, expire_taker: true, none: true }, stop_loss_price: false, take_profit_price: false, time_in_force: %{ fok: true, gtc: true, gtd: false, ioc: true, po: true }, trailing: false, trigger_direction: false, trigger_price: true, trigger_price_type: %{ index: false, last: true, mark: false } }, create_orders: %{ max: 5 }, fetch_closed_orders: %{ days_back: 90, days_back_canceled: 90, limit: 100, margin_mode: true, symbol_required: false, trailing: false, trigger: false, until_days: 10000 }, fetch_my_trades: %{ days_back: 90, limit: 100, margin_mode: false, symbol_required: true, until_days: 10000 }, fetch_ohlcv: %{ limit: 500 }, fetch_open_orders: %{ days_back: 90, limit: 100, margin_mode: false, symbol_required: false, trailing: false, trigger: false }, fetch_order: %{ days_back: 90, limit: 1, margin_mode: false, symbol_required: false, trailing: false, trigger: false }, fetch_orders: %{ days_back: 90, limit: 100, margin_mode: true, symbol_required: false, trailing: false, trigger: false, until_days: 10000 }, sandbox: false } }, fees: %{ trading: %{ fee_side: "get", maker: 0.0025, percentage: true, taker: 0.005, tier_based: false } }, handle_content_type_application_zip: nil, handle_errors_source: "handleErrors(httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody) {\n if (response === undefined) {\n return undefined;\n }\n const error = this.safeDict(response, 'error');\n const code = this.safeString(error, 'code');\n const details = this.safeList(error, 'details');\n const message = this.safeString(error, 'message');\n let detailsString = '';\n if (details) {\n for (let i = 0; i < details.length; i++) {\n detailsString = detailsString + details[i] + ' ';\n }\n }\n if (error !== undefined) {\n const feedback = this.id + ' ' + message + ' details: ' + detailsString;\n this.throwBroadlyMatchedException(this.exceptions['broad'], message, feedback);\n this.throwBroadlyMatchedException(this.exceptions['broad'], detailsString, feedback);\n this.throwExactlyMatchedException(this.exceptions['exact'], code, feedback);\n throw new errors.ExchangeError(feedback);\n }\n return undefined;\n }", has: %{ add_margin: false, borrow_cross_margin: false, borrow_isolated_margin: false, borrow_margin: false, c_o_r_s: true, cancel_all_orders: true, cancel_all_orders_ws: false, cancel_order: true, cancel_order_with_client_order_id: false, cancel_order_ws: false, cancel_orders: false, cancel_orders_with_client_order_id: false, cancel_orders_ws: false, close_all_positions: false, close_position: false, create_deposit_address: false, create_limit_buy_order: true, create_limit_buy_order_ws: false, create_limit_order: true, create_limit_order_ws: false, create_limit_sell_order: true, create_limit_sell_order_ws: false, create_market_buy_order: true, 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: true, create_market_sell_order_with_cost: false, create_market_sell_order_with_cost_ws: false, create_market_sell_order_ws: false, create_order: true, create_order_with_take_profit_and_stop_loss: false, create_order_with_take_profit_and_stop_loss_ws: false, create_order_ws: false, create_orders: false, create_post_only_order: false, create_post_only_order_ws: false, create_reduce_only_order: false, create_reduce_only_order_ws: false, create_stop_limit_order: false, create_stop_limit_order_ws: false, create_stop_loss_order: false, create_stop_loss_order_ws: false, create_stop_market_order: false, create_stop_market_order_ws: false, create_stop_order: false, create_stop_order_ws: false, create_take_profit_order: false, create_take_profit_order_ws: false, create_trailing_amount_order: false, create_trailing_amount_order_ws: false, create_trailing_percent_order: false, create_trailing_percent_order_ws: false, create_trigger_order: false, create_trigger_order_ws: false, deposit: false, edit_order: true, edit_order_with_client_order_id: false, edit_order_ws: false, edit_orders: false, fecth_order_book: true, fetch_accounts: false, fetch_balance: true, fetch_balance_ws: false, fetch_bids_asks: false, fetch_borrow_interest: false, fetch_borrow_rate: false, fetch_borrow_rate_histories: false, fetch_borrow_rate_history: false, fetch_borrow_rates: false, fetch_borrow_rates_per_symbol: false, fetch_canceled_and_closed_orders: false, fetch_canceled_orders: true, fetch_closed_order: false, fetch_closed_orders: true, fetch_closed_orders_ws: false, fetch_convert_currencies: false, fetch_convert_quote: false, fetch_convert_trade: false, fetch_convert_trade_history: false, fetch_cross_borrow_rate: false, fetch_cross_borrow_rates: false, fetch_currencies: true, fetch_currencies_ws: true, fetch_deposit: false, fetch_deposit_address: true, fetch_deposit_addresses: false, fetch_deposit_addresses_by_network: false, fetch_deposit_withdraw_fee: false, fetch_deposit_withdraw_fees: false, fetch_deposits: true, fetch_deposits_withdrawals: false, fetch_deposits_ws: false, fetch_funding_history: false, fetch_funding_interval: false, fetch_funding_intervals: false, fetch_funding_rate: false, fetch_funding_rate_history: false, fetch_funding_rates: false, fetch_greeks: false, fetch_index_ohlcv: false, fetch_isolated_borrow_rate: false, fetch_isolated_borrow_rates: false, fetch_isolated_positions: false, fetch_l2_order_book: true, fetch_l3_order_book: false, fetch_last_prices: false, fetch_ledger: true, fetch_ledger_entry: false, fetch_leverage: false, fetch_leverage_tiers: false, fetch_leverages: false, fetch_liquidations: false, fetch_long_short_ratio: false, fetch_long_short_ratio_history: false, fetch_margin_adjustment_history: false, fetch_margin_mode: false, fetch_margin_modes: false, fetch_mark_ohlcv: false, fetch_mark_prices: false, fetch_market_leverage_tiers: false, fetch_markets: true, fetch_markets_ws: false, fetch_my_liquidations: false, fetch_my_settlement_history: false, fetch_my_trades: true, fetch_my_trades_ws: false, fetch_ohlcv: true, fetch_ohlcv_ws: false, fetch_open_interest: false, fetch_open_interest_history: false, fetch_open_interests: false, fetch_open_order: false, fetch_open_orders: true, fetch_open_orders_ws: false, fetch_option: false, fetch_option_chain: false, fetch_order: true, fetch_order_book: true, fetch_order_book_ws: false, fetch_order_books: false, fetch_order_trades: false, fetch_order_with_client_order_id: false, fetch_order_ws: false, fetch_orders: true, fetch_orders_by_status: false, fetch_orders_ws: false, fetch_position: false, fetch_position_history: false, fetch_position_mode: false, fetch_position_ws: false, fetch_positions: false, fetch_positions_for_symbol: false, fetch_positions_for_symbol_ws: false, fetch_positions_history: false, fetch_positions_risk: false, fetch_positions_ws: false, fetch_premium_index_ohlcv: false, fetch_settlement_history: false, fetch_status: false, fetch_ticker: true, fetch_ticker_ws: false, fetch_tickers: true, fetch_tickers_ws: false, fetch_time: false, fetch_trades: true, fetch_trades_ws: false, fetch_trading_fee: 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, load_markets: true, margin: false, option: false, private_api: true, public_api: true, reduce_margin: false, repay_cross_margin: false, repay_isolated_margin: false, sandbox: false, set_leverage: false, set_margin: false, set_margin_mode: false, set_position_mode: false, sign_in: false, spot: true, swap: false, transfer: false, un_watch_my_trades: false, un_watch_ohlcv: false, un_watch_ohlcv_for_symbols: false, un_watch_order_book: false, un_watch_order_book_for_symbols: false, un_watch_orders: false, un_watch_positions: false, un_watch_ticker: false, un_watch_tickers: false, un_watch_trades: false, un_watch_trades_for_symbols: false, watch_balance: false, watch_bids_asks: false, watch_liquidations: false, watch_liquidations_for_symbols: false, watch_my_liquidations: false, watch_my_liquidations_for_symbols: false, watch_my_trades: false, watch_ohlcv: false, watch_ohlcv_for_symbols: false, watch_order_book: false, watch_order_book_for_symbols: false, watch_orders: false, watch_orders_for_symbols: false, watch_position: false, watch_positions: false, watch_status: false, watch_ticker: false, watch_tickers: false, watch_trades: false, watch_trades_for_symbols: false, withdraw: true, ws: false }, http_config: nil, id: "foxbit", markets: nil, name: "Foxbit", ohlcv_timestamp_resolution: :unknown, options: %{ networks: %{ "ADA" => "cardano", "ALGO" => "algorand", "ARBITRUM" => "arbitrum", "ATOM" => "cosmos", "AVAX" => "avalanchecchain", "BCH" => "bitcoincash", "BEP20" => "bsc", "BTC" => "bitcoin", "DOGE" => "dogecoin", "DOT" => "polkadot", "ETH" => "erc20", "HBAR" => "hedera", "LTC" => "litecoin", "MATIC" => "polygon", "NEAR" => "near", "OPTIMISM" => "optimism", "SOL" => "solana", "STX" => "stacks", "TRC20" => "trc20", "XLM" => "stellar", "XRP" => "ripple", "XTZ" => "tezos" }, networks_by_id: %{ "algorand" => "ALGO", "arbitrum" => "ARBITRUM", "avalanchecchain" => "AVAX", "bitcoin" => "BTC", "bitcoincash" => "BCH", "bsc" => "BEP20", "cardano" => "ADA", "cosmos" => "ATOM", "dogecoin" => "DOGE", "erc20" => "ETH", "hedera" => "HBAR", "litecoin" => "LTC", "near" => "NEAR", "optimism" => "OPTIMISM", "polkadot" => "DOT", "polygon" => "MATIC", "ripple" => "XRP", "solana" => "SOL", "stacks" => "STX", "stellar" => "XLM", "tezos" => "XTZ", "trc20" => "TRC20" }, sandbox_mode: false }, order_mappings: %{ side_format: :uppercase, side_key: "side", type_format: :uppercase, type_key: "type" }, param_mappings: %{ "address" => "destination_address", "amount" => "quantity", "code" => "currency_symbol", "limit" => "page_size", "symbol" => "market", "timeframe" => "interval" }, parse_methods: [ %{ "comment" => nil, "examples" => [], "line_end" => 1842, "line_start" => 1830, "mappings" => [ %{ "comment" => nil, "key" => "address", "value" => "this.safeString (depositAddress, 'address')" }, %{ "comment" => nil, "key" => "tag", "value" => "this.safeString (depositAddress, 'tag')" }, %{ "comment" => nil, "key" => "currency", "value" => "currencyCode" }, %{ "comment" => nil, "key" => "network", "value" => "unifiedNetwork" }, %{ "comment" => nil, "key" => "info", "value" => "depositAddress" } ], "name" => "parseDepositAddress", "signature" => "parseDepositAddress (depositAddress, currency: Currency = undefined)", "source" => "parseDepositAddress (depositAddress, currency: Currency = undefined) {\n const network = this.safeDict (depositAddress, 'network');\n const networkId = this.safeString (network, 'code');\n const currencyCode = this.safeCurrencyCode (undefined, currency);\n const unifiedNetwork = this.networkIdToCode (networkId, currencyCode);\n return {\n 'address': this.safeString (depositAddress, 'address'),\n 'tag': this.safeString (depositAddress, 'tag'),\n 'currency': currencyCode,\n 'network': unifiedNetwork,\n 'info': depositAddress,\n };\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"uuid\": \"f8e9f2d6-3c1e-4f2d-8f8e-9f2d6c1e4f2d\",\n \"amount\": \"0.0001\",\n \"balance\": \"0.0002\",\n \"created_at\": \"2021-07-01T12:00:00Z\",\n \"currency_symbol\": \"btc\",\n \"fee\": \"0.0001\",\n \"locked\": \"0.0001\",\n \"locked_amount\": \"0.0001\",\n \"reason_type\": \"DEPOSITING\"\n }" ], "line_end" => 1975, "line_start" => 1927, "mappings" => [ %{ "comment" => nil, "key" => "id", "value" => "id" }, %{ "comment" => nil, "key" => "info", "value" => "item" }, %{ "comment" => nil, "key" => "timestamp", "value" => "timestamp" }, %{ "comment" => nil, "key" => "datetime", "value" => "this.iso8601 (timestamp)" }, %{ "comment" => nil, "key" => "direction", "value" => "direction" }, %{ "comment" => nil, "key" => "account", "value" => "undefined" }, %{ "comment" => nil, "key" => "referenceId", "value" => "undefined" }, %{ "comment" => nil, "key" => "referenceAccount", "value" => "undefined" }, %{ "comment" => nil, "key" => "type", "value" => "type" }, %{ "comment" => nil, "key" => "currency", "value" => "currencySymbol" }, %{ "comment" => nil, "key" => "amount", "value" => "realAmount" }, %{ "comment" => nil, "key" => "before", "value" => "balance - amount" }, %{ "comment" => nil, "key" => "after", "value" => "balance" }, %{ "comment" => nil, "key" => "status", "value" => "'ok'" }, %{ "comment" => nil, "key" => "fee", "value" => "fee" }, %{ "comment" => nil, "key" => "cost", "value" => "this.safeNumber (item, 'fee')" } ], "name" => "parseLedgerEntry", "signature" => "parseLedgerEntry (item: Dict, currency: Currency = undefined)", "source" => "parseLedgerEntry (item: Dict, currency: Currency = undefined) {\n // {\n // \"uuid\": \"f8e9f2d6-3c1e-4f2d-8f8e-9f2d6c1e4f2d\",\n // \"amount\": \"0.0001\",\n // \"balance\": \"0.0002\",\n // \"created_at\": \"2021-07-01T12:00:00Z\",\n // \"currency_symbol\": \"btc\",\n // \"fee\": \"0.0001\",\n // \"locked\": \"0.0001\",\n // \"locked_amount\": \"0.0001\",\n // \"reason_type\": \"DEPOSITING\"\n // }\n const id = this.safeString (item, 'uuid');\n const createdAt = this.safeString (item, 'created_at');\n const timestamp = this.parse8601 (createdAt);\n const reasonType = this.safeString (item, 'reason_type');\n const type = this.parseLedgerEntryType (reasonType);\n const exchangeSymbol = this.safeString (item, 'currency_symbol');\n const currencySymbol = this.safeCurrencyCode (exchangeSymbol);\n let direction = 'in';\n const amount = this.safeNumber (item, 'amount');\n let realAmount = amount;\n const balance = this.safeNumber (item, 'balance');\n const fee = {\n 'cost': this.safeNumber (item, 'fee'),\n 'currency': currencySymbol,\n };\n if (amount < 0) {\n direction = 'out';\n realAmount = amount * -1;\n }\n return {\n 'id': id,\n 'info': item,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'direction': direction,\n 'account': undefined,\n 'referenceId': undefined,\n 'referenceAccount': undefined,\n 'type': type,\n 'currency': currencySymbol,\n 'amount': realAmount,\n 'before': balance - amount,\n 'after': balance,\n 'status': 'ok',\n 'fee': fee,\n };\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 1925, "line_start" => 1916, "mappings" => [], "name" => "parseLedgerEntryType", "signature" => "parseLedgerEntryType (type)", "source" => "parseLedgerEntryType (type) {\n const types: Dict = {\n 'DEPOSITING': 'transaction',\n 'WITHDRAWING': 'transaction',\n 'TRADING': 'trade',\n 'INTERNAL_TRANSFERING': 'transfer',\n 'OTHERS': 'transaction',\n };\n return this.safeString (types, type, type);\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 1673, "line_start" => 1609, "mappings" => [ %{ "comment" => nil, "key" => "id", "value" => "id" }, %{ "comment" => nil, "key" => "symbol", "value" => "symbol" }, %{ "comment" => nil, "key" => "base", "value" => "base" }, %{ "comment" => nil, "key" => "quote", "value" => "quote" }, %{ "comment" => nil, "key" => "baseId", "value" => "baseId" }, %{ "comment" => nil, "key" => "quoteId", "value" => "quoteId" }, %{ "comment" => nil, "key" => "active", "value" => "true" }, %{ "comment" => nil, "key" => "type", "value" => "'spot'" }, %{ "comment" => nil, "key" => "spot", "value" => "true" }, %{ "comment" => nil, "key" => "margin", "value" => "false" }, %{ "comment" => nil, "key" => "future", "value" => "false" }, %{ "comment" => nil, "key" => "swap", "value" => "false" }, %{ "comment" => nil, "key" => "option", "value" => "false" }, %{ "comment" => nil, "key" => "contract", "value" => "false" }, %{ "comment" => nil, "key" => "settle", "value" => "undefined" }, %{ "comment" => nil, "key" => "settleId", "value" => "undefined" }, %{ "comment" => nil, "key" => "contractSize", "value" => "undefined" }, %{ "comment" => nil, "key" => "linear", "value" => "undefined" }, %{ "comment" => nil, "key" => "inverse", "value" => "undefined" }, %{ "comment" => nil, "key" => "expiry", "value" => "undefined" }, %{ "comment" => nil, "key" => "expiryDatetime", "value" => "undefined" }, %{ "comment" => nil, "key" => "strike", "value" => "undefined" }, %{ "comment" => nil, "key" => "optionType", "value" => "undefined" }, %{ "comment" => nil, "key" => "taker", "value" => "this.safeNumber (fees, 'taker')" }, %{ "comment" => nil, "key" => "maker", "value" => "this.safeNumber (fees, 'maker')" }, %{ "comment" => nil, "key" => "percentage", "value" => "true" }, %{ "comment" => nil, "key" => "tierBased", "value" => "false" }, %{ "comment" => nil, "key" => "feeSide", "value" => "'get'" }, %{ "comment" => nil, "key" => "precision", "value" => "{\n 'price': this.safeInteger (quoteAssets, 'precision'),\n 'amount': this.safeInteger (baseAssets, 'precision'),\n 'cost': this.safeInteger (quoteAssets, 'precision'),\n }" }, %{ "comment" => nil, "key" => "limits", "value" => "{\n 'amount': {\n 'min': this.safeNumber (market, 'quantity_min'),\n 'max': undefined,\n },\n 'price': {\n 'min': this.safeNumber (market, 'price_min'),\n 'max': undefined,\n },\n 'cost': {\n 'min': undefined,\n 'max': undefined,\n },\n 'leverage': {\n 'min': undefined,\n 'max': undefined,\n },\n }" }, %{ "comment" => nil, "key" => "info", "value" => "market" }, %{ "comment" => nil, "key" => "price", "value" => "this.safeInteger (quoteAssets, 'precision')" }, %{ "comment" => nil, "key" => "amount", "value" => "this.safeInteger (baseAssets, 'precision')" }, %{ "comment" => nil, "key" => "cost", "value" => "this.safeInteger (quoteAssets, 'precision')" }, %{ "comment" => nil, "key" => "amount", "value" => "{\n 'min': this.safeNumber (market, 'quantity_min'),\n 'max': undefined,\n }" }, %{ "comment" => nil, "key" => "price", "value" => "{\n 'min': this.safeNumber (market, 'price_min'),\n 'max': undefined,\n }" }, %{ "comment" => nil, "key" => "cost", "value" => "{\n 'min': undefined,\n 'max': undefined,\n }" }, %{ "comment" => nil, "key" => "leverage", "value" => "{\n 'min': undefined,\n 'max': undefined,\n }" }, %{ "comment" => nil, "key" => "min", "value" => "this.safeNumber (market, 'price_min')" }, %{ "comment" => nil, "key" => "max", "value" => "undefined" }, %{ "comment" => nil, "key" => "min", "value" => "undefined" } ], "name" => "parseMarket", "signature" => "parseMarket (market: Dict): Market", "source" => "parseMarket (market: Dict): Market {\n const id = this.safeString (market, 'symbol');\n const baseAssets = this.safeDict (market, 'base');\n const baseId = this.safeString (baseAssets, 'symbol');\n const quoteAssets = this.safeDict (market, 'quote');\n const quoteId = this.safeString (quoteAssets, 'symbol');\n const base = this.safeCurrencyCode (baseId);\n const quote = this.safeCurrencyCode (quoteId);\n const symbol = base + '/' + quote;\n const fees = this.safeDict (market, 'default_fees');\n return this.safeMarketStructure ({\n 'id': id,\n 'symbol': symbol,\n 'base': base,\n 'quote': quote,\n 'baseId': baseId,\n 'quoteId': quoteId,\n 'active': true,\n 'type': 'spot',\n 'spot': true,\n 'margin': false,\n 'future': false,\n 'swap': false,\n 'option': false,\n 'contract': false,\n 'settle': undefined,\n 'settleId': undefined,\n 'contractSize': undefined,\n 'linear': undefined,\n 'inverse': undefined,\n 'expiry': undefined,\n 'expiryDatetime': undefined,\n 'strike': undefined,\n 'optionType': undefined,\n 'taker': this.safeNumber (fees, 'taker'),\n 'maker': this.safeNumber (fees, 'maker'),\n 'percentage': true,\n 'tierBased': false,\n 'feeSide': 'get',\n 'precision': {\n 'price': this.safeInteger (quoteAssets, 'precision'),\n 'amount': this.safeInteger (baseAssets, 'precision'),\n 'cost': this.safeInteger (quoteAssets, 'precision'),\n },\n 'limits': {\n 'amount': {\n 'min': this.safeNumber (market, 'quantity_min'),\n 'max': undefined,\n },\n 'price': {\n 'min': this.safeNumber (market, 'price_min'),\n 'max': undefined,\n },\n 'cost': {\n 'min': undefined,\n 'max': undefined,\n },\n 'leverage': {\n 'min': undefined,\n 'max': undefined,\n },\n },\n 'info': market,\n });\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 1728, "line_start" => 1719, "mappings" => [], "name" => "parseOHLCV", "signature" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV", "source" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV {\n return [\n this.safeInteger (ohlcv, 0),\n this.safeNumber (ohlcv, 1),\n this.safeNumber (ohlcv, 2),\n this.safeNumber (ohlcv, 3),\n this.safeNumber (ohlcv, 4),\n this.safeNumber (ohlcv, 6),\n ];\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 1828, "line_start" => 1771, "mappings" => [ %{ "comment" => nil, "key" => "id", "value" => "this.safeString (order, 'id')" }, %{ "comment" => nil, "key" => "info", "value" => "order" }, %{ "comment" => nil, "key" => "clientOrderId", "value" => "this.safeString (order, 'client_order_id')" }, %{ "comment" => nil, "key" => "timestamp", "value" => "timestamp" }, %{ "comment" => nil, "key" => "datetime", "value" => "this.iso8601 (timestamp)" }, %{ "comment" => nil, "key" => "lastTradeTimestamp", "value" => "undefined" }, %{ "comment" => nil, "key" => "status", "value" => "this.parseOrderStatus (this.safeString (order, 'state'))" }, %{ "comment" => nil, "key" => "symbol", "value" => "this.safeString (market, 'symbol')" }, %{ "comment" => nil, "key" => "type", "value" => "this.safeString (order, 'type')" }, %{ "comment" => nil, "key" => "timeInForce", "value" => "this.safeString (order, 'time_in_force')" }, %{ "comment" => nil, "key" => "postOnly", "value" => "this.safeBool (order, 'post_only')" }, %{ "comment" => nil, "key" => "reduceOnly", "value" => "undefined" }, %{ "comment" => nil, "key" => "side", "value" => "side" }, %{ "comment" => nil, "key" => "price", "value" => "this.parseNumber (price)" }, %{ "comment" => nil, "key" => "triggerPrice", "value" => "this.safeNumber (order, 'stop_price')" }, %{ "comment" => nil, "key" => "takeProfitPrice", "value" => "undefined" }, %{ "comment" => nil, "key" => "stopLossPrice", "value" => "undefined" }, %{ "comment" => nil, "key" => "cost", "value" => "this.parseNumber (cost)" }, %{ "comment" => nil, "key" => "average", "value" => "this.safeNumber (order, 'price_avg')" }, %{ "comment" => nil, "key" => "amount", "value" => "this.parseNumber (amount)" }, %{ "comment" => nil, "key" => "filled", "value" => "this.parseNumber (filled)" }, %{ "comment" => nil, "key" => "remaining", "value" => "this.parseNumber (remaining)" }, %{ "comment" => nil, "key" => "trades", "value" => "undefined" }, %{ "comment" => nil, "key" => "fee", "value" => "{\n 'currency': feeCurrency,\n 'cost': this.safeNumber (order, 'fee_paid'),\n }" }, %{ "comment" => nil, "key" => "currency", "value" => "feeCurrency" }, %{ "comment" => nil, "key" => "cost", "value" => "this.safeNumber (order, 'fee_paid')" } ], "name" => "parseOrder", "signature" => "parseOrder (order, market = undefined): Order", "source" => "parseOrder (order, market = undefined): Order {\n let symbol = this.safeString (order, 'market_symbol');\n if (market === undefined && symbol !== undefined) {\n market = this.market (symbol);\n }\n if (market !== undefined) {\n symbol = market['symbol'];\n }\n const timestamp = this.parseDate (this.safeString (order, 'created_at'));\n const price = this.safeString (order, 'price');\n const filled = this.safeString (order, 'quantity_executed');\n const remaining = this.safeString (order, 'quantity');\n // TODO: validate logic of amount here, should this be calculated?\n let amount = undefined;\n if (remaining !== undefined && filled !== undefined) {\n amount = Precise.stringAdd (remaining, filled);\n }\n let cost = this.safeString (order, 'funds_received');\n if (!cost) {\n const priceAverage = this.safeString (order, 'price_avg');\n const priceToCalculate = this.safeString (order, 'price', priceAverage);\n cost = Precise.stringMul (priceToCalculate, amount);\n }\n const side = this.safeStringLower (order, 'side');\n let feeCurrency = this.safeStringUpper (market, 'quoteId');\n if (side === 'buy') {\n feeCurrency = this.safeStringUpper (market, 'baseId');\n }\n return this.safeOrder ({\n 'id': this.safeString (order, 'id'),\n 'info': order,\n 'clientOrderId': this.safeString (order, 'client_order_id'),\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'lastTradeTimestamp': undefined,\n 'status': this.parseOrderStatus (this.safeString (order, 'state')),\n 'symbol': this.safeString (market, 'symbol'),\n 'type': this.safeString (order, 'type'),\n 'timeInForce': this.safeString (order, 'time_in_force'),\n 'postOnly': this.safeBool (order, 'post_only'),\n 'reduceOnly': undefined,\n 'side': side,\n 'price': this.parseNumber (price),\n 'triggerPrice': this.safeNumber (order, 'stop_price'),\n 'takeProfitPrice': undefined,\n 'stopLossPrice': undefined,\n 'cost': this.parseNumber (cost),\n 'average': this.safeNumber (order, 'price_avg'),\n 'amount': this.parseNumber (amount),\n 'filled': this.parseNumber (filled),\n 'remaining': this.parseNumber (remaining),\n 'trades': undefined,\n 'fee': {\n 'currency': feeCurrency,\n 'cost': this.safeNumber (order, 'fee_paid'),\n },\n });\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 1769, "line_start" => 1759, "mappings" => [], "name" => "parseOrderStatus", "signature" => "parseOrderStatus (status: Str)", "source" => "parseOrderStatus (status: Str) {\n const statuses: Dict = {\n 'PARTIALLY_CANCELED': 'open',\n 'ACTIVE': 'open',\n 'PARTIALLY_FILLED': 'open',\n 'FILLED': 'closed',\n 'PENDING_CANCEL': 'canceled',\n 'CANCELED': 'canceled',\n };\n return this.safeString (statuses, status, status);\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 1717, "line_start" => 1686, "mappings" => [ %{ "comment" => nil, "key" => "symbol", "value" => "symbol" }, %{ "comment" => nil, "key" => "timestamp", "value" => "this.parseDate (this.safeString (lastTrade, 'date'))" }, %{ "comment" => nil, "key" => "datetime", "value" => "this.iso8601 (this.parseDate (this.safeString (lastTrade, 'date')))" }, %{ "comment" => nil, "key" => "high", "value" => "this.safeNumber (rolling_24h, 'high')" }, %{ "comment" => nil, "key" => "low", "value" => "this.safeNumber (rolling_24h, 'low')" }, %{ "comment" => nil, "key" => "bid", "value" => "this.safeNumber (bestBid, 'price')" }, %{ "comment" => nil, "key" => "bidVolume", "value" => "this.safeNumber (bestBid, 'volume')" }, %{ "comment" => nil, "key" => "ask", "value" => "this.safeNumber (bestAsk, 'price')" }, %{ "comment" => nil, "key" => "askVolume", "value" => "this.safeNumber (bestAsk, 'volume')" }, %{ "comment" => nil, "key" => "vwap", "value" => "undefined" }, %{ "comment" => nil, "key" => "open", "value" => "this.safeNumber (rolling_24h, 'open')" }, %{ "comment" => nil, "key" => "close", "value" => "lastPrice" }, %{ "comment" => nil, "key" => "last", "value" => "lastPrice" }, %{ "comment" => nil, "key" => "previousClose", "value" => "undefined" }, %{ "comment" => nil, "key" => "change", "value" => "this.safeString (rolling_24h, 'price_change')" }, %{ "comment" => nil, "key" => "percentage", "value" => "this.safeString (rolling_24h, 'price_change_percent')" }, %{ "comment" => nil, "key" => "average", "value" => "undefined" }, %{ "comment" => nil, "key" => "baseVolume", "value" => "this.safeString (rolling_24h, 'volume')" }, %{ "comment" => nil, "key" => "quoteVolume", "value" => "this.safeString (rolling_24h, 'quote_volume')" }, %{ "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 const marketId = this.safeString (ticker, 'market_symbol');\n const symbol = this.safeSymbol (marketId, market, undefined, 'spot');\n const rolling_24h = ticker['rolling_24h'];\n const best = this.safeDict (ticker, 'best');\n const bestAsk = this.safeDict (best, 'ask');\n const bestBid = this.safeDict (best, 'bid');\n const lastTrade = ticker['last_trade'];\n const lastPrice = this.safeString (lastTrade, 'price');\n return this.safeTicker ({\n 'symbol': symbol,\n 'timestamp': this.parseDate (this.safeString (lastTrade, 'date')),\n 'datetime': this.iso8601 (this.parseDate (this.safeString (lastTrade, 'date'))),\n 'high': this.safeNumber (rolling_24h, 'high'),\n 'low': this.safeNumber (rolling_24h, 'low'),\n 'bid': this.safeNumber (bestBid, 'price'),\n 'bidVolume': this.safeNumber (bestBid, 'volume'),\n 'ask': this.safeNumber (bestAsk, 'price'),\n 'askVolume': this.safeNumber (bestAsk, 'volume'),\n 'vwap': undefined,\n 'open': this.safeNumber (rolling_24h, 'open'),\n 'close': lastPrice,\n 'last': lastPrice,\n 'previousClose': undefined,\n 'change': this.safeString (rolling_24h, 'price_change'),\n 'percentage': this.safeString (rolling_24h, 'price_change_percent'),\n 'average': undefined,\n 'baseVolume': this.safeString (rolling_24h, 'volume'),\n 'quoteVolume': this.safeString (rolling_24h, 'quote_volume'),\n 'info': ticker,\n }, market);\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 1757, "line_start" => 1730, "mappings" => [ %{ "comment" => nil, "key" => "currency", "value" => "this.safeSymbol (this.safeString (trade, 'fee_currency_symbol'))" }, %{ "comment" => nil, "key" => "cost", "value" => "this.safeNumber (trade, 'fee')" }, %{ "comment" => nil, "key" => "rate", "value" => "undefined" }, %{ "comment" => nil, "key" => "id", "value" => "this.safeString (trade, 'id')" }, %{ "comment" => nil, "key" => "info", "value" => "trade" }, %{ "comment" => nil, "key" => "timestamp", "value" => "timestamp" }, %{ "comment" => nil, "key" => "datetime", "value" => "this.iso8601 (timestamp)" }, %{ "comment" => nil, "key" => "symbol", "value" => "market['symbol']" }, %{ "comment" => nil, "key" => "order", "value" => "undefined" }, %{ "comment" => nil, "key" => "type", "value" => "undefined" }, %{ "comment" => nil, "key" => "side", "value" => "side" }, %{ "comment" => nil, "key" => "takerOrMaker", "value" => "undefined" }, %{ "comment" => nil, "key" => "price", "value" => "price" }, %{ "comment" => nil, "key" => "amount", "value" => "amount" }, %{ "comment" => nil, "key" => "cost", "value" => "cost" }, %{ "comment" => nil, "key" => "fee", "value" => "fee" } ], "name" => "parseTrade", "signature" => "parseTrade (trade, market = undefined): Trade", "source" => "parseTrade (trade, market = undefined): Trade {\n const timestamp = this.parseDate (this.safeString (trade, 'created_at'));\n const price = this.safeString (trade, 'price');\n const amount = this.safeString (trade, 'volume', this.safeString (trade, 'quantity'));\n const privateSideField = this.safeStringLower (trade, 'side');\n const side = this.safeStringLower (trade, 'taker_side', privateSideField);\n const cost = Precise.stringMul (price, amount);\n const fee = {\n 'currency': this.safeSymbol (this.safeString (trade, 'fee_currency_symbol')),\n 'cost': this.safeNumber (trade, 'fee'),\n 'rate': undefined,\n };\n return this.safeTrade ({\n 'id': this.safeString (trade, 'id'),\n 'info': trade,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'symbol': market['symbol'],\n 'order': undefined,\n 'type': undefined,\n 'side': side,\n 'takerOrMaker': undefined,\n 'price': price,\n 'amount': amount,\n 'cost': cost,\n 'fee': fee,\n }, market);\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 1684, "line_start" => 1675, "mappings" => [ %{ "comment" => nil, "key" => "info", "value" => "entry" }, %{ "comment" => nil, "key" => "symbol", "value" => "market['symbol']" }, %{ "comment" => nil, "key" => "maker", "value" => "this.safeNumber (entry, 'maker')" }, %{ "comment" => nil, "key" => "taker", "value" => "this.safeNumber (entry, 'taker')" }, %{ "comment" => nil, "key" => "percentage", "value" => "true" }, %{ "comment" => nil, "key" => "tierBased", "value" => "true" } ], "name" => "parseTradingFee", "signature" => "parseTradingFee (entry: Dict, market: Market = undefined): TradingFeeInterface", "source" => "parseTradingFee (entry: Dict, market: Market = undefined): TradingFeeInterface {\n return {\n 'info': entry,\n 'symbol': market['symbol'],\n 'maker': this.safeNumber (entry, 'maker'),\n 'taker': this.safeNumber (entry, 'taker'),\n 'percentage': true,\n 'tierBased': true,\n };\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 1914, "line_start" => 1865, "mappings" => [ %{ "comment" => nil, "key" => "info", "value" => "transaction" }, %{ "comment" => nil, "key" => "id", "value" => "this.safeString (transaction, 'sn')" }, %{ "comment" => nil, "key" => "txid", "value" => "this.safeString (cryptoDetails, 'transaction_id')" }, %{ "comment" => nil, "key" => "timestamp", "value" => "timestamp" }, %{ "comment" => nil, "key" => "datetime", "value" => "datetime" }, %{ "comment" => nil, "key" => "network", "value" => "this.safeString (transaction, 'network_code')" }, %{ "comment" => nil, "key" => "address", "value" => "address" }, %{ "comment" => nil, "key" => "addressTo", "value" => "address" }, %{ "comment" => nil, "key" => "addressFrom", "value" => "undefined" }, %{ "comment" => nil, "key" => "tag", "value" => "this.safeString (transaction, 'destination_tag')" }, %{ "comment" => nil, "key" => "tagTo", "value" => "this.safeString (transaction, 'destination_tag')" }, %{ "comment" => nil, "key" => "tagFrom", "value" => "undefined" }, %{ "comment" => nil, "key" => "type", "value" => "type" }, %{ "comment" => nil, "key" => "amount", "value" => "this.parseNumber (amount)" }, %{ "comment" => nil, "key" => "currency", "value" => "currencyCode" }, %{ "comment" => nil, "key" => "status", "value" => "status" }, %{ "comment" => nil, "key" => "updated", "value" => "undefined" }, %{ "comment" => nil, "key" => "fee", "value" => "feeObj" }, %{ "comment" => nil, "key" => "comment", "value" => "undefined" }, %{ "comment" => nil, "key" => "internal", "value" => "undefined" }, %{ "comment" => nil, "key" => "cost", "value" => "this.parseNumber (fee)" }, %{ "comment" => nil, "key" => "rate", "value" => "this.parseNumber (feeRate)" } ], "name" => "parseTransaction", "signature" => "parseTransaction (transaction, currency: Currency = undefined, since: Int = undefined, limit: Int = undefined): Transaction", "source" => "parseTransaction (transaction, currency: Currency = undefined, since: Int = undefined, limit: Int = undefined): Transaction {\n const cryptoDetails = this.safeDict (transaction, 'details_crypto');\n const address = this.safeString2 (cryptoDetails, 'receiving_address', 'destination_address');\n const sn = this.safeString (transaction, 'sn');\n let type = 'withdrawal';\n if (sn !== undefined && sn[0] === 'D') {\n type = 'deposit';\n }\n const fee = this.safeString (transaction, 'fee', '0');\n const amount = this.safeString (transaction, 'amount');\n const currencySymbol = this.safeString (transaction, 'currency_symbol');\n let actualAmount = amount;\n const currencyCode = this.safeCurrencyCode (currencySymbol);\n const status = this.parseTransactionStatus (this.safeString (transaction, 'state'));\n const created_at = this.safeString (transaction, 'created_at');\n const timestamp = this.parseDate (created_at);\n const datetime = this.iso8601 (timestamp);\n if (fee !== undefined && amount !== undefined) {\n // actualAmount = amount - fee;\n actualAmount = Precise.stringSub (amount, fee);\n }\n const feeRate = Precise.stringDiv (fee, actualAmount);\n const feeObj = {\n 'cost': this.parseNumber (fee),\n 'currency': currencyCode,\n 'rate': this.parseNumber (feeRate),\n };\n return {\n 'info': transaction,\n 'id': this.safeString (transaction, 'sn'),\n 'txid': this.safeString (cryptoDetails, 'transaction_id'),\n 'timestamp': timestamp,\n 'datetime': datetime,\n 'network': this.safeString (transaction, 'network_code'),\n 'address': address,\n 'addressTo': address,\n 'addressFrom': undefined,\n 'tag': this.safeString (transaction, 'destination_tag'),\n 'tagTo': this.safeString (transaction, 'destination_tag'),\n 'tagFrom': undefined,\n 'type': type,\n 'amount': this.parseNumber (amount),\n 'currency': currencyCode,\n 'status': status,\n 'updated': undefined,\n 'fee': feeObj,\n 'comment': undefined,\n 'internal': undefined,\n };\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 1863, "line_start" => 1844, "mappings" => [], "name" => "parseTransactionStatus", "signature" => "parseTransactionStatus (status: Str)", "source" => "parseTransactionStatus (status: Str) {\n const statuses: Dict = {\n // BOTH\n 'SUBMITTING': 'pending',\n 'SUBMITTED': 'pending',\n 'REJECTED': 'failed',\n // DEPOSIT-SPECIFIC\n 'CANCELLED': 'canceled',\n 'ACCEPTED': 'ok',\n 'WARNING': 'pending',\n 'UNBLOCKED': 'pending',\n 'BLOCKED': 'pending',\n // WITHDRAWAL-SPECIFIC\n 'PROCESSING': 'pending',\n 'CANCELED': 'canceled',\n 'FAILED': 'failed',\n 'DONE': 'ok',\n };\n return this.safeString (statuses, status, status);\n }" } ], path_prefix: "", pro: false, quote_json_numbers: nil, rate_limits: %{ interval_ms: 33, period: 1000, requests: 30, rolling_window_size: 60000 }, raw_endpoints: %{ private: [], public: [] }, required_credentials: %{ api_key: true, password: false, secret: true, uid: false }, requires_eddsa: false, response_error: %{ code_field: nil, field: "error", message_field: "error", success_values: nil, type: :error_array }, signing: %{ api_key_header: "ACCESS-KEY", confidence: :medium, passphrase_header: "ACCESS-PASSPHRASE", pattern: :hmac_sha256_passphrase_signed, signature_encoding: :hex, signature_header: "ACCESS-SIGN", timestamp_header: "ACCESS-TIMESTAMP" }, spec_format_version: 1, status: %{ "eta" => nil, "status" => "ok", "updated" => nil, "url" => nil }, symbol_format: nil, symbol_formats: %{ precision_mode: 2, sample_limits: %{ "amount" => %{ "min" => 1.37e-6 }, "cost" => %{}, "price" => %{ "min" => 0.0001 } }, sample_precision: %{ "amount" => 8, "price" => 2 }, spot: %{ base: "BTC", base_id: "btc", case: :lower, contract: false, id: "btcbrl", limits: %{ "amount" => %{ "min" => 1.37e-6 }, "cost" => %{}, "leverage" => %{}, "price" => %{ "min" => 0.0001 } }, maker: 0.0025, precision: %{ "amount" => 8, "cost" => 2, "price" => 2 }, quote: "BRL", quote_id: "brl", separator: "", symbol: "BTC/BRL", taker: 0.005 } }, symbol_patterns: %{ spot: %{ case: :lower, component_order: nil, date_format: nil, pattern: :no_separator_lower, separator: "", suffix: nil } }, timeframes: %{ "12h" => "12h", "15m" => "15m", "1M" => "1M", "1d" => "1d", "1h" => "1h", "1m" => "1m", "1w" => "1w", "2h" => "2h", "2w" => "2w", "30m" => "30m", "4h" => "4h", "5m" => "5m", "6h" => "6h" }, url_strategy: %{ detected_from: "fallback", pattern: :no_prefix, prefix: nil }, urls: %{ api: "https://api.foxbit.com.br", api_sections: %{ "private" => "https://api.foxbit.com.br", "public" => "https://api.foxbit.com.br", "status" => "https://metadata-v2.foxbit.com.br/api" }, doc: [ "https://docs.foxbit.com.br" ], other: nil, sandbox: nil, www: "https://app.foxbit.com.br" }, version: "1", ws: nil }