# DeepCoin Exchange Specification # # Auto-generated by: mix ccxt.extract deepcoin # CCXT version: 4.5.34 # Spec format version: 1 # # Review before use: # - signing: Detected from sign() method, verify with testnet # - endpoints: Raw paths extracted, map to unified API as needed # - exceptions: Extracted (exact, broad, HTTP status codes) # - features/options: Extracted from describe() # - classification: Set to :supported initially, promote after validation # %{ api_param_requirements: nil, certified: false, classification: :pro, comment: nil, countries: [ "SG" ], currencies: %{}, currency_aliases: %{ "BCHSV" => "BSV", "XBT" => "BTC" }, dex: false, enable_rate_limit: true, endpoint_extraction_stats: %{ "capturedMethods" => 43, "coveragePercent" => 100, "enabledMethods" => 49, "excluded" => [ %{ "method" => "fetchPosition", "reason" => "deepcoin fetchPosition() is not supported yet" }, %{ "method" => "fetchPositionsHistory", "reason" => "deepcoin fetchPositionsHistory () is not supported yet" } ], "excludedMethods" => 2, "extractableMethods" => 47, "failures" => [ %{ "error" => "deepcoin cancelAllOrders() is not supported for spot markets", "method" => "cancelAllOrders" }, %{ "error" => "deepcoin editOrder() is not supported for spot markets", "method" => "editOrder" }, %{ "error" => "deepcoin fetchDepositAddresses requires a list with one currency code", "method" => "fetchDepositAddresses" }, %{ "error" => "deepcoin transfer() requires a userId parameter", "method" => "transfer" } ] }, endpoints: [ %{ api_section: "private", auth: true, cost: 5, market_type: :spot, method: :post, name: :cancel_order, param_mappings: %{ "id" => "ordId", "symbol" => "instId" }, params: [ :id, :symbol ], path: "/deepcoin/trade/cancel-order", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, default_params: %{ "OrderSysIDs" => [ "test-order-id" ] }, market_type: :spot, method: :post, name: :cancel_orders, param_mappings: %{}, params: [ :ids, :symbol ], path: "/deepcoin/trade/batch-cancel-order", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, default_params: %{ "ordType" => "limit", "side" => "buy", "tdMode" => "cash", "tgtCcy" => "base_ccy" }, market_type: :spot, method: :post, name: :create_limit_buy_order, param_mappings: %{ "amount" => "sz", "price" => "px", "symbol" => "instId" }, params: [ :symbol, :amount, :price ], path: "/deepcoin/trade/order", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, default_params: %{ "ordType" => "limit", "tdMode" => "cash", "tgtCcy" => "base_ccy" }, market_type: :spot, method: :post, name: :create_limit_order, param_mappings: %{ "amount" => "sz", "price" => "px", "symbol" => "instId" }, params: [ :symbol, :side, :amount, :price ], path: "/deepcoin/trade/order", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, default_params: %{ "ordType" => "limit", "side" => "sell", "tdMode" => "cash", "tgtCcy" => "base_ccy" }, market_type: :spot, method: :post, name: :create_limit_sell_order, param_mappings: %{ "amount" => "sz", "price" => "px", "symbol" => "instId" }, params: [ :symbol, :amount, :price ], path: "/deepcoin/trade/order", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, default_params: %{ "ordType" => "market", "side" => "buy", "tdMode" => "cash", "tgtCcy" => "base_ccy" }, market_type: :spot, method: :post, name: :create_market_buy_order, param_mappings: %{ "amount" => "sz", "symbol" => "instId" }, params: [ :symbol, :amount ], path: "/deepcoin/trade/order", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, default_params: %{ "ordType" => "market", "side" => "buy", "tdMode" => "cash", "tgtCcy" => "quote_ccy" }, market_type: :spot, method: :post, name: :create_market_buy_order_with_cost, param_mappings: %{ "cost" => "sz", "symbol" => "instId" }, params: [ :symbol, :cost ], path: "/deepcoin/trade/order", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, default_params: %{ "ordType" => "market", "tdMode" => "cash", "tgtCcy" => "base_ccy" }, market_type: :spot, method: :post, name: :create_market_order, param_mappings: %{ "amount" => "sz", "symbol" => "instId" }, params: [ :symbol, :side, :amount, :price ], path: "/deepcoin/trade/order", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, default_params: %{ "ordType" => "market", "tdMode" => "cash", "tgtCcy" => "quote_ccy" }, market_type: :spot, method: :post, name: :create_market_order_with_cost, param_mappings: %{ "cost" => "sz", "symbol" => "instId" }, params: [ :symbol, :side, :cost ], path: "/deepcoin/trade/order", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, default_params: %{ "ordType" => "market", "side" => "sell", "tdMode" => "cash", "tgtCcy" => "base_ccy" }, market_type: :spot, method: :post, name: :create_market_sell_order, param_mappings: %{ "amount" => "sz", "symbol" => "instId" }, params: [ :symbol, :amount ], path: "/deepcoin/trade/order", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, default_params: %{ "ordType" => "market", "side" => "sell", "tdMode" => "cash", "tgtCcy" => "quote_ccy" }, market_type: :spot, method: :post, name: :create_market_sell_order_with_cost, param_mappings: %{ "cost" => "sz", "symbol" => "instId" }, params: [ :symbol, :cost ], path: "/deepcoin/trade/order", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, default_params: %{ "tdMode" => "cash", "tgtCcy" => "base_ccy" }, market_type: :spot, method: :post, name: :create_order, param_mappings: %{ "amount" => "sz", "price" => "px", "symbol" => "instId", "type" => "ordType" }, params: [ :symbol, :type, :side, :amount, :price ], path: "/deepcoin/trade/order", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, default_params: %{ "mrgPosition" => "merge", "posSide" => "long", "tdMode" => "cross" }, market_type: :swap, method: :post, name: :create_order_with_take_profit_and_stop_loss, param_mappings: %{ "amount" => "sz", "price" => "px", "stopLoss" => "slTriggerPx", "symbol" => "instId", "takeProfit" => "tpTriggerPx", "type" => "ordType" }, params: [ :symbol, :type, :side, :amount, :price, :takeProfit, :stopLoss ], path: "/deepcoin/trade/order", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, default_params: %{ "ordType" => "post_only", "tdMode" => "cash", "tgtCcy" => "base_ccy" }, market_type: :spot, method: :post, name: :create_post_only_order, param_mappings: %{ "amount" => "sz", "price" => "px", "symbol" => "instId" }, params: [ :symbol, :type, :side, :amount, :price ], path: "/deepcoin/trade/order", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, default_params: %{ "mrgPosition" => "merge", "posSide" => "short", "reduceOnly" => true, "tdMode" => "cross" }, market_type: :swap, method: :post, name: :create_reduce_only_order, param_mappings: %{ "amount" => "sz", "price" => "px", "symbol" => "instId", "type" => "ordType" }, params: [ :symbol, :type, :side, :amount, :price ], path: "/deepcoin/trade/order", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, default_params: %{ "isCrossMargin" => 1, "mrgPosition" => "merge", "posSide" => "long", "productGroup" => "Swap", "tdMode" => "cross", "triggerDirection" => "below" }, market_type: :swap, method: :post, name: :create_trigger_order, param_mappings: %{ "amount" => "sz", "symbol" => "instId", "type" => "orderType" }, params: [ :symbol, :type, :side, :amount, :price, :triggerPrice ], path: "/deepcoin/trade/trigger-order", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, default_params: %{ "instType" => "SPOT" }, market_type: :spot, method: :get, name: :fetch_balance, param_mappings: %{}, params: [], path: "/deepcoin/account/balances", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, default_params: %{ "instType" => "SPOT" }, market_type: :spot, method: :get, name: :fetch_canceled_and_closed_orders, param_mappings: %{ "symbol" => "instId" }, params: [ :symbol, :since, :limit ], path: "/deepcoin/trade/orders-history", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, default_params: %{ "instType" => "SPOT", "state" => "canceled" }, market_type: :spot, method: :get, name: :fetch_canceled_orders, param_mappings: %{ "symbol" => "instId" }, params: [ :symbol, :since, :limit ], path: "/deepcoin/trade/orders-history", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, market_type: :spot, method: :get, name: :fetch_closed_order, param_mappings: %{ "arg0" => "ordId", "arg1" => "instId" }, params: [], path: "/deepcoin/trade/finishOrderByID", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, default_params: %{ "instType" => "SPOT", "state" => "filled" }, market_type: :spot, method: :get, name: :fetch_closed_orders, param_mappings: %{ "symbol" => "instId" }, params: [ :symbol, :since, :limit ], path: "/deepcoin/trade/orders-history", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, default_params: %{ "lang" => "en" }, market_type: :spot, method: :get, name: :fetch_deposit_address, param_mappings: %{ "code" => "currency_id" }, params: [ :code ], path: "/deepcoin/asset/recharge-chain-list", response_transformer: {:extract_path_unwrap, ["data", "list"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, market_type: :spot, method: :get, name: :fetch_deposits, param_mappings: %{ "code" => "coin" }, params: [ :code, :since, :limit ], path: "/deepcoin/asset/deposit-list", response_transformer: {:extract_path, ["data", "data"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 5, default_params: %{ "instType" => "SwapU" }, market_type: :swap, method: :get, name: :fetch_funding_rate, param_mappings: %{ "symbol" => "instId" }, params: [ :symbol ], path: "/deepcoin/trade/fund-rate/current-funding-rate", response_transformer: {:extract_path_unwrap, ["data", "current_fund_rates"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 5, market_type: :swap, method: :get, name: :fetch_funding_rate_history, param_mappings: %{ "symbol" => "instId" }, params: [ :symbol, :since, :limit ], path: "/deepcoin/trade/fund-rate/history", response_transformer: {:extract_path, ["data", "rows"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 5, default_params: %{ "instType" => "SwapU" }, market_type: :swap, method: :get, name: :fetch_funding_rates, param_mappings: %{}, params: [ :symbols ], path: "/deepcoin/trade/fund-rate/current-funding-rate", response_transformer: {:extract_path, ["data", "current_fund_rates"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, default_params: %{ "bar" => "1m" }, market_type: :swap, method: :get, name: :fetch_index_ohlcv, param_mappings: %{ "symbol" => "instId", "timeframe" => "bar" }, params: [ :symbol, :timeframe, :since, :limit ], path: "/deepcoin/market/index-candles", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, default_params: %{ "sz" => 400 }, market_type: :spot, method: :get, name: :fetch_l2_order_book, param_mappings: %{ "symbol" => "instId" }, params: [ :symbol, :limit ], path: "/deepcoin/market/books", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, default_params: %{ "instType" => "SPOT" }, market_type: :spot, method: :get, name: :fetch_ledger, param_mappings: %{ "code" => "ccy" }, params: [ :code, :since, :limit ], path: "/deepcoin/account/bills", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, default_params: %{ "bar" => "1m" }, market_type: :swap, method: :get, name: :fetch_mark_ohlcv, param_mappings: %{ "symbol" => "instId", "timeframe" => "bar" }, params: [ :symbol, :timeframe, :since, :limit ], path: "/deepcoin/market/mark-price-candles", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, default_params: %{ "instType" => "SPOT" }, market_type: :spot, method: :get, name: :fetch_markets, param_mappings: %{}, params: [], path: "/deepcoin/market/instruments", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, default_params: %{ "instType" => "SPOT" }, market_type: :spot, method: :get, name: :fetch_my_trades, param_mappings: %{ "symbol" => "instId" }, params: [ :symbol, :since, :limit ], path: "/deepcoin/trade/fills", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, market_type: :spot, method: :get, name: :fetch_ohlcv, param_mappings: %{ "symbol" => "instId", "timeframe" => "bar" }, params: [ :symbol, :timeframe, :since, :limit ], path: "/deepcoin/market/candles", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, market_type: :spot, method: :get, name: :fetch_open_order, param_mappings: %{ "arg0" => "ordId", "arg1" => "instId" }, params: [], path: "/deepcoin/trade/orderByID", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, default_params: %{ "index" => 1 }, market_type: :spot, method: :get, name: :fetch_open_orders, param_mappings: %{ "symbol" => "instId" }, params: [ :symbol, :since, :limit ], path: "/deepcoin/trade/v2/orders-pending", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, market_type: :spot, method: :get, name: :fetch_order_book, param_mappings: %{ "limit" => "sz", "symbol" => "instId" }, params: [ :symbol, :limit ], path: "/deepcoin/market/books", response_transformer: {:extract_path_unwrap, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, default_params: %{ "instType" => "SPOT" }, market_type: :spot, method: :get, name: :fetch_order_trades, param_mappings: %{ "id" => "ordId", "symbol" => "instId" }, params: [ :id, :symbol, :since, :limit ], path: "/deepcoin/trade/fills", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, default_params: %{ "instType" => "SWAP" }, market_type: :swap, method: :get, name: :fetch_positions, param_mappings: %{}, params: [ :symbols ], path: "/deepcoin/account/positions", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, default_params: %{ "instType" => "SWAP" }, market_type: :swap, method: :get, name: :fetch_positions_for_symbol, param_mappings: %{ "symbol" => "instId" }, params: [ :symbol ], path: "/deepcoin/account/positions", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, default_params: %{ "instType" => "SPOT" }, market_type: :spot, method: :get, name: :fetch_tickers, param_mappings: %{}, params: [ :symbols ], path: "/deepcoin/market/tickers", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "public", auth: false, cost: 1, default_params: %{ "productGroup" => "Spot" }, market_type: :spot, method: :get, name: :fetch_trades, param_mappings: %{ "symbol" => "instId" }, params: [ :symbol, :since, :limit ], path: "/deepcoin/market/trades", response_transformer: {:extract_path, ["data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, market_type: :spot, method: :get, name: :fetch_withdrawals, param_mappings: %{ "code" => "coin" }, params: [ :code, :since, :limit ], path: "/deepcoin/asset/withdraw-list", response_transformer: {:extract_path, ["data", "data"]}, source: :intercepted }, %{ api_section: "private", auth: true, cost: 5, default_params: %{ "mgnMode" => "cross", "mrgPosition" => "merge" }, market_type: :swap, method: :post, name: :set_leverage, param_mappings: %{ "leverage" => "lever", "symbol" => "instId" }, params: [ :leverage, :symbol ], path: "/deepcoin/account/set-leverage", response_transformer: {:extract_path, ["data"]}, source: :intercepted } ], error_code_details: %{ 100010 => %{ description: "{\"code\":\"0\",\"msg\":\"\",\"data\":{\"retCode\":100010,\"retMsg\":\"Balance is insufficient, please deposit first.\",\"retData\":{}}}", type: :insufficient_balance }, 194 => %{ description: "{\"code\":\"0\",\"msg\":\"\",\"data\":{\"ordId\":\"\",\"clOrdId\":\"\",\"tag\":\"\",\"sCode\":\"194\",\"sMsg\":\"LessThanMinVolume\"}}", type: :invalid_order }, 195 => %{ description: "{\"code\":\"0\",\"msg\":\"\",\"data\":{\"ordId\":\"\",\"clOrdId\":\"\",\"tag\":\"\",\"sCode\":\"195\",\"sMsg\":\"PositionLessThanMinVolume\"}}", type: :invalid_order }, 199 => %{ description: "{\"code\":\"0\",\"msg\":\"\",\"data\":{\"instId\":\"\",\"lever\":\"\",\"mgnMode\":\"\",\"mrgPosition\":\"\",\"sCode\":\"199\",\"sMsg\":\"LeverageTooHigh:Amount[10000.0]\\u003eLeverage[75.1880]\"}}", type: :invalid_parameters }, 24 => %{ description: "{\"code\":\"0\",\"msg\":\"\",\"data\":{\"ordId\":\"\",\"clOrdId\":\"\",\"sCode\":\"24\",\"sMsg\":\"OrderNotFound:1\"}}", type: :order_not_found }, 31 => %{ description: "{\"code\":\"0\",\"msg\":\"\",\"data\":{\"ordId\":\"\",\"clOrdId\":\"\",\"tag\":\"\",\"sCode\":\"31\",\"sMsg\":\"NotEnoughPositionToClose:Position=0\"}}", type: :insufficient_balance }, 36 => %{ description: "{\"code\":\"0\",\"msg\":\"\",\"data\":{\"ordId\":\"\",\"clOrdId\":\"\",\"tag\":\"\",\"sCode\":\"36\",\"sMsg\":\"InsufficientMoney:-0.000004\"}}", type: :insufficient_balance }, 44 => %{ description: "{\"code\":\"0\",\"msg\":\"\",\"data\":{\"ordId\":\"\",\"clOrdId\":\"\",\"tag\":\"\",\"sCode\":\"44\",\"sMsg\":\"VolumeNotOnTick\"}}", type: :invalid_parameters }, 49 => %{ description: "{\"code\":\"0\",\"msg\":\"\",\"data\":{\"ordId\":\"\",\"clOrdId\":\"\",\"tag\":\"\",\"sCode\":\"49\",\"sMsg\":\"PriceOutOfUpperLimit:Price\\u003eUpperLimitPrice[0.28422]\"}}", type: :invalid_order }, "field is required" => %{ description: "The productGroup field is required", type: :invalid_parameters }, "localIDNotExist" => %{ description: nil, type: :invalid_parameters }, "must be equal or lesser than" => %{ description: "The Size value `100` must be equal or lesser than 50", type: :invalid_parameters }, "no available" => %{ description: "orderbook does not exist: ETHUSD_0.1, no available orderbook data", type: :exchange_error }, "not in acceptable range" => %{ description: "The instType value `spot` is not in acceptable range: SPOT,SWAP", type: :invalid_parameters }, "subscription cluster does not \"exist\"" => %{ description: nil, type: :invalid_parameters }, "unsupportedAction" => %{ description: nil, type: :invalid_parameters } }, error_codes: %{ 100010 => :insufficient_balance, 194 => :invalid_order, 195 => :invalid_order, 199 => :invalid_parameters, 24 => :order_not_found, 31 => :insufficient_balance, 36 => :insufficient_balance, 44 => :invalid_parameters, 49 => :invalid_order, "field is required" => :invalid_parameters, "localIDNotExist" => :invalid_parameters, "must be equal or lesser than" => :invalid_parameters, "no available" => :exchange_error, "not in acceptable range" => :invalid_parameters, "subscription cluster does not \"exist\"" => :invalid_parameters, "unsupportedAction" => :invalid_parameters }, exceptions: %{ broad: %{ "field is required" => :arguments_required, "must be equal or lesser than" => :bad_request, "no available" => :not_supported, "not in acceptable range" => :bad_request, "subscription cluster does not \"exist\"" => :bad_request }, exact: %{ "100010" => :insufficient_funds, "194" => :invalid_order, "195" => :invalid_order, "199" => :bad_request, "24" => :order_not_found, "31" => :insufficient_funds, "36" => :insufficient_funds, "44" => :bad_request, "49" => :invalid_order, "localIDNotExist" => :bad_request, "unsupportedAction" => :bad_request } }, exchange_options: %{ "accountsByType" => %{ "demo" => 10, "fund" => 2, "inverse" => 5, "linear" => 7, "rebate" => 3, "spot" => 1 }, "defaultNetworkCodeReplacements" => %{ "BRC20" => %{ "BRC20" => "BTC" }, "CRO" => %{ "CRC20" => "CRONOS" }, "ETH" => %{ "ERC20" => "ETH" }, "TRX" => %{ "TRC20" => "TRX" } }, "defaultNetworks" => %{ "ETH" => "ERC20", "USDC" => "ERC20", "USDT" => "TRC20" }, "exchangeType" => %{ "SPOT" => "SPOT", "SWAP" => "SWAP", "spot" => "SPOT", "swap" => "SWAP" }, "fetchMarkets" => %{ "types" => [ "spot", "swap" ] }, "networks" => %{ "ADA" => "Cardano", "ARB" => "ARBITRUM", "BSC" => "BSC(BEP20)", "BTC" => "Bitcoin", "ERC20" => "ERC20", "SOL" => "SOL", "TRC20" => "TRC20" }, "networksById" => %{ "ARBITRUM" => "ARB", "BSC(BEP20)" => "BSC", "Bitcoin" => "BTC", "Cardano" => "ADA", "ERC20" => "ERC20", "SOL" => "SOL", "TRC20" => "TRC20" }, "recvWindow" => 5000, "timeInForce" => %{ "GTC" => "GTC", "IOC" => "IOC", "PO" => "PO" } }, extended_metadata: %{ limits: %{ "amount" => %{}, "cost" => %{}, "leverage" => %{}, "price" => %{} }, logo_url: "https://github.com/user-attachments/assets/ddf3e178-c3b6-409d-8f9f-af8b7cf80454", referral_discount: 0.1, referral_url: "https://s.deepcoin.com/UzkyODgy" }, extracted_metadata: %{ ccxt_version: "4.5.34" }, features: %{ spot: %{ create_order: %{ attached_stop_loss_take_profit: %{ price: true, trigger_price_type: %{ index: false, last: false, mark: false } }, hedged: true, margin_mode: true, market_buy_requires_price: false, stop_loss_price: true, take_profit_price: true, time_in_force: %{ fok: true, gtd: false, ioc: true, po: true }, trailing: false, trigger_direction: false, trigger_price: true, trigger_price_type: %{ index: false, last: true, mark: false } }, fetch_closed_orders: %{ limit: 100, margin_mode: false, symbol_required: true, trailing: false, trigger: true }, fetch_my_trades: %{ days_back: 60, limit: 100, margin_mode: false, symbol_required: true }, fetch_ohlcv: %{ limit: 300 }, fetch_open_orders: %{ limit: 100, margin_mode: false, symbol_required: true, trailing: false, trigger: true }, sandbox: false }, swap: %{ inverse: %{ extends: "spot" }, linear: %{ extends: "spot" } } }, fees: %{ trading: %{ maker: 0.001, taker: 0.0015 } }, handle_content_type_application_zip: nil, handle_errors_source: "handleErrors(code, reason, url, method, headers, body, response, requestHeaders, requestBody) {\n const data = this.safeDict(response, 'data', {});\n let msg = this.safeString(response, 'msg');\n const messageCode = this.safeString(response, 'code');\n let sCode = this.safeString(data, 'sCode');\n const sMsg = this.safeString(data, 'sMsg');\n let errorCode = this.safeString(data, 'errorCode');\n if ((msg !== undefined) && (msg === '') && (sMsg !== undefined)) {\n msg = sMsg;\n }\n const errorList = this.safeList(data, 'errorList');\n if (errorList !== undefined) {\n for (let i = 0; i < errorList.length; i++) {\n const entry = this.safeDict(errorList, i, {});\n errorCode = this.safeString(entry, 'errorCode');\n }\n }\n const feedback = this.id + ' ' + body;\n if ((sCode === undefined) && (errorCode !== undefined)) {\n sCode = errorCode;\n }\n const retCode = this.safeString(data, 'retCode');\n if ((sCode === undefined) && (retCode !== undefined)) {\n sCode = retCode;\n }\n if ((code !== 200) || (messageCode !== '0') || (sCode !== undefined && sCode !== '0')) {\n this.throwExactlyMatchedException(this.exceptions['exact'], messageCode, feedback);\n this.throwExactlyMatchedException(this.exceptions['exact'], sCode, feedback);\n this.throwExactlyMatchedException(this.exceptions['exact'], msg, feedback);\n this.throwBroadlyMatchedException(this.exceptions['broad'], msg, feedback);\n throw new errors.ExchangeError(feedback);\n }\n else {\n const list = this.safeList(data, 'list', []);\n if (('list' in data) && (list === undefined)) {\n throw new errors.NullResponse(feedback);\n }\n }\n return undefined;\n }", has: %{ add_margin: false, borrow_cross_margin: false, borrow_isolated_margin: false, borrow_margin: false, c_o_r_s: false, cancel_all_orders: true, cancel_all_orders_after: false, cancel_all_orders_ws: false, cancel_order: true, cancel_order_with_client_order_id: false, cancel_order_ws: false, cancel_orders: true, cancel_orders_with_client_order_id: false, cancel_orders_ws: false, cancel_withdraw: false, close_all_positions: false, close_position: true, create_convert_trade: 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: true, create_market_buy_order_with_cost_ws: false, create_market_buy_order_ws: false, create_market_order: true, create_market_order_with_cost: true, create_market_order_with_cost_ws: false, create_market_order_ws: true, create_market_sell_order: true, create_market_sell_order_with_cost: true, 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: true, 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: 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: true, create_trigger_order_ws: false, deposit: false, edit_order: true, edit_order_with_client_order_id: false, edit_order_ws: false, edit_orders: false, fetch_accounts: false, fetch_balance: true, fetch_balance_ws: false, fetch_bids_asks: false, fetch_borrow_interest: false, fetch_borrow_rate: false, fetch_borrow_rate_histories: false, fetch_borrow_rate_history: false, fetch_borrow_rates: false, fetch_borrow_rates_per_symbol: false, fetch_canceled_and_closed_orders: true, fetch_canceled_orders: true, fetch_closed_order: true, fetch_closed_orders: true, fetch_closed_orders_ws: false, fetch_convert_currencies: false, fetch_convert_quote: false, fetch_convert_trade: false, fetch_convert_trade_history: false, fetch_cross_borrow_rate: false, fetch_cross_borrow_rates: false, fetch_currencies: false, fetch_currencies_ws: true, fetch_deposit: false, fetch_deposit_address: true, fetch_deposit_addresses: true, 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: 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: 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: 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: false, fetch_open_interest_history: false, fetch_open_interests: false, fetch_open_order: true, fetch_open_orders: true, fetch_open_orders_ws: false, fetch_option: false, fetch_option_chain: false, fetch_order: false, fetch_order_book: true, fetch_order_book_ws: false, fetch_order_books: false, 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_history: false, fetch_position_mode: false, fetch_position_ws: false, fetch_positions: true, fetch_positions_for_symbol: true, fetch_positions_for_symbol_ws: false, fetch_positions_history: true, fetch_positions_risk: false, fetch_positions_ws: false, fetch_premium_index_ohlcv: false, fetch_settlement_history: false, fetch_status: false, fetch_ticker: false, fetch_ticker_ws: false, fetch_tickers: true, fetch_tickers_ws: false, fetch_time: false, fetch_trades: true, fetch_trades_ws: false, fetch_trading_fee: false, fetch_trading_fees: false, fetch_trading_fees_ws: false, fetch_trading_limits: false, fetch_transaction_fee: false, fetch_transaction_fees: false, fetch_transactions: false, fetch_transfer: false, fetch_transfers: false, fetch_underlying_assets: false, fetch_volatility_history: false, fetch_withdraw_addresses: false, fetch_withdrawal: false, fetch_withdrawal_whitelist: false, fetch_withdrawals: true, fetch_withdrawals_ws: false, future: false, margin: true, option: false, private_api: true, public_api: true, reduce_margin: false, repay_cross_margin: false, repay_isolated_margin: false, sandbox: false, 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: false, watch_bids_asks: false, watch_funding_rate: false, watch_funding_rates: false, watch_liquidations: false, watch_liquidations_for_symbols: false, watch_mark_price: false, watch_mark_prices: false, watch_my_liquidations: false, watch_my_liquidations_for_symbols: false, watch_my_trades: true, 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: true, watch_status: false, watch_ticker: true, watch_tickers: false, watch_trades: true, watch_trades_for_symbols: false, withdraw: false, ws: false }, http_config: nil, id: "deepcoin", markets: nil, name: "DeepCoin", ohlcv_timestamp_resolution: :unknown, options: %{ accounts_by_type: %{ "demo" => 10, "fund" => 2, "inverse" => 5, "linear" => 7, "rebate" => 3, "spot" => 1 }, default_networks: %{ "ETH" => "ERC20", "USDC" => "ERC20", "USDT" => "TRC20" }, exchange_type: %{ "SPOT" => "SPOT", "SWAP" => "SWAP", "spot" => "SPOT", "swap" => "SWAP" }, fetch_markets: %{ "types" => [ "spot", "swap" ] }, networks: %{ "ADA" => "Cardano", "ARB" => "ARBITRUM", "BSC" => "BSC(BEP20)", "BTC" => "Bitcoin", "ERC20" => "ERC20", "SOL" => "SOL", "TRC20" => "TRC20" }, networks_by_id: %{}, recv_window: 5000, time_in_force: %{ "GTC" => "GTC", "IOC" => "IOC", "PO" => "PO" } }, order_mappings: %{ side_format: :lowercase, side_key: "side", type_format: :lowercase, type_key: "ordType" }, param_mappings: %{ "amount" => "sz", "arg0" => "ordId", "arg1" => "instId", "code" => "coin", "cost" => "sz", "id" => "ordId", "leverage" => "lever", "limit" => "sz", "price" => "px", "stopLoss" => "slTriggerPx", "symbol" => "instId", "takeProfit" => "tpTriggerPx", "timeframe" => "bar", "type" => "orderType" }, parse_methods: [ %{ "comment" => nil, "examples" => [ "{\n \"code\": \"0\",\n \"msg\": \"\",\n \"data\": [\n {\n \"ccy\": \"USDT\",\n \"bal\": \"74\",\n \"frozenBal\": \"0\",\n \"availBal\": \"74\"\n }\n ]\n }" ], "line_end" => 971, "line_start" => 939, "mappings" => [], "name" => "parseBalance", "signature" => "parseBalance (response): Balances", "source" => "parseBalance (response): Balances {\n //\n // {\n // \"code\": \"0\",\n // \"msg\": \"\",\n // \"data\": [\n // {\n // \"ccy\": \"USDT\",\n // \"bal\": \"74\",\n // \"frozenBal\": \"0\",\n // \"availBal\": \"74\"\n // }\n // ]\n // }\n //\n const result: Dict = {\n 'info': response,\n 'timestamp': undefined,\n 'datetime': undefined,\n };\n const balances = this.safeList (response, 'data', []);\n for (let i = 0; i < balances.length; i++) {\n const balance = balances[i];\n const symbol = this.safeString (balance, 'ccy');\n const code = this.safeCurrencyCode (symbol);\n const account = this.account ();\n account['total'] = this.safeString (balance, 'bal');\n account['used'] = this.safeString (balance, 'frozenBal');\n account['free'] = this.safeString (balance, 'availBal');\n result[code] = account;\n }\n return this.safeBalance (result);\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"chain\": \"TRC20\",\n \"state\": 1,\n \"remind\": \"Only support deposits and withdrawals via TRC20 network. If you send it via other address by mistake, it will not be credited and will result in the permanent loss of your deposit.\",\n \"inNotice\": \"\",\n \"actLogo\": \"\",\n \"address\": \"TNJYDW9Bk87VwfA6s7FtxURLEMHesQbYgF\",\n \"hasMemo\": false,\n \"memo\": \"\",\n \"estimatedTime\": 1,\n \"fastConfig\": {\n \"fastLimitNum\": 0,\n \"fastBlock\": 10,\n \"realBlock\": 1\n }\n }" ], "line_end" => 1241, "line_start" => 1212, "mappings" => [ %{ "comment" => nil, "key" => "info", "value" => "response" }, %{ "comment" => nil, "key" => "currency", "value" => "undefined" }, %{ "comment" => nil, "key" => "network", "value" => "this.networkIdToCode (chain)" }, %{ "comment" => nil, "key" => "address", "value" => "address" }, %{ "comment" => nil, "key" => "tag", "value" => "this.safeString (response, 'memo')" } ], "name" => "parseDepositAddress", "signature" => "parseDepositAddress (response, currency: Currency = undefined): DepositAddress", "source" => "parseDepositAddress (response, currency: Currency = undefined): DepositAddress {\n //\n // {\n // \"chain\": \"TRC20\",\n // \"state\": 1,\n // \"remind\": \"Only support deposits and withdrawals via TRC20 network. If you send it via other address by mistake, it will not be credited and will result in the permanent loss of your deposit.\",\n // \"inNotice\": \"\",\n // \"actLogo\": \"\",\n // \"address\": \"TNJYDW9Bk87VwfA6s7FtxURLEMHesQbYgF\",\n // \"hasMemo\": false,\n // \"memo\": \"\",\n // \"estimatedTime\": 1,\n // \"fastConfig\": {\n // \"fastLimitNum\": 0,\n // \"fastBlock\": 10,\n // \"realBlock\": 1\n // }\n // }\n //\n const chain = this.safeString (response, 'chain');\n const address = this.safeString (response, 'address');\n this.checkAddress (address);\n return {\n 'info': response,\n 'currency': undefined,\n 'network': this.networkIdToCode (chain),\n 'address': address,\n 'tag': this.safeString (response, 'memo'),\n } as DepositAddress;\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"instrumentId\": \"ETHUSDT\",\n \"fundingRate\": 0.0000402356250176\n }" ], "line_end" => 2783, "line_start" => 2754, "mappings" => [ %{ "comment" => nil, "key" => "info", "value" => "contract" }, %{ "comment" => nil, "key" => "symbol", "value" => "symbol" }, %{ "comment" => nil, "key" => "markPrice", "value" => "undefined" }, %{ "comment" => nil, "key" => "indexPrice", "value" => "undefined" }, %{ "comment" => nil, "key" => "interestRate", "value" => "undefined" }, %{ "comment" => nil, "key" => "estimatedSettlePrice", "value" => "undefined" }, %{ "comment" => nil, "key" => "timestamp", "value" => "undefined" }, %{ "comment" => nil, "key" => "datetime", "value" => "undefined" }, %{ "comment" => nil, "key" => "fundingRate", "value" => "this.safeNumber (contract, 'fundingRate')" }, %{ "comment" => nil, "key" => "fundingTimestamp", "value" => "undefined" }, %{ "comment" => nil, "key" => "fundingDatetime", "value" => "undefined" }, %{ "comment" => nil, "key" => "nextFundingRate", "value" => "undefined" }, %{ "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 // \"instrumentId\": \"ETHUSDT\",\n // \"fundingRate\": 0.0000402356250176\n // }\n //\n const marketId = this.safeString2 (contract, 'instrumentId', 'instrumentID');\n const symbol = this.safeSymbol (marketId, market);\n return {\n 'info': contract,\n 'symbol': symbol,\n 'markPrice': undefined,\n 'indexPrice': undefined,\n 'interestRate': undefined,\n 'estimatedSettlePrice': undefined,\n 'timestamp': undefined,\n 'datetime': undefined,\n 'fundingRate': this.safeNumber (contract, 'fundingRate'),\n 'fundingTimestamp': undefined,\n 'fundingDatetime': undefined,\n 'nextFundingRate': undefined,\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" => [ "{\n \"instrumentID\": \"ETHUSD\",\n \"rate\": \"0.00047949\",\n \"CreateTime\": 1760832000,\n \"ratePeriodSec\": 0\n }" ], "line_end" => 2856, "line_start" => 2837, "mappings" => [ %{ "comment" => nil, "key" => "info", "value" => "info" }, %{ "comment" => nil, "key" => "symbol", "value" => "market['symbol']" }, %{ "comment" => nil, "key" => "fundingRate", "value" => "this.safeNumber (info, 'rate')" }, %{ "comment" => nil, "key" => "timestamp", "value" => "timestamp" }, %{ "comment" => nil, "key" => "datetime", "value" => "this.iso8601 (timestamp)" } ], "name" => "parseFundingRateHistory", "signature" => "parseFundingRateHistory (info, market: Market = undefined)", "source" => "parseFundingRateHistory (info, market: Market = undefined) {\n //\n // {\n // \"instrumentID\": \"ETHUSD\",\n // \"rate\": \"0.00047949\",\n // \"CreateTime\": 1760832000,\n // \"ratePeriodSec\": 0\n // }\n //\n const timestamp = this.safeTimestamp (info, 'CreateTime');\n const instrumentID = this.safeString2 (info, 'instrumentID', 'instrumentId');\n market = this.safeMarket (instrumentID, market, undefined, 'swap');\n return {\n 'info': info,\n 'symbol': market['symbol'],\n 'fundingRate': this.safeNumber (info, 'rate'),\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n };\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"billId\": \"1001044652247714\",\n \"ccy\": \"USDT\",\n \"clientId\": \"\",\n \"balChg\": \"-0.03543537\",\n \"bal\": \"72.41881427\",\n \"type\": \"5\",\n \"ts\": \"1761047448000\"\n }" ], "line_end" => 1346, "line_start" => 1310, "mappings" => [ %{ "comment" => nil, "key" => "info", "value" => "item" }, %{ "comment" => nil, "key" => "id", "value" => "this.safeString (item, 'billId')" }, %{ "comment" => nil, "key" => "direction", "value" => "direction" }, %{ "comment" => nil, "key" => "account", "value" => "undefined" }, %{ "comment" => nil, "key" => "referenceAccount", "value" => "undefined" }, %{ "comment" => nil, "key" => "referenceId", "value" => "undefined" }, %{ "comment" => nil, "key" => "type", "value" => "this.parseLedgerEntryType (type)" }, %{ "comment" => nil, "key" => "currency", "value" => "currency['code']" }, %{ "comment" => nil, "key" => "amount", "value" => "amount" }, %{ "comment" => nil, "key" => "timestamp", "value" => "timestamp" }, %{ "comment" => nil, "key" => "datetime", "value" => "this.iso8601 (timestamp)" }, %{ "comment" => nil, "key" => "before", "value" => "undefined" }, %{ "comment" => nil, "key" => "after", "value" => "this.safeString (item, 'bal')" }, %{ "comment" => nil, "key" => "status", "value" => "undefined" }, %{ "comment" => nil, "key" => "fee", "value" => "undefined" } ], "name" => "parseLedgerEntry", "signature" => "parseLedgerEntry (item: Dict, currency: Currency = undefined): LedgerEntry", "source" => "parseLedgerEntry (item: Dict, currency: Currency = undefined): LedgerEntry {\n //\n // {\n // \"billId\": \"1001044652247714\",\n // \"ccy\": \"USDT\",\n // \"clientId\": \"\",\n // \"balChg\": \"-0.03543537\",\n // \"bal\": \"72.41881427\",\n // \"type\": \"5\",\n // \"ts\": \"1761047448000\"\n // }\n //\n const timestamp = this.safeInteger (item, 'ts');\n const change = this.safeString (item, 'balChg');\n const amount = Precise.stringAbs (change);\n const direction = Precise.stringLt (change, '0') ? 'out' : 'in';\n const currencyId = this.safeString (item, 'ccy');\n currency = this.safeCurrency (currencyId, currency);\n const type = this.safeString (item, 'type');\n return this.safeLedgerEntry ({\n 'info': item,\n 'id': this.safeString (item, 'billId'),\n 'direction': direction,\n 'account': undefined,\n 'referenceAccount': undefined,\n 'referenceId': undefined,\n 'type': this.parseLedgerEntryType (type),\n 'currency': currency['code'],\n 'amount': amount,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'before': undefined,\n 'after': this.safeString (item, 'bal'),\n 'status': undefined,\n 'fee': undefined,\n }, currency) as LedgerEntry;\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 1357, "line_start" => 1348, "mappings" => [], "name" => "parseLedgerEntryType", "signature" => "parseLedgerEntryType (type)", "source" => "parseLedgerEntryType (type) {\n const ledgerType: Dict = {\n '1': 'trade',\n '2': 'trade',\n '3': 'transfer',\n '4': 'transfer',\n '5': 'fee',\n };\n return this.safeString (ledgerType, type, type);\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"instType\": \"SPOT\",\n \"instId\": \"A-USDT\",\n \"uly\": \"\",\n \"baseCcy\": \"A\",\n \"quoteCcy\": \"USDT\",\n \"ctVal\": \"1\",\n \"ctValCcy\": \"\",\n \"listTime\": \"0\",\n \"lever\": \"1\",\n \"tickSz\": \"0.0001\",\n \"lotSz\": \"0.001\",\n \"minSz\": \"0.5\",\n \"ctType\": \"\",\n \"alias\": \"\",\n \"state\": \"live\",\n \"maxLmtSz\": \"7692307\",\n \"maxMktSz\": \"7692307\"\n }", "{\n \"instType\": \"SWAP\",\n \"instId\": \"ZORA-USDT-SWAP\",\n \"uly\": \"\",\n \"baseCcy\": \"ZORA\",\n \"quoteCcy\": \"USDT\",\n \"ctVal\": \"1\",\n \"ctValCcy\": \"\",\n \"listTime\": \"0\",\n \"lever\": \"20\",\n \"tickSz\": \"0.00001\",\n \"lotSz\": \"1\",\n \"minSz\": \"1685\",\n \"ctType\": \"\",\n \"alias\": \"\",\n \"state\": \"live\",\n \"maxLmtSz\": \"10000000\",\n \"maxMktSz\": \"10000000\"\n }" ], "line_end" => 570, "line_start" => 450, "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" => "settle", "value" => "settle" }, %{ "comment" => nil, "key" => "baseId", "value" => "baseId" }, %{ "comment" => nil, "key" => "quoteId", "value" => "quoteId" }, %{ "comment" => nil, "key" => "settleId", "value" => "settleId" }, %{ "comment" => nil, "key" => "type", "value" => "type" }, %{ "comment" => nil, "key" => "spot", "value" => "spot" }, %{ "comment" => nil, "key" => "margin", "value" => "spot && (Precise.stringGt (maxLeverage, '1'))" }, %{ "comment" => nil, "key" => "swap", "value" => "swap" }, %{ "comment" => nil, "key" => "future", "value" => "false" }, %{ "comment" => nil, "key" => "option", "value" => "false" }, %{ "comment" => nil, "key" => "active", "value" => "state === 'live'" }, %{ "comment" => nil, "key" => "contract", "value" => "swap" }, %{ "comment" => nil, "key" => "linear", "value" => "isLinear" }, %{ "comment" => nil, "key" => "inverse", "value" => "swap ? (!isLinear) : undefined" }, %{ "comment" => nil, "key" => "contractSize", "value" => "swap ? this.safeNumber (market, 'ctVal') : 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" => "created", "value" => "undefined" }, %{ "comment" => nil, "key" => "precision", "value" => "{\n 'amount': this.safeNumber (market, 'lotSz'),\n 'price': this.safeNumber (market, 'tickSz'),\n }" }, %{ "comment" => nil, "key" => "limits", "value" => "{\n 'leverage': {\n 'min': this.parseNumber ('1'),\n 'max': this.parseNumber (maxLeverage),\n },\n 'amount': {\n 'min': this.safeNumber (market, 'minSz'),\n 'max': maxAmount,\n },\n 'price': {\n 'min': undefined,\n 'max': undefined,\n },\n 'cost': {\n 'min': undefined,\n 'max': undefined,\n },\n }" }, %{ "comment" => nil, "key" => "info", "value" => "market" }, %{ "comment" => nil, "key" => "amount", "value" => "this.safeNumber (market, 'lotSz')" }, %{ "comment" => nil, "key" => "price", "value" => "this.safeNumber (market, 'tickSz')" }, %{ "comment" => nil, "key" => "leverage", "value" => "{\n 'min': this.parseNumber ('1'),\n 'max': this.parseNumber (maxLeverage),\n }" }, %{ "comment" => nil, "key" => "amount", "value" => "{\n 'min': this.safeNumber (market, 'minSz'),\n 'max': maxAmount,\n }" }, %{ "comment" => nil, "key" => "price", "value" => "{\n 'min': undefined,\n 'max': undefined,\n }" }, %{ "comment" => nil, "key" => "cost", "value" => "{\n 'min': undefined,\n 'max': undefined,\n }" }, %{ "comment" => nil, "key" => "min", "value" => "undefined" }, %{ "comment" => nil, "key" => "max", "value" => "undefined" } ], "name" => "parseMarket", "signature" => "parseMarket (market: Dict): Market", "source" => "parseMarket (market: Dict): Market {\n //\n // spot markets\n //\n // {\n // \"instType\": \"SPOT\",\n // \"instId\": \"A-USDT\",\n // \"uly\": \"\",\n // \"baseCcy\": \"A\",\n // \"quoteCcy\": \"USDT\",\n // \"ctVal\": \"1\",\n // \"ctValCcy\": \"\",\n // \"listTime\": \"0\",\n // \"lever\": \"1\",\n // \"tickSz\": \"0.0001\",\n // \"lotSz\": \"0.001\",\n // \"minSz\": \"0.5\",\n // \"ctType\": \"\",\n // \"alias\": \"\",\n // \"state\": \"live\",\n // \"maxLmtSz\": \"7692307\",\n // \"maxMktSz\": \"7692307\"\n // }\n //\n // swap markets\n //\n // {\n // \"instType\": \"SWAP\",\n // \"instId\": \"ZORA-USDT-SWAP\",\n // \"uly\": \"\",\n // \"baseCcy\": \"ZORA\",\n // \"quoteCcy\": \"USDT\",\n // \"ctVal\": \"1\",\n // \"ctValCcy\": \"\",\n // \"listTime\": \"0\",\n // \"lever\": \"20\",\n // \"tickSz\": \"0.00001\",\n // \"lotSz\": \"1\",\n // \"minSz\": \"1685\",\n // \"ctType\": \"\",\n // \"alias\": \"\",\n // \"state\": \"live\",\n // \"maxLmtSz\": \"10000000\",\n // \"maxMktSz\": \"10000000\"\n // }\n //\n const id = this.safeString (market, 'instId');\n const type = this.safeStringLower (market, 'instType');\n const spot = (type === 'spot');\n const swap = (type === 'swap');\n const baseId = this.safeString (market, 'baseCcy');\n const quoteId = this.safeString (market, 'quoteCcy', '');\n let settleId = undefined;\n let settle = undefined;\n const base = this.safeCurrencyCode (baseId);\n const quote = this.safeCurrencyCode (quoteId);\n let symbol = base + '/' + quote;\n let isLinear = undefined;\n if (swap) {\n isLinear = (quoteId !== 'USD');\n settleId = isLinear ? quoteId : baseId;\n settle = this.safeCurrencyCode (settleId);\n symbol = symbol + ':' + settle;\n }\n const fees = this.safeDict2 (this.fees, type, 'trading', {});\n let maxLeverage = this.safeString (market, 'lever', '1');\n maxLeverage = Precise.stringMax (maxLeverage, '1');\n const maxMarketSize = this.safeString (market, 'maxMktSz');\n const maxLimitSize = this.safeString (market, 'maxLmtSz');\n const maxAmount = this.parseNumber (Precise.stringMax (maxMarketSize, maxLimitSize));\n const state = this.safeString (market, 'state');\n return this.extend (fees, {\n 'id': id,\n 'symbol': symbol,\n 'base': base,\n 'quote': quote,\n 'settle': settle,\n 'baseId': baseId,\n 'quoteId': quoteId,\n 'settleId': settleId,\n 'type': type,\n 'spot': spot,\n 'margin': spot && (Precise.stringGt (maxLeverage, '1')),\n 'swap': swap,\n 'future': false,\n 'option': false,\n 'active': state === 'live',\n 'contract': swap,\n 'linear': isLinear,\n 'inverse': swap ? (!isLinear) : undefined,\n 'contractSize': swap ? this.safeNumber (market, 'ctVal') : undefined,\n 'expiry': undefined,\n 'expiryDatetime': undefined,\n 'strike': undefined,\n 'optionType': undefined,\n 'created': undefined,\n 'precision': {\n 'amount': this.safeNumber (market, 'lotSz'),\n 'price': this.safeNumber (market, 'tickSz'),\n },\n 'limits': {\n 'leverage': {\n 'min': this.parseNumber ('1'),\n 'max': this.parseNumber (maxLeverage),\n },\n 'amount': {\n 'min': this.safeNumber (market, 'minSz'),\n 'max': maxAmount,\n },\n 'price': {\n 'min': undefined,\n 'max': undefined,\n },\n 'cost': {\n 'min': undefined,\n 'max': undefined,\n },\n },\n 'info': market,\n });\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"instType\": \"SPOT\",\n \"instId\": \"ETH-USDT\",\n \"tgtCcy\": \"\",\n \"ccy\": \"\",\n \"ordId\": \"1001434573319675\",\n \"clOrdId\": \"\",\n \"tag\": \"\",\n \"px\": \"4056.620000000000\",\n \"sz\": \"0.004000\",\n \"pnl\": \"0.000000\",\n \"ordType\": \"market\",\n \"side\": \"buy\",\n \"posSide\": \"\",\n \"tdMode\": \"cash\",\n \"accFillSz\": \"0.004000\",\n \"fillPx\": \"\",\n \"tradeId\": \"\",\n \"fillSz\": \"0.004000\",\n \"fillTime\": \"1760619119000\",\n \"avgPx\": \"\",\n \"state\": \"filled\",\n \"lever\": \"1.000000\",\n \"tpTriggerPx\": \"\",\n \"tpTriggerPxType\": \"\",\n \"tpOrdPx\": \"\",\n \"slTriggerPx\": \"\",\n \"slTriggerPxType\": \"\",\n \"slOrdPx\": \"\",\n \"feeCcy\": \"USDT\",\n \"fee\": \"0.000004\",\n \"rebateCcy\": \"\",\n \"source\": \"\",\n \"rebate\": \"\",\n \"category\": \"normal\",\n \"uTime\": \"1760619119000\",\n \"cTime\": \"1760619119000\"\n }", "{\n \"instType\": \"SPOT\",\n \"instId\": \"DOGE-USDT\",\n \"ordId\": \"1001442305797142\",\n \"triggerPx\": \"0.01\",\n \"ordPx\": \"0.01\",\n \"sz\": \"20\",\n \"ordType\": \"\",\n \"side\": \"buy\",\n \"posSide\": \"\",\n \"tdMode\": \"cash\",\n \"triggerOrderType\": \"Conditional\",\n \"triggerPxType\": \"last\",\n \"lever\": \"\",\n \"slPrice\": \"\",\n \"slTriggerPrice\": \"\",\n \"tpPrice\": \"\",\n \"tpTriggerPrice\": \"\",\n \"closeSLTriggerPrice\": \"\",\n \"closeTPTriggerPrice\": \"\",\n \"cTime\": \"1761814167000\",\n \"uTime\": \"1761814167000\"\n }" ], "line_end" => 2442, "line_start" => 2326, "mappings" => [ %{ "comment" => nil, "key" => "id", "value" => "this.safeString (order, 'ordId')" }, %{ "comment" => nil, "key" => "clientOrderId", "value" => "this.safeString (order, 'clOrdId')" }, %{ "comment" => nil, "key" => "datetime", "value" => "this.iso8601 (timestamp)" }, %{ "comment" => nil, "key" => "timestamp", "value" => "timestamp" }, %{ "comment" => nil, "key" => "lastTradeTimestamp", "value" => "undefined" }, %{ "comment" => nil, "key" => "lastUpdateTimestamp", "value" => "this.safeInteger (order, 'uTime')" }, %{ "comment" => nil, "key" => "status", "value" => "this.parseOrderStatus (state)" }, %{ "comment" => nil, "key" => "symbol", "value" => "market['symbol']" }, %{ "comment" => nil, "key" => "type", "value" => "this.parseOrderType (orderType)" }, %{ "comment" => nil, "key" => "timeInForce", "value" => "this.parseOrderTimeInForce (orderType)" }, %{ "comment" => nil, "key" => "side", "value" => "this.safeString (order, 'side')" }, %{ "comment" => nil, "key" => "price", "value" => "this.safeString2 (order, 'px', 'ordPx')" }, %{ "comment" => nil, "key" => "average", "value" => "average" }, %{ "comment" => nil, "key" => "amount", "value" => "this.safeString (order, 'sz')" }, %{ "comment" => nil, "key" => "filled", "value" => "this.safeString (order, 'accFillSz')" }, %{ "comment" => nil, "key" => "remaining", "value" => "undefined" }, %{ "comment" => nil, "key" => "triggerPrice", "value" => "this.omitZero (this.safeString (order, 'triggerPx'))" }, %{ "comment" => nil, "key" => "takeProfitPrice", "value" => "this.safeString2 (order, 'tpTriggerPx', 'tpTriggerPrice')" }, %{ "comment" => nil, "key" => "stopLossPrice", "value" => "this.safeString2 (order, 'slTriggerPx', 'slTriggerPrice')" }, %{ "comment" => nil, "key" => "cost", "value" => "undefined" }, %{ "comment" => nil, "key" => "trades", "value" => "undefined" }, %{ "comment" => nil, "key" => "fee", "value" => "fee" }, %{ "comment" => nil, "key" => "reduceOnly", "value" => "undefined" }, %{ "comment" => nil, "key" => "postOnly", "value" => "orderType ? (orderType === 'post_only') : undefined" }, %{ "comment" => nil, "key" => "info", "value" => "order" }, %{ "comment" => nil, "key" => "cost", "value" => "this.parseNumber (feeCost)" }, %{ "comment" => nil, "key" => "currency", "value" => "this.safeCurrencyCode (feeCurrencyId)" } ], "name" => "parseOrder", "signature" => "parseOrder (order: Dict, market: Market = undefined): Order", "source" => "parseOrder (order: Dict, market: Market = undefined): Order {\n //\n // regular order\n // {\n // \"instType\": \"SPOT\",\n // \"instId\": \"ETH-USDT\",\n // \"tgtCcy\": \"\",\n // \"ccy\": \"\",\n // \"ordId\": \"1001434573319675\",\n // \"clOrdId\": \"\",\n // \"tag\": \"\",\n // \"px\": \"4056.620000000000\",\n // \"sz\": \"0.004000\",\n // \"pnl\": \"0.000000\",\n // \"ordType\": \"market\",\n // \"side\": \"buy\",\n // \"posSide\": \"\",\n // \"tdMode\": \"cash\",\n // \"accFillSz\": \"0.004000\",\n // \"fillPx\": \"\",\n // \"tradeId\": \"\",\n // \"fillSz\": \"0.004000\",\n // \"fillTime\": \"1760619119000\",\n // \"avgPx\": \"\",\n // \"state\": \"filled\",\n // \"lever\": \"1.000000\",\n // \"tpTriggerPx\": \"\",\n // \"tpTriggerPxType\": \"\",\n // \"tpOrdPx\": \"\",\n // \"slTriggerPx\": \"\",\n // \"slTriggerPxType\": \"\",\n // \"slOrdPx\": \"\",\n // \"feeCcy\": \"USDT\",\n // \"fee\": \"0.000004\",\n // \"rebateCcy\": \"\",\n // \"source\": \"\",\n // \"rebate\": \"\",\n // \"category\": \"normal\",\n // \"uTime\": \"1760619119000\",\n // \"cTime\": \"1760619119000\"\n // }\n //\n // trigger order\n // {\n // \"instType\": \"SPOT\",\n // \"instId\": \"DOGE-USDT\",\n // \"ordId\": \"1001442305797142\",\n // \"triggerPx\": \"0.01\",\n // \"ordPx\": \"0.01\",\n // \"sz\": \"20\",\n // \"ordType\": \"\",\n // \"side\": \"buy\",\n // \"posSide\": \"\",\n // \"tdMode\": \"cash\",\n // \"triggerOrderType\": \"Conditional\",\n // \"triggerPxType\": \"last\",\n // \"lever\": \"\",\n // \"slPrice\": \"\",\n // \"slTriggerPrice\": \"\",\n // \"tpPrice\": \"\",\n // \"tpTriggerPrice\": \"\",\n // \"closeSLTriggerPrice\": \"\",\n // \"closeTPTriggerPrice\": \"\",\n // \"cTime\": \"1761814167000\",\n // \"uTime\": \"1761814167000\"\n // }\n //\n const marketId = this.safeString (order, 'instId');\n market = this.safeMarket (marketId, market);\n let timestamp = this.safeInteger (order, 'cTime');\n const timestampString = this.safeString (order, 'cTime', '');\n if (timestampString.length < 13) {\n timestamp = this.safeTimestamp (order, 'cTime');\n }\n const state = this.safeString (order, 'state');\n const orderType = this.safeString (order, 'ordType');\n let average = this.safeString (order, 'avgPx');\n if (average === '') {\n average = undefined;\n }\n const feeCurrencyId = this.safeString (order, 'feeCcy');\n let fee = undefined;\n if (feeCurrencyId !== undefined) {\n const feeCost = this.safeString (order, 'fee');\n fee = {\n 'cost': this.parseNumber (feeCost),\n 'currency': this.safeCurrencyCode (feeCurrencyId),\n };\n }\n return this.safeOrder ({\n 'id': this.safeString (order, 'ordId'),\n 'clientOrderId': this.safeString (order, 'clOrdId'),\n 'datetime': this.iso8601 (timestamp),\n 'timestamp': timestamp,\n 'lastTradeTimestamp': undefined,\n 'lastUpdateTimestamp': this.safeInteger (order, 'uTime'),\n 'status': this.parseOrderStatus (state),\n 'symbol': market['symbol'],\n 'type': this.parseOrderType (orderType),\n 'timeInForce': this.parseOrderTimeInForce (orderType),\n 'side': this.safeString (order, 'side'),\n 'price': this.safeString2 (order, 'px', 'ordPx'),\n 'average': average,\n 'amount': this.safeString (order, 'sz'),\n 'filled': this.safeString (order, 'accFillSz'),\n 'remaining': undefined,\n 'triggerPrice': this.omitZero (this.safeString (order, 'triggerPx')),\n 'takeProfitPrice': this.safeString2 (order, 'tpTriggerPx', 'tpTriggerPrice'),\n 'stopLossPrice': this.safeString2 (order, 'slTriggerPx', 'slTriggerPrice'),\n 'cost': undefined,\n 'trades': undefined,\n 'fee': fee,\n 'reduceOnly': undefined,\n 'postOnly': orderType ? (orderType === 'post_only') : undefined,\n 'info': order,\n }, market);\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 2452, "line_start" => 2444, "mappings" => [ %{ "comment" => nil, "key" => "live", "value" => "'open'" }, %{ "comment" => nil, "key" => "filled", "value" => "'closed'" }, %{ "comment" => nil, "key" => "canceled", "value" => "'canceled'" }, %{ "comment" => nil, "key" => "partially_filled", "value" => "'open'" } ], "name" => "parseOrderStatus", "signature" => "parseOrderStatus (status: Str): Str", "source" => "parseOrderStatus (status: Str): Str {\n const statuses = {\n 'live': 'open',\n 'filled': 'closed',\n 'canceled': 'canceled',\n 'partially_filled': 'open',\n };\n return this.safeString (statuses, status, status);\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 2473, "line_start" => 2465, "mappings" => [ %{ "comment" => nil, "key" => "post_only", "value" => "'PO'" }, %{ "comment" => nil, "key" => "ioc", "value" => "'IOC'" }, %{ "comment" => nil, "key" => "limit", "value" => "'GTC'" }, %{ "comment" => nil, "key" => "market", "value" => "'GTC'" } ], "name" => "parseOrderTimeInForce", "signature" => "parseOrderTimeInForce (type: Str): Str", "source" => "parseOrderTimeInForce (type: Str): Str {\n const timeInForces = {\n 'post_only': 'PO',\n 'ioc': 'IOC',\n 'limit': 'GTC',\n 'market': 'GTC',\n };\n return this.safeString (timeInForces, type, type);\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 2463, "line_start" => 2454, "mappings" => [ %{ "comment" => nil, "key" => "limit", "value" => "'limit'" }, %{ "comment" => nil, "key" => "market", "value" => "'market'" }, %{ "comment" => nil, "key" => "post_only", "value" => "'limit'" }, %{ "comment" => nil, "key" => "ioc", "value" => "'market'" }, %{ "comment" => nil, "key" => "TPSL", "value" => "'market'" } ], "name" => "parseOrderType", "signature" => "parseOrderType (type: Str): Str", "source" => "parseOrderType (type: Str): Str {\n const types = {\n 'limit': 'limit',\n 'market': 'market',\n 'post_only': 'limit',\n 'ioc': 'market',\n 'TPSL': 'market',\n };\n return this.safeString (types, type, type);\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"instType\": \"SWAP\",\n \"mgnMode\": \"cross\",\n \"instId\": \"DOGE-USDT-SWAP\",\n \"posId\": \"1001110099878275\",\n \"posSide\": \"long\",\n \"pos\": \"20\",\n \"avgPx\": \"0.18408\",\n \"lever\": \"75\",\n \"liqPx\": \"0.00001\",\n \"useMargin\": \"0.049088\",\n \"mrgPosition\": \"merge\",\n \"ccy\": \"USDT\",\n \"uTime\": \"1760709419000\",\n \"cTime\": \"1760709419000\"\n }" ], "line_end" => 2602, "line_start" => 2550, "mappings" => [ %{ "comment" => nil, "key" => "symbol", "value" => "market['symbol']" }, %{ "comment" => nil, "key" => "id", "value" => "this.safeString (position, 'posId')" }, %{ "comment" => nil, "key" => "timestamp", "value" => "timestamp" }, %{ "comment" => nil, "key" => "datetime", "value" => "this.iso8601 (timestamp)" }, %{ "comment" => nil, "key" => "contracts", "value" => "this.safeString (position, 'pos')" }, %{ "comment" => nil, "key" => "contractSize", "value" => "undefined" }, %{ "comment" => nil, "key" => "side", "value" => "this.safeString (position, 'posSide')" }, %{ "comment" => nil, "key" => "notional", "value" => "undefined" }, %{ "comment" => nil, "key" => "leverage", "value" => "this.omitZero (this.safeString (position, 'lever'))" }, %{ "comment" => nil, "key" => "unrealizedPnl", "value" => "undefined" }, %{ "comment" => nil, "key" => "realizedPnl", "value" => "undefined" }, %{ "comment" => nil, "key" => "collateral", "value" => "undefined" }, %{ "comment" => nil, "key" => "entryPrice", "value" => "this.safeString (position, 'avgPx')" }, %{ "comment" => nil, "key" => "markPrice", "value" => "undefined" }, %{ "comment" => nil, "key" => "liquidationPrice", "value" => "this.safeString (position, 'liqPx')" }, %{ "comment" => nil, "key" => "marginMode", "value" => "this.safeString (position, 'mgnMode')" }, %{ "comment" => nil, "key" => "hedged", "value" => "true" }, %{ "comment" => nil, "key" => "maintenanceMargin", "value" => "this.safeString (position, 'useMargin')" }, %{ "comment" => nil, "key" => "maintenanceMarginPercentage", "value" => "undefined" }, %{ "comment" => nil, "key" => "initialMargin", "value" => "undefined" }, %{ "comment" => nil, "key" => "initialMarginPercentage", "value" => "undefined" }, %{ "comment" => nil, "key" => "marginRatio", "value" => "undefined" }, %{ "comment" => nil, "key" => "lastUpdateTimestamp", "value" => "this.safeInteger (position, 'uTime')" }, %{ "comment" => nil, "key" => "lastPrice", "value" => "undefined" }, %{ "comment" => nil, "key" => "stopLossPrice", "value" => "undefined" }, %{ "comment" => nil, "key" => "takeProfitPrice", "value" => "undefined" }, %{ "comment" => nil, "key" => "percentage", "value" => "undefined" }, %{ "comment" => nil, "key" => "info", "value" => "position" } ], "name" => "parsePosition", "signature" => "parsePosition (position: Dict, market: Market = undefined): Position", "source" => "parsePosition (position: Dict, market: Market = undefined): Position {\n //\n // {\n // \"instType\": \"SWAP\",\n // \"mgnMode\": \"cross\",\n // \"instId\": \"DOGE-USDT-SWAP\",\n // \"posId\": \"1001110099878275\",\n // \"posSide\": \"long\",\n // \"pos\": \"20\",\n // \"avgPx\": \"0.18408\",\n // \"lever\": \"75\",\n // \"liqPx\": \"0.00001\",\n // \"useMargin\": \"0.049088\",\n // \"mrgPosition\": \"merge\",\n // \"ccy\": \"USDT\",\n // \"uTime\": \"1760709419000\",\n // \"cTime\": \"1760709419000\"\n // }\n //\n const marketId = this.safeString (position, 'instId');\n market = this.safeMarket (marketId, market);\n const timestamp = this.safeInteger (position, 'cTime');\n return this.safePosition ({\n 'symbol': market['symbol'],\n 'id': this.safeString (position, 'posId'),\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'contracts': this.safeString (position, 'pos'),\n 'contractSize': undefined,\n 'side': this.safeString (position, 'posSide'),\n 'notional': undefined,\n 'leverage': this.omitZero (this.safeString (position, 'lever')),\n 'unrealizedPnl': undefined,\n 'realizedPnl': undefined,\n 'collateral': undefined,\n 'entryPrice': this.safeString (position, 'avgPx'),\n 'markPrice': undefined,\n 'liquidationPrice': this.safeString (position, 'liqPx'),\n 'marginMode': this.safeString (position, 'mgnMode'),\n 'hedged': true,\n 'maintenanceMargin': this.safeString (position, 'useMargin'),\n 'maintenanceMarginPercentage': undefined,\n 'initialMargin': undefined,\n 'initialMarginPercentage': undefined,\n 'marginRatio': undefined,\n 'lastUpdateTimestamp': this.safeInteger (position, 'uTime'),\n 'lastPrice': undefined,\n 'stopLossPrice': undefined,\n 'takeProfitPrice': undefined,\n 'percentage': undefined,\n 'info': position,\n });\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 917, "line_start" => 911, "mappings" => [ %{ "comment" => nil, "key" => "T", "value" => "'taker'" }, %{ "comment" => nil, "key" => "M", "value" => "'maker'" } ], "name" => "parseTakerOrMaker", "signature" => "parseTakerOrMaker (execType: Str)", "source" => "parseTakerOrMaker (execType: Str) {\n const types = {\n 'T': 'taker',\n 'M': 'maker',\n };\n return this.safeString (types, execType, execType);\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"instType\": \"SWAP\",\n \"instId\": \"BTC-USD-SWAP\",\n \"last\": \"114113.3\",\n \"lastSz\": \"\",\n \"askPx\": \"114113.5\",\n \"askSz\": \"56280\",\n \"bidPx\": \"114113.2\",\n \"bidSz\": \"63220\",\n \"open24h\": \"113214.7\",\n \"high24h\": \"116039.2\",\n \"low24h\": \"113214.7\",\n \"volCcy24h\": \"73.31475724\",\n \"vol24h\": \"8406739\",\n \"sodUtc0\": \"\",\n \"sodUtc8\": \"\",\n \"ts\": \"1760367816000\"\n }" ], "line_end" => 806, "line_start" => 746, "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" => "high" }, %{ "comment" => nil, "key" => "low", "value" => "low" }, %{ "comment" => nil, "key" => "bid", "value" => "this.safeString (ticker, 'bidPx')" }, %{ "comment" => nil, "key" => "bidVolume", "value" => "this.safeString (ticker, 'bidSz')" }, %{ "comment" => nil, "key" => "ask", "value" => "this.safeString (ticker, 'askPx')" }, %{ "comment" => nil, "key" => "askVolume", "value" => "this.safeString (ticker, 'askSz')" }, %{ "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" => "markPrice", "value" => "undefined" }, %{ "comment" => nil, "key" => "indexPrice", "value" => "undefined" }, %{ "comment" => nil, "key" => "info", "value" => "ticker" } ], "name" => "parseTicker", "signature" => "parseTicker (ticker: Dict, market: Market = undefined): Ticker", "source" => "parseTicker (ticker: Dict, market: Market = undefined): Ticker {\n //\n // {\n // \"instType\": \"SWAP\",\n // \"instId\": \"BTC-USD-SWAP\",\n // \"last\": \"114113.3\",\n // \"lastSz\": \"\",\n // \"askPx\": \"114113.5\",\n // \"askSz\": \"56280\",\n // \"bidPx\": \"114113.2\",\n // \"bidSz\": \"63220\",\n // \"open24h\": \"113214.7\",\n // \"high24h\": \"116039.2\",\n // \"low24h\": \"113214.7\",\n // \"volCcy24h\": \"73.31475724\",\n // \"vol24h\": \"8406739\",\n // \"sodUtc0\": \"\",\n // \"sodUtc8\": \"\",\n // \"ts\": \"1760367816000\"\n // }\n //\n const timestamp = this.safeInteger (ticker, 'ts');\n const marketId = this.safeString (ticker, 'instId');\n market = this.safeMarket (marketId, market, '-');\n const symbol = market['symbol'];\n const last = this.safeString (ticker, 'last');\n const open = this.safeString (ticker, 'open24h');\n let quoteVolume = this.safeString (ticker, 'volCcy24h');\n let baseVolume = this.safeString (ticker, 'vol24h');\n if (market['swap'] && market['inverse']) {\n const temp = baseVolume;\n baseVolume = quoteVolume;\n quoteVolume = temp;\n }\n const high = this.safeString (ticker, 'high24h');\n const low = this.safeString (ticker, 'low24h');\n return this.safeTicker ({\n 'symbol': symbol,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'high': high,\n 'low': low,\n 'bid': this.safeString (ticker, 'bidPx'),\n 'bidVolume': this.safeString (ticker, 'bidSz'),\n 'ask': this.safeString (ticker, 'askPx'),\n 'askVolume': this.safeString (ticker, 'askSz'),\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 'markPrice': undefined,\n 'indexPrice': undefined,\n 'info': ticker,\n }, market);\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"instId\": \"ETH-USDT\",\n \"tradeId\": \"1001056388761321\",\n \"px\": \"4095.66\",\n \"sz\": \"0.01311251\",\n \"side\": \"sell\",\n \"ts\": \"1760367870000\"\n }", "{\n \"instType\": \"SPOT\",\n \"instId\": \"ETH-USDT\",\n \"tradeId\": \"1001056429613610\",\n \"ordId\": \"1001435238208686\",\n \"clOrdId\": \"\",\n \"billId\": \"10010564296136101\",\n \"tag\": \"\",\n \"fillPx\": \"3791.15\",\n \"fillSz\": \"0.004\",\n \"side\": \"sell\",\n \"posSide\": \"\",\n \"execType\": \"\",\n \"feeCcy\": \"USDT\",\n \"fee\": \"0.0151646\",\n \"ts\": \"1760704540000\"\n }" ], "line_end" => 909, "line_start" => 847, "mappings" => [ %{ "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" => "id", "value" => "this.safeString (trade, 'tradeId')" }, %{ "comment" => nil, "key" => "order", "value" => "this.safeString (trade, 'ordId')" }, %{ "comment" => nil, "key" => "type", "value" => "undefined" }, %{ "comment" => nil, "key" => "takerOrMaker", "value" => "this.parseTakerOrMaker (execType)" }, %{ "comment" => nil, "key" => "side", "value" => "side" }, %{ "comment" => nil, "key" => "price", "value" => "this.safeString2 (trade, 'fillPx', 'px')" }, %{ "comment" => nil, "key" => "amount", "value" => "this.safeString2 (trade, 'fillSz', 'sz')" }, %{ "comment" => nil, "key" => "cost", "value" => "undefined" }, %{ "comment" => nil, "key" => "fee", "value" => "fee" }, %{ "comment" => nil, "key" => "cost", "value" => "feeCost" }, %{ "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 // public fetchTrades\n //\n // {\n // \"instId\": \"ETH-USDT\",\n // \"tradeId\": \"1001056388761321\",\n // \"px\": \"4095.66\",\n // \"sz\": \"0.01311251\",\n // \"side\": \"sell\",\n // \"ts\": \"1760367870000\"\n // }\n //\n // private fetchMyTrades\n // {\n // \"instType\": \"SPOT\",\n // \"instId\": \"ETH-USDT\",\n // \"tradeId\": \"1001056429613610\",\n // \"ordId\": \"1001435238208686\",\n // \"clOrdId\": \"\",\n // \"billId\": \"10010564296136101\",\n // \"tag\": \"\",\n // \"fillPx\": \"3791.15\",\n // \"fillSz\": \"0.004\",\n // \"side\": \"sell\",\n // \"posSide\": \"\",\n // \"execType\": \"\",\n // \"feeCcy\": \"USDT\",\n // \"fee\": \"0.0151646\",\n // \"ts\": \"1760704540000\"\n // }\n //\n const marketId = this.safeString (trade, 'instId');\n market = this.safeMarket (marketId, market);\n const timestamp = this.safeInteger (trade, 'ts');\n const side = this.safeString (trade, 'side');\n const execType = this.safeString (trade, 'execType');\n let fee = undefined;\n const feeCost = this.safeString (trade, 'fee');\n if (feeCost !== undefined) {\n const feeCurrencyId = this.safeString (trade, 'feeCcy');\n const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId);\n fee = {\n 'cost': feeCost,\n 'currency': feeCurrencyCode,\n };\n }\n return this.safeTrade ({\n 'info': trade,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'symbol': market['symbol'],\n 'id': this.safeString (trade, 'tradeId'),\n 'order': this.safeString (trade, 'ordId'),\n 'type': undefined,\n 'takerOrMaker': this.parseTakerOrMaker (execType),\n 'side': side,\n 'price': this.safeString2 (trade, 'fillPx', 'px'),\n 'amount': this.safeString2 (trade, 'fillSz', 'sz'),\n 'cost': undefined,\n 'fee': fee,\n }, market);\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"createTime\": 1760368656,\n \"txHash\": \"03fe3244d89e794586222413c61779380da9e9fe5baaa253c38d01a4199a3499\",\n \"chainName\": \"TRC20\",\n \"amount\": \"149\",\n \"coin\": \"USDT\",\n \"status\": \"succeed\"\n }" ], "line_end" => 1110, "line_start" => 1065, "mappings" => [ %{ "comment" => nil, "key" => "info", "value" => "transaction" }, %{ "comment" => nil, "key" => "id", "value" => "undefined" }, %{ "comment" => nil, "key" => "currency", "value" => "code" }, %{ "comment" => nil, "key" => "amount", "value" => "amount" }, %{ "comment" => nil, "key" => "network", "value" => "network" }, %{ "comment" => nil, "key" => "addressFrom", "value" => "undefined" }, %{ "comment" => nil, "key" => "addressTo", "value" => "undefined" }, %{ "comment" => nil, "key" => "address", "value" => "this.safeString (transaction, 'address')" }, %{ "comment" => nil, "key" => "tagFrom", "value" => "undefined" }, %{ "comment" => nil, "key" => "tagTo", "value" => "undefined" }, %{ "comment" => nil, "key" => "tag", "value" => "undefined" }, %{ "comment" => nil, "key" => "status", "value" => "status" }, %{ "comment" => nil, "key" => "type", "value" => "undefined" }, %{ "comment" => nil, "key" => "updated", "value" => "undefined" }, %{ "comment" => nil, "key" => "txid", "value" => "txid" }, %{ "comment" => nil, "key" => "timestamp", "value" => "timestamp" }, %{ "comment" => nil, "key" => "datetime", "value" => "this.iso8601 (timestamp)" }, %{ "comment" => nil, "key" => "internal", "value" => "undefined" }, %{ "comment" => nil, "key" => "comment", "value" => "undefined" }, %{ "comment" => nil, "key" => "fee", "value" => "{\n 'currency': undefined,\n 'cost': undefined,\n }" }, %{ "comment" => nil, "key" => "currency", "value" => "undefined" }, %{ "comment" => nil, "key" => "cost", "value" => "undefined" } ], "name" => "parseTransaction", "signature" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction", "source" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction {\n //\n // fetchDeposits\n // {\n // \"createTime\": 1760368656,\n // \"txHash\": \"03fe3244d89e794586222413c61779380da9e9fe5baaa253c38d01a4199a3499\",\n // \"chainName\": \"TRC20\",\n // \"amount\": \"149\",\n // \"coin\": \"USDT\",\n // \"status\": \"succeed\"\n // }\n //\n const txid = this.safeString (transaction, 'txHash');\n const currencyId = this.safeString (transaction, 'coin');\n const code = this.safeCurrencyCode (currencyId, currency);\n const amount = this.safeNumber (transaction, 'amount');\n const timestamp = this.safeTimestamp (transaction, 'createTime');\n const networkId = this.safeString (transaction, 'chainName');\n const network = this.networkIdToCode (networkId);\n const status = this.parseTransactionStatus (this.safeString (transaction, 'status'));\n return {\n 'info': transaction,\n 'id': undefined,\n 'currency': code,\n 'amount': amount,\n 'network': network,\n 'addressFrom': undefined,\n 'addressTo': undefined,\n 'address': this.safeString (transaction, 'address'),\n 'tagFrom': undefined,\n 'tagTo': undefined,\n 'tag': undefined,\n 'status': status,\n 'type': undefined,\n 'updated': undefined,\n 'txid': txid,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'internal': undefined,\n 'comment': undefined,\n 'fee': {\n 'currency': undefined,\n 'cost': undefined,\n },\n } as Transaction;\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 1118, "line_start" => 1112, "mappings" => [], "name" => "parseTransactionStatus", "signature" => "parseTransactionStatus (status: Str): Str", "source" => "parseTransactionStatus (status: Str): Str {\n const statuses: Dict = {\n 'confirming': 'pending',\n 'succeed': 'ok',\n };\n return this.safeString (statuses, status, status);\n }" }, %{ "comment" => nil, "examples" => [ "{\n \"retCode\": 0,\n \"retMsg\": \"\",\n \"retData\": {}\n }" ], "line_end" => 1436, "line_start" => 1415, "mappings" => [ %{ "comment" => nil, "key" => "info", "value" => "transfer" }, %{ "comment" => nil, "key" => "id", "value" => "undefined" }, %{ "comment" => nil, "key" => "timestamp", "value" => "undefined" }, %{ "comment" => nil, "key" => "datetime", "value" => "undefined" }, %{ "comment" => nil, "key" => "currency", "value" => "currencyCode" }, %{ "comment" => nil, "key" => "amount", "value" => "undefined" }, %{ "comment" => nil, "key" => "fromAccount", "value" => "undefined" }, %{ "comment" => nil, "key" => "toAccount", "value" => "undefined" }, %{ "comment" => nil, "key" => "status", "value" => "this.parseTransferStatus (status)" } ], "name" => "parseTransfer", "signature" => "parseTransfer (transfer: Dict, currency: Currency = undefined): TransferEntry", "source" => "parseTransfer (transfer: Dict, currency: Currency = undefined): TransferEntry {\n //\n // {\n // \"retCode\": 0,\n // \"retMsg\": \"\",\n // \"retData\": {}\n // }\n //\n const status = this.safeString (transfer, 'retCode');\n const currencyCode = this.safeCurrencyCode (undefined, currency);\n return {\n 'info': transfer,\n 'id': undefined,\n 'timestamp': undefined,\n 'datetime': undefined,\n 'currency': currencyCode,\n 'amount': undefined,\n 'fromAccount': undefined,\n 'toAccount': undefined,\n 'status': this.parseTransferStatus (status),\n };\n }" }, %{ "comment" => nil, "examples" => [], "line_end" => 1443, "line_start" => 1438, "mappings" => [], "name" => "parseTransferStatus", "signature" => "parseTransferStatus (status: Str): Str", "source" => "parseTransferStatus (status: Str): Str {\n if (status === '0') {\n return 'ok';\n }\n return 'failed';\n }" } ], path_prefix: "", pro: true, quote_json_numbers: nil, rate_limits: %{ interval_ms: 200, period: 1000, requests: 5, rolling_window_size: 60000 }, raw_endpoints: %{ private: [ %{ auth: false, cost: 5, method: :get, path: "/deepcoin/account/balances" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/account/bills" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/account/positions" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/agents/users" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/agents/users/rebate-list" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/agents/users/rebates" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/asset/deposit-list" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/asset/recharge-chain-list" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/asset/withdraw-list" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/copytrading/estimate-profit" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/copytrading/follower-rank" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/copytrading/history-profit" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/copytrading/leader-position" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/copytrading/support-contracts" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/internal-transfer/history-order" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/internal-transfer/support" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/listenkey/acquire" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/listenkey/extend" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/rebate/config" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/trade/fills" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/trade/finishOrderByID" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/trade/orderByID" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/trade/orders-history" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/trade/trigger-orders-history" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/trade/trigger-orders-pending" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/trade/v2/orders-pending" }, %{ auth: false, cost: 5, method: :post, path: "/deepcoin/account/set-leverage" }, %{ auth: false, cost: 5, method: :post, path: "/deepcoin/asset/transfer" }, %{ auth: false, cost: 5, method: :post, path: "/deepcoin/copytrading/leader-settings" }, %{ auth: false, cost: 5, method: :post, path: "/deepcoin/copytrading/set-contracts" }, %{ auth: false, cost: 5, method: :post, path: "/deepcoin/internal-transfer" }, %{ auth: false, cost: 5, method: :post, path: "/deepcoin/rebate/config" }, %{ auth: false, cost: 5, method: :post, path: "/deepcoin/trade/batch-cancel-order" }, %{ auth: false, cost: 5, method: :post, path: "/deepcoin/trade/batch-close-position" }, %{ auth: false, cost: 5, method: :post, path: "/deepcoin/trade/cancel-order" }, %{ auth: false, cost: 0.16666666666666666, method: :post, path: "/deepcoin/trade/cancel-trigger-order" }, %{ auth: false, cost: 5, method: :post, path: "/deepcoin/trade/close-position-by-ids" }, %{ auth: false, cost: 5, method: :post, path: "/deepcoin/trade/order" }, %{ auth: false, cost: 5, method: :post, path: "/deepcoin/trade/replace-order" }, %{ auth: false, cost: 5, method: :post, path: "/deepcoin/trade/replace-order-sltp" }, %{ auth: false, cost: 5, method: :post, path: "/deepcoin/trade/swap/cancel-all" }, %{ auth: false, cost: 5, method: :post, path: "/deepcoin/trade/trigger-order" } ], public: [ %{ auth: false, cost: 1, method: :get, path: "/deepcoin/market/books" }, %{ auth: false, cost: 1, method: :get, path: "/deepcoin/market/candles" }, %{ auth: false, cost: 1, method: :get, path: "/deepcoin/market/index-candles" }, %{ auth: false, cost: 1, method: :get, path: "/deepcoin/market/instruments" }, %{ auth: false, cost: 1, method: :get, path: "/deepcoin/market/mark-price-candles" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/market/step-margin" }, %{ auth: false, cost: 1, method: :get, path: "/deepcoin/market/tickers" }, %{ auth: false, cost: 1, method: :get, path: "/deepcoin/market/trades" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/trade/fund-rate/current-funding-rate" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/trade/fund-rate/history" }, %{ auth: false, cost: 5, method: :get, path: "/deepcoin/trade/funding-rate" } ] }, required_credentials: %{ api_key: true, password: true, secret: true, uid: false }, requires_eddsa: false, response_error: %{ code_field: "retCode", field: "retCode", message_field: "retMsg", success_values: [ "0" ], type: :success_code }, signing: %{ api_key_header: "ACCESS-KEY", confidence: :high, has_passphrase: true, passphrase_header: "ACCESS-PASSPHRASE", pattern: :hmac_sha256_passphrase_signed, signature_encoding: :base64, signature_header: "ACCESS-SIGN", timestamp_format: :iso8601, timestamp_header: "ACCESS-TIMESTAMP" }, spec_format_version: 1, status: %{ "eta" => nil, "status" => "ok", "updated" => nil, "url" => nil }, symbol_format: nil, symbol_formats: %{ precision_mode: 4, sample_limits: %{ "amount" => %{ "max" => 7692307, "min" => 0.5 }, "cost" => %{}, "price" => %{} }, sample_precision: %{ "amount" => 0.001, "price" => 1.0e-5 }, spot: %{ base: "A", base_id: "A", case: :upper, contract: false, id: "A-USDT", limits: %{ "amount" => %{ "max" => 7692307, "min" => 0.5 }, "cost" => %{}, "leverage" => %{ "max" => 1, "min" => 1 }, "price" => %{} }, maker: 0.001, precision: %{ "amount" => 0.001, "price" => 1.0e-5 }, quote: "USDT", quote_id: "USDT", separator: "-", symbol: "A/USDT", taker: 0.0015 }, swap: %{ base: "BTC", base_id: "BTC", case: :upper, contract: true, contract_size: 1, id: "BTC-USD-SWAP", inverse: true, limits: %{ "amount" => %{ "max" => 7000, "min" => 1 }, "cost" => %{}, "leverage" => %{ "max" => 125, "min" => 1 }, "price" => %{} }, linear: false, maker: 0.001, precision: %{ "amount" => 1, "price" => 0.1 }, quote: "USD", quote_id: "USD", separator: "-", settle: "BTC", settle_id: "BTC", symbol: "BTC/USD:BTC", taker: 0.0015 } }, symbol_patterns: %{ spot: %{ case: :upper, component_order: nil, date_format: nil, pattern: :dash_upper, separator: "-", suffix: nil }, swap: %{ case: :upper, component_order: nil, date_format: nil, pattern: :suffix_swap, separator: "-", suffix: "-SWAP" } }, timeframes: %{ "12h" => "12H", "15m" => "15m", "1M" => "1M", "1d" => "1D", "1h" => "1H", "1m" => "1m", "1w" => "1W", "1y" => "1Y", "30m" => "30m", "4h" => "4H", "5m" => "5m" }, url_strategy: %{ detected_from: "fallback", pattern: :no_prefix, prefix: nil }, urls: %{ api: "https://api.deepcoin.com", api_sections: %{ "private" => "https://api.deepcoin.com", "public" => "https://api.deepcoin.com" }, doc: "https://www.deepcoin.com/docs", other: nil, sandbox: nil, www: "https://www.deepcoin.com/" }, version: "v1", ws: %{ channel_templates: %{ watch_my_trades: %{ auth_required: true, market_id_format: :native, params: [ %{ "default" => nil, "name" => "limit" } ], pattern: :custom }, watch_ohlcv: %{ channel_name: "11", market_id_format: :native, params: [ %{ "default" => nil, "name" => "interval" }, %{ "default" => nil, "name" => "limit" } ], pattern: :custom }, watch_order_book: %{ channel_name: "25", market_id_format: :native, params: [ %{ "default" => nil, "name" => "limit" } ], pattern: :custom }, watch_orders: %{ auth_required: true, market_id_format: :native, params: [ %{ "default" => nil, "name" => "limit" } ], pattern: :custom }, watch_positions: %{ auth_required: true, channel_name: "private", market_id_format: :native, params: [ %{ "default" => nil, "name" => "limit" } ], pattern: :custom }, watch_private: %{ auth_required: true, market_id_format: :native, params: [], pattern: :custom }, watch_public: %{ market_id_format: :native, params: [], pattern: :custom }, watch_ticker: %{ channel_name: "7", market_id_format: :native, params: [], pattern: :custom }, watch_trades: %{ channel_name: "2", market_id_format: :native, params: [ %{ "default" => nil, "name" => "limit" } ], pattern: :custom } }, has: %{ watch_balance: false, watch_bids_asks: false, watch_funding_rate: false, watch_funding_rates: false, watch_liquidations: false, watch_liquidations_for_symbols: false, watch_mark_price: false, watch_mark_prices: false, watch_my_liquidations: false, watch_my_liquidations_for_symbols: false, watch_my_trades: true, 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: nil, watch_position: nil, watch_positions: true, watch_status: nil, watch_ticker: true, watch_tickers: false, watch_trades: true, watch_trades_for_symbols: false }, message_patterns: [ %{ format: :custom, keys: [], sources: [ :watch_multiple ] }, %{ format: :custom, keys: [ "sendTopicAction" ], sources: [ :send, :watch ] }, %{ format: :string, sources: [ :ping ] } ], subscription_config: %{ args_field: "sendTopicAction.TopicID", args_format: :params_object, market_id_format: :native, op_field: "sendTopicAction.Action" }, subscription_pattern: :custom, urls: %{ "private" => "wss://stream.deepcoin.com/v1/private", "public" => %{ "spot" => "wss://stream.deepcoin.com/streamlet/trade/public/spot?platform=api", "swap" => "wss://stream.deepcoin.com/streamlet/trade/public/swap?platform=api" } }, watch_methods: [ "watchMyTrades", "watchOHLCV", "watchOrderBook", "watchOrders", "watchPositions", "watchPrivate", "watchPublic", "watchTicker", "watchTrades" ] } }