Back to Ccxt

Deepcoin

wiki/exchanges/deepcoin.md

4.5.5245.3 KB
Original Source

<a name="deepcoin" id="deepcoin"></a>

deepcoin{docsify-ignore}

Kind: global class
Extends: <code>Exchange</code>

<a name="fetchMarkets" id="fetchmarkets"></a>

fetchMarkets{docsify-ignore}

retrieves data on all markets for okcoin

Kind: instance method of <code>deepcoin</code>
Returns: <code>Array<object></code> - an array of objects representing market data

See: https://www.deepcoin.com/docs/DeepCoinMarket/getBaseInfo

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
deepcoin.fetchMarkets ([params])

<a name="fetchOrderBook" id="fetchorderbook"></a>

fetchOrderBook{docsify-ignore}

fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data

Kind: instance method of <code>deepcoin</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols

See: https://www.deepcoin.com/docs/DeepCoinMarket/marketBooks

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the order book for
limit<code>int</code>Nothe maximum amount of order book entries to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
deepcoin.fetchOrderBook (symbol[, limit, params])

<a name="fetchOHLCV" id="fetchohlcv"></a>

fetchOHLCV{docsify-ignore}

fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market

Kind: instance method of <code>deepcoin</code>
Returns: <code>Array<Array<int>></code> - A list of candles ordered as timestamp, open, high, low, close, volume

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch OHLCV data for
timeframe<code>string</code>Yesthe length of time each candle represents
since<code>int</code>Notimestamp in ms of the earliest candle to fetch
limit<code>int</code>Nothe maximum amount of candles to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Notimestamp in ms of the latest candle to fetch
params.price<code>string</code>No"mark" or "index" for mark price and index price candles
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
javascript
deepcoin.fetchOHLCV (symbol, timeframe[, since, limit, params])

<a name="fetchTickers" id="fetchtickers"></a>

fetchTickers{docsify-ignore}

fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market

Kind: instance method of <code>deepcoin</code>
Returns: <code>object</code> - a dictionary of ticker structures

See: https://www.deepcoin.com/docs/DeepCoinMarket/getMarketTickers

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nounified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
deepcoin.fetchTickers ([symbols, params])

<a name="fetchTrades" id="fetchtrades"></a>

fetchTrades{docsify-ignore}

get the list of most recent trades for a particular symbol

Kind: instance method of <code>deepcoin</code>
Returns: <code>Array<Trade></code> - a list of trade structures

See: https://www.deepcoin.com/docs/DeepCoinMarket/getTrades

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch trades for
since<code>int</code>Notimestamp in ms of the earliest trade to fetch
limit<code>int</code>Nothe maximum amount of trades to fetch (default 100, max 500)
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
deepcoin.fetchTrades (symbol[, since, limit, params])

<a name="fetchBalance" id="fetchbalance"></a>

fetchBalance{docsify-ignore}

query for balance and get the amount of funds available for trading or funds locked in orders

Kind: instance method of <code>deepcoin</code>
Returns: <code>object</code> - a balance structure

See: https://www.deepcoin.com/docs/DeepCoinAccount/getAccountBalance

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.type<code>string</code>No"spot" or "swap", the market type for the balance
javascript
deepcoin.fetchBalance ([params])

<a name="fetchDeposits" id="fetchdeposits"></a>

fetchDeposits{docsify-ignore}

fetch all deposits made to an account

Kind: instance method of <code>deepcoin</code>
Returns: <code>Array<object></code> - a list of transaction structures

See: https://www.deepcoin.com/docs/assets/deposit

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
since<code>int</code>Nothe earliest time in ms to fetch deposits for
limit<code>int</code>Nothe maximum number of deposits structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Nothe latest time in ms to fetch entries for
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
javascript
deepcoin.fetchDeposits (code[, since, limit, params])

<a name="fetchWithdrawals" id="fetchwithdrawals"></a>

fetchWithdrawals{docsify-ignore}

fetch all withdrawals made from an account

Kind: instance method of <code>deepcoin</code>
Returns: <code>Array<object></code> - a list of transaction structures

See: https://www.deepcoin.com/docs/assets/withdraw

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code of the currency transferred
since<code>int</code>Nothe earliest time in ms to fetch transfers for (default 24 hours ago)
limit<code>int</code>Nothe maximum number of transfer structures to retrieve (default 50, max 200)
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Nothe latest time in ms to fetch transfers for (default time now)
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
javascript
deepcoin.fetchWithdrawals (code[, since, limit, params])

<a name="fetchDepositAddresses" id="fetchdepositaddresses"></a>

fetchDepositAddresses{docsify-ignore}

fetch deposit addresses for multiple currencies and chain types

Kind: instance method of <code>deepcoin</code>
Returns: <code>object</code> - a list of address structures

See: https://www.deepcoin.com/docs/assets/chainlist

ParamTypeRequiredDescription
codes<code>Array<string></code>, <code>undefined</code>Yeslist of unified currency codes, default is undefined
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
deepcoin.fetchDepositAddresses (codes[, params])

<a name="fetchDepositAddress" id="fetchdepositaddress"></a>

fetchDepositAddress{docsify-ignore}

fetch the deposit address for a currency associated with this account

Kind: instance method of <code>deepcoin</code>
Returns: <code>object</code> - an address structure

See: https://www.deepcoin.com/docs/assets/chainlist

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.network<code>string</code>Nounified network code for deposit chain
javascript
deepcoin.fetchDepositAddress (code[, params])

<a name="fetchLedger" id="fetchledger"></a>

fetchLedger{docsify-ignore}

fetch the history of changes, actions done by the user or operations that altered the balance of the user

Kind: instance method of <code>deepcoin</code>
Returns: <code>Array<object></code> - a list of ledger structures

See: https://www.deepcoin.com/docs/DeepCoinAccount/getAccountBills

ParamTypeRequiredDescription
code<code>string</code>Nounified currency code
since<code>int</code>Notimestamp in ms of the earliest ledger entry
limit<code>int</code>Nomax number of ledger entries to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Notimestamp in ms of the latest ledger entry
params.type<code>string</code>No'spot' or 'swap', the market type for the ledger (default 'spot')
javascript
deepcoin.fetchLedger ([code, since, limit, params])

<a name="transfer" id="transfer"></a>

transfer{docsify-ignore}

transfer currency internally between wallets on the same account

Kind: instance method of <code>deepcoin</code>
Returns: <code>object</code> - a transfer structure

See: https://www.deepcoin.com/docs/assets/transfer

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
amount<code>float</code>Yesamount to transfer
fromAccount<code>string</code>Yesaccount to transfer from ('spot', 'inverse', 'linear', 'fund', 'rebate' or 'demo')
toAccount<code>string</code>Yesaccount to transfer to ('spot', 'inverse', 'linear', 'fund', 'rebate' or 'demo')
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.userId<code>string</code>Nouser id
javascript
deepcoin.transfer (code, amount, fromAccount, toAccount[, params])

<a name="createOrder" id="createorder"></a>

createOrder{docsify-ignore}

create a trade order

Kind: instance method of <code>deepcoin</code>
Returns: <code>object</code> - an order structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to create an order in
type<code>string</code>Yes'market' or 'limit'
side<code>string</code>Yes'buy' or 'sell'
amount<code>float</code>Yeshow much of currency you want to trade in units of base currency
price<code>float</code>Nothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.clientOrderId<code>string</code>Noa unique id for the order
params.timeInForce<code>string</code>Nonon trigger orders only 'GTC' (Good Till Cancel), 'IOC' (Immediate Or Cancel) or 'PO' (Post Only)
params.postOnly<code>bool</code>Nonon trigger orders only true to place a post only order
params.reduceOnly<code>bool</code>Nonon trigger orders only a mark to reduce the position size for margin, swap and future orders
params.triggerPrice<code>float</code>Nothe price a trigger order is triggered at
params.stopLoss.triggerPrice<code>float</code>Nothe price that a stop loss order is triggered at
params.takeProfit.triggerPrice<code>float</code>Nothe price that a take profit order is triggered at
params.positionSide<code>string</code>Noif position mode is one-way: set to 'net', if position mode is hedge-mode: set to 'long' or 'short'
params.hedged<code>bool</code>Noswap only true for hedged mode, false for one way mode
params.marginMode<code>string</code>Noswap only'cross' or 'isolated', the default is 'cash' for spot and 'cross' for swap
javascript
deepcoin.createOrder (symbol, type, side, amount[, price, params])

<a name="createMarketOrderWithCost" id="createmarketorderwithcost"></a>

createMarketOrderWithCost{docsify-ignore}

create a market order by providing the symbol, side and cost

Kind: instance method of <code>deepcoin</code>
Returns: <code>object</code> - an order structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to create an order in
side<code>string</code>Yes'buy' or 'sell'
cost<code>float</code>Yeshow much you want to trade in units of the quote currency
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
deepcoin.createMarketOrderWithCost (symbol, side, cost[, params])

<a name="createMarketBuyOrderWithCost" id="createmarketbuyorderwithcost"></a>

createMarketBuyOrderWithCost{docsify-ignore}

create a market buy order by providing the symbol and cost

Kind: instance method of <code>deepcoin</code>
Returns: <code>object</code> - an order structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to create an order in
cost<code>float</code>Yeshow much you want to trade in units of the quote currency
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
deepcoin.createMarketBuyOrderWithCost (symbol, cost[, params])

<a name="createMarketSellOrderWithCost" id="createmarketsellorderwithcost"></a>

createMarketSellOrderWithCost{docsify-ignore}

create a market sell order by providing the symbol and cost

Kind: instance method of <code>deepcoin</code>
Returns: <code>object</code> - an order structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to create an order in
cost<code>float</code>Yeshow much you want to trade in units of the quote currency
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
deepcoin.createMarketSellOrderWithCost (symbol, cost[, params])

<a name="fetchClosedOrder" id="fetchclosedorder"></a>

fetchClosedOrder{docsify-ignore}

fetches information on a closed order made by the user

Kind: instance method of <code>deepcoin</code>
Returns: <code>object</code> - an order structure

See: https://www.deepcoin.com/docs/DeepCoinTrade/finishOrderByID

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
deepcoin.fetchClosedOrder (id, symbol[, params])

<a name="fetchOpenOrder" id="fetchopenorder"></a>

fetchOpenOrder{docsify-ignore}

fetch an open order by it's id

Kind: instance method of <code>deepcoin</code>
Returns: <code>object</code> - an order structure

See: https://www.deepcoin.com/docs/DeepCoinTrade/orderByID

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified market symbol, default is undefined
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
deepcoin.fetchOpenOrder (id, symbol[, params])

<a name="fetchCanceledAndClosedOrders" id="fetchcanceledandclosedorders"></a>

fetchCanceledAndClosedOrders{docsify-ignore}

fetches information on multiple canceled and closed orders made by the user

Kind: instance method of <code>deepcoin</code>
Returns: <code>Array<Order></code> - a list of order structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Nounified market symbol of the market orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.trigger<code>bool</code>Nowhether to fetch trigger/algo orders (default false)
params.type<code>string</code>Nonon trigger orders only 'spot' or 'swap', the market type for the orders
params.state<code>string</code>Nonon trigger orders only 'canceled' or 'filled', the order state to filter by
params.OrderType<code>string</code>Notrigger orders only 'limit' or 'market'
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
javascript
deepcoin.fetchCanceledAndClosedOrders ([symbol, since, limit, params])

<a name="fetchCanceledOrders" id="fetchcanceledorders"></a>

fetchCanceledOrders{docsify-ignore}

fetches information on multiple canceled orders made by the user

Kind: instance method of <code>deepcoin</code>
Returns: <code>Array<object></code> - a list of order structures

See: https://www.deepcoin.com/docs/DeepCoinTrade/ordersHistory

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market the orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.type<code>string</code>No'spot' or 'swap', the market type for the orders
javascript
deepcoin.fetchCanceledOrders (symbol[, since, limit, params])

<a name="fetchClosedOrders" id="fetchclosedorders"></a>

fetchClosedOrders{docsify-ignore}

fetches information on multiple closed orders made by the user

Kind: instance method of <code>deepcoin</code>
Returns: <code>Array<object></code> - a list of order structures

See: https://www.deepcoin.com/docs/DeepCoinTrade/ordersHistory

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market the orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.type<code>string</code>No'spot' or 'swap', the market type for the orders
javascript
deepcoin.fetchClosedOrders (symbol[, since, limit, params])

<a name="fetchOpenOrders" id="fetchopenorders"></a>

fetchOpenOrders{docsify-ignore}

fetch all unfilled currently open orders

Kind: instance method of <code>deepcoin</code>
Returns: <code>Array<Order></code> - a list of order structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.trigger<code>bool</code>Nowhether to fetch trigger/algo orders (default false)
params.index<code>int</code>Nonon trigger orders only pagination index, default is 1
params.orderType<code>string</code>Notrigger orders only 'limit' or 'market'
javascript
deepcoin.fetchOpenOrders (symbol[, since, limit, params])

<a name="cancelOrder" id="cancelorder"></a>

cancelOrder{docsify-ignore}

cancels an open order

Kind: instance method of <code>deepcoin</code>
Returns: <code>object</code> - An order structure

See: https://www.deepcoin.com/docs/DeepCoinTrade/cancelOrder

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.trigger<code>bool</code>Nowhether the order is a trigger/algo order (default false)
javascript
deepcoin.cancelOrder (id, symbol[, params])

<a name="cancelAllOrders" id="cancelallorders"></a>

cancelAllOrders{docsify-ignore}

cancel all open orders in a market

Kind: instance method of <code>deepcoin</code>
Returns: <code>Array<object></code> - a list of order structures

See: https://www.deepcoin.com/docs/DeepCoinTrade/cancelAllOrder

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market to cancel orders in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.marginMode<code>string</code>Noswap only 'cross' or 'isolated', the default is 'cash' for spot and 'cross' for swap
params.merged<code>bool</code>Noswap only true for merged positions, false for split positions (default true)
javascript
deepcoin.cancelAllOrders (symbol[, params])

<a name="editOrder" id="editorder"></a>

editOrder{docsify-ignore}

edit a trade order

Kind: instance method of <code>deepcoin</code>
Returns: <code>object</code> - an order structure

See

ParamTypeRequiredDescription
id<code>string</code>Yescancel order id
symbol<code>string</code>Nounified symbol of the market to create an order in (not used in deepcoin editOrder)
type<code>string</code>No'market' or 'limit' (not used in deepcoin editOrder)
side<code>string</code>No'buy' or 'sell' (not used in deepcoin editOrder)
amount<code>float</code>Nohow much of currency you want to trade in units of base currency
price<code>float</code>Nothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.stopLossPrice<code>float</code>Nothe price that a stop loss order is triggered at
params.takeProfitPrice<code>float</code>Nothe price that a take profit order is triggered at
javascript
deepcoin.editOrder (id[, symbol, type, side, amount, price, params])

<a name="cancelOrders" id="cancelorders"></a>

cancelOrders{docsify-ignore}

cancel multiple orders

Kind: instance method of <code>deepcoin</code>
Returns: <code>object</code> - an list of order structures

ParamTypeRequiredDescription
ids<code>Array<string></code>Yesorder ids
symbol<code>string</code>Nounified market symbol, default is undefined
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
deepcoin.cancelOrders (ids[, symbol, params])

<a name="fetchPositionsForSymbol" id="fetchpositionsforsymbol"></a>

fetchPositionsForSymbol{docsify-ignore}

fetch all open positions for specific symbol

Kind: instance method of <code>deepcoin</code>
Returns: <code>Array<object></code> - a list of position structure

See: https://www.deepcoin.com/docs/DeepCoinAccount/accountPositions

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
deepcoin.fetchPositionsForSymbol (symbol[, params])

<a name="fetchPositions" id="fetchpositions"></a>

fetchPositions{docsify-ignore}

fetch all open positions

Kind: instance method of <code>deepcoin</code>
Returns: <code>Array<object></code> - a list of position structure

See: https://www.deepcoin.com/docs/DeepCoinAccount/accountPositions

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nolist of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
deepcoin.fetchPositions ([symbols, params])

<a name="setLeverage" id="setleverage"></a>

setLeverage{docsify-ignore}

set the level of leverage for a market

Kind: instance method of <code>deepcoin</code>
Returns: <code>object</code> - response from the exchange

See: https://www.deepcoin.com/docs/DeepCoinAccount/accountSetLeverage

ParamTypeRequiredDescription
leverage<code>float</code>Yesthe rate of leverage
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.marginMode<code>string</code>No'cross' or 'isolated' (default is cross)
params.mrgPosition<code>string</code>No'merge' or 'split', default is merge
javascript
deepcoin.setLeverage (leverage, symbol[, params])

<a name="fetchFundingRates" id="fetchfundingrates"></a>

fetchFundingRates{docsify-ignore}

fetch the funding rate for multiple markets

Kind: instance method of <code>deepcoin</code>
Returns: <code>Array<object></code> - a list of funding rate structures, indexed by market symbols

See: https://www.deepcoin.com/docs/DeepCoinTrade/currentFundRate

ParamTypeRequiredDescription
symbols<code>Array<string></code>, <code>undefined</code>Yeslist of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.subType<code>string</code>No"linear" or "inverse"
javascript
deepcoin.fetchFundingRates (symbols[, params])

<a name="fetchFundingRate" id="fetchfundingrate"></a>

fetchFundingRate{docsify-ignore}

fetch the current funding rate

Kind: instance method of <code>deepcoin</code>
Returns: <code>object</code> - a funding rate structure

See: https://www.deepcoin.com/docs/DeepCoinTrade/currentFundRate

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
deepcoin.fetchFundingRate (symbol[, params])

<a name="fetchFundingRateHistory" id="fetchfundingratehistory"></a>

fetchFundingRateHistory{docsify-ignore}

fetches historical funding rate prices

Kind: instance method of <code>deepcoin</code>
Returns: <code>Array<object></code> - a list of funding rate structures

See: https://www.deepcoin.com/docs/DeepCoinTrade/fundingRateHistory

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the funding rate history for
since<code>int</code>Notimestamp in ms of the earliest funding rate to fetch
limit<code>int</code>Nothe maximum amount of funding rate structures to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.page<code>int</code>Nopagination page number
javascript
deepcoin.fetchFundingRateHistory (symbol[, since, limit, params])

<a name="fetchMyTrades" id="fetchmytrades"></a>

fetchMyTrades{docsify-ignore}

fetch all trades made by the user

Kind: instance method of <code>deepcoin</code>
Returns: <code>Array<Trade></code> - a list of trade structures

See: https://www.deepcoin.com/docs/DeepCoinTrade/tradeFills

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch trades for
limit<code>int</code>Nothe maximum number of trades structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Notimestamp in ms of the latest trade to fetch
params.type<code>string</code>No'spot' or 'swap', the market type for the trades (default is 'spot')
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
javascript
deepcoin.fetchMyTrades (symbol[, since, limit, params])

<a name="fetchOrderTrades" id="fetchordertrades"></a>

fetchOrderTrades{docsify-ignore}

fetch all the trades made from a single order

Kind: instance method of <code>deepcoin</code>
Returns: <code>Array<object></code> - a list of trade structures

See: https://www.deepcoin.com/docs/DeepCoinTrade/tradeFills

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch trades for
limit<code>int</code>Nothe maximum number of trades to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.type<code>string</code>No'spot' or 'swap', the market type for the trades
javascript
deepcoin.fetchOrderTrades (id, symbol[, since, limit, params])

<a name="closePosition" id="closeposition"></a>

closePosition{docsify-ignore}

closes open positions for a market

Kind: instance method of <code>deepcoin</code>
Returns: <code>object</code> - an order structure

See

ParamTypeRequiredDescription
symbol<code>string</code>YesUnified CCXT market symbol
side<code>string</code>Nonot used by deepcoin
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.positionId<code>string</code>, <code>undefined</code>Nothe id of the position you would like to close
params.positionIds<code>Array<string></code>, <code>undefined</code>Nolist of position ids to close (for batch closing)
javascript
deepcoin.closePosition (symbol[, side, params])

<a name="watchTicker" id="watchticker"></a>

watchTicker{docsify-ignore}

watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market

Kind: instance method of <code>deepcoin</code>
Returns: <code>object</code> - a ticker structure

See: https://www.deepcoin.com/docs/publicWS/latestMarketData

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
deepcoin.watchTicker (symbol[, params])

<a name="unWatchTicker" id="unwatchticker"></a>

unWatchTicker{docsify-ignore}

unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market

Kind: instance method of <code>deepcoin</code>
Returns: <code>object</code> - a ticker structure

See: https://www.deepcoin.com/docs/publicWS/latestMarketData

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
deepcoin.unWatchTicker (symbol[, params])

<a name="watchTrades" id="watchtrades"></a>

watchTrades{docsify-ignore}

watches information on multiple trades made in a market

Kind: instance method of <code>deepcoin</code>
Returns: <code>Array<object></code> - a list of trade structures

See: https://www.deepcoin.com/docs/publicWS/lastTransactions

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market trades were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of trade structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
deepcoin.watchTrades (symbol[, since, limit, params])

<a name="unWatchTrades" id="unwatchtrades"></a>

unWatchTrades{docsify-ignore}

unWatches the list of most recent trades for a particular symbol

Kind: instance method of <code>deepcoin</code>
Returns: <code>Array<object></code> - a list of trade structures

See: https://www.deepcoin.com/docs/publicWS/lastTransactions

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch trades for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
deepcoin.unWatchTrades (symbol[, params])

<a name="watchOHLCV" id="watchohlcv"></a>

watchOHLCV{docsify-ignore}

watches historical candlestick data containing the open, high, low, and close price, and the volume of a market

Kind: instance method of <code>deepcoin</code>
Returns: <code>Array<Array<int>></code> - A list of candles ordered as timestamp, open, high, low, close, volume

See: https://www.deepcoin.com/docs/publicWS/KLines

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch OHLCV data for
timeframe<code>string</code>Nothe length of time each candle represents
since<code>int</code>Notimestamp in ms of the earliest candle to fetch
limit<code>int</code>Nothe maximum amount of candles to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
deepcoin.watchOHLCV (symbol[, timeframe, since, limit, params])

<a name="unWatchOHLCV" id="unwatchohlcv"></a>

unWatchOHLCV{docsify-ignore}

watches historical candlestick data containing the open, high, low, and close price, and the volume of a market

Kind: instance method of <code>deepcoin</code>
Returns: <code>Array<Array<int>></code> - A list of candles ordered as timestamp, open, high, low, close, volume

See: https://docs.backpack.exchange/#tag/Streams/Public/K-Line

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch OHLCV data for
timeframe<code>string</code>Nothe length of time each candle represents
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
deepcoin.unWatchOHLCV (symbol[, timeframe, params])

<a name="watchOrderBook" id="watchorderbook"></a>

watchOrderBook{docsify-ignore}

watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data

Kind: instance method of <code>deepcoin</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols

See: https://www.deepcoin.com/docs/publicWS/25LevelIncrementalMarketData

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the order book for
limit<code>int</code>Nothe maximum amount of order book entries to return.
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
deepcoin.watchOrderBook (symbol[, limit, params])

<a name="unWatchOrderBook" id="unwatchorderbook"></a>

unWatchOrderBook{docsify-ignore}

unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data

Kind: instance method of <code>deepcoin</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols

See: https://www.deepcoin.com/docs/publicWS/25LevelIncrementalMarketData

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified array of symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
deepcoin.unWatchOrderBook (symbol[, params])

<a name="watchMyTrades" id="watchmytrades"></a>

watchMyTrades{docsify-ignore}

watches information on multiple trades made by the user

Kind: instance method of <code>deepcoin</code>
Returns: <code>Array<object></code> - a list of order structures

See: https://www.deepcoin.com/docs/privateWS/Trade

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
deepcoin.watchMyTrades (symbol[, since, limit, params])

<a name="watchOrders" id="watchorders"></a>

watchOrders{docsify-ignore}

watches information on multiple orders made by the user

Kind: instance method of <code>deepcoin</code>
Returns: <code>Array<object></code> - a list of order structures

See: https://www.deepcoin.com/docs/privateWS/order

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
deepcoin.watchOrders (symbol[, since, limit, params])

<a name="watchPositions" id="watchpositions"></a>

watchPositions{docsify-ignore}

watch all open positions

Kind: instance method of <code>deepcoin</code>
Returns: <code>Array<object></code> - a list of position structure

See: https://www.deepcoin.com/docs/privateWS/Position

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nolist of unified market symbols to watch positions for
since<code>int</code>Nothe earliest time in ms to fetch positions for
limit<code>int</code>Nothe maximum number of positions to retrieve
params<code>object</code>Yesextra parameters specific to the exchange API endpoint
javascript
deepcoin.watchPositions ([symbols, since, limit, params])