wiki/exchanges/deepcoin.md
<a name="deepcoin" id="deepcoin"></a>
Kind: global class
Extends: <code>Exchange</code>
<a name="fetchMarkets" id="fetchmarkets"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
deepcoin.fetchMarkets ([params])
<a name="fetchOrderBook" id="fetchorderbook"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the order book for |
| limit | <code>int</code> | No | the maximum amount of order book entries to return |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
deepcoin.fetchOrderBook (symbol[, limit, params])
<a name="fetchOHLCV" id="fetchohlcv"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | <code>string</code> | Yes | the length of time each candle represents |
| since | <code>int</code> | No | timestamp in ms of the earliest candle to fetch |
| limit | <code>int</code> | No | the maximum amount of candles to fetch |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.until | <code>int</code> | No | timestamp 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> | No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters |
deepcoin.fetchOHLCV (symbol, timeframe[, since, limit, params])
<a name="fetchTickers" id="fetchtickers"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | No | unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
deepcoin.fetchTickers ([symbols, params])
<a name="fetchTrades" id="fetchtrades"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch trades for |
| since | <code>int</code> | No | timestamp in ms of the earliest trade to fetch |
| limit | <code>int</code> | No | the maximum amount of trades to fetch (default 100, max 500) |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
deepcoin.fetchTrades (symbol[, since, limit, params])
<a name="fetchBalance" id="fetchbalance"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.type | <code>string</code> | No | "spot" or "swap", the market type for the balance |
deepcoin.fetchBalance ([params])
<a name="fetchDeposits" id="fetchdeposits"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | Yes | unified currency code |
| since | <code>int</code> | No | the earliest time in ms to fetch deposits for |
| limit | <code>int</code> | No | the maximum number of deposits structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.until | <code>int</code> | No | the latest time in ms to fetch entries for |
| params.paginate | <code>boolean</code> | No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters |
deepcoin.fetchDeposits (code[, since, limit, params])
<a name="fetchWithdrawals" id="fetchwithdrawals"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | Yes | unified currency code of the currency transferred |
| since | <code>int</code> | No | the earliest time in ms to fetch transfers for (default 24 hours ago) |
| limit | <code>int</code> | No | the maximum number of transfer structures to retrieve (default 50, max 200) |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.until | <code>int</code> | No | the latest time in ms to fetch transfers for (default time now) |
| params.paginate | <code>boolean</code> | No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters |
deepcoin.fetchWithdrawals (code[, since, limit, params])
<a name="fetchDepositAddresses" id="fetchdepositaddresses"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| codes | <code>Array<string></code>, <code>undefined</code> | Yes | list of unified currency codes, default is undefined |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
deepcoin.fetchDepositAddresses (codes[, params])
<a name="fetchDepositAddress" id="fetchdepositaddress"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | Yes | unified currency code |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.network | <code>string</code> | No | unified network code for deposit chain |
deepcoin.fetchDepositAddress (code[, params])
<a name="fetchLedger" id="fetchledger"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | No | unified currency code |
| since | <code>int</code> | No | timestamp in ms of the earliest ledger entry |
| limit | <code>int</code> | No | max number of ledger entries to return |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.until | <code>int</code> | No | timestamp in ms of the latest ledger entry |
| params.type | <code>string</code> | No | 'spot' or 'swap', the market type for the ledger (default 'spot') |
deepcoin.fetchLedger ([code, since, limit, params])
<a name="transfer" id="transfer"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | Yes | unified currency code |
| amount | <code>float</code> | Yes | amount to transfer |
| fromAccount | <code>string</code> | Yes | account to transfer from ('spot', 'inverse', 'linear', 'fund', 'rebate' or 'demo') |
| toAccount | <code>string</code> | Yes | account to transfer to ('spot', 'inverse', 'linear', 'fund', 'rebate' or 'demo') |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.userId | <code>string</code> | No | user id |
deepcoin.transfer (code, amount, fromAccount, toAccount[, params])
<a name="createOrder" id="createorder"></a>
create a trade order
Kind: instance method of <code>deepcoin</code>
Returns: <code>object</code> - an order structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified 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> | Yes | how much of currency you want to trade in units of base currency |
| price | <code>float</code> | No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.clientOrderId | <code>string</code> | No | a unique id for the order |
| params.timeInForce | <code>string</code> | No | non trigger orders only 'GTC' (Good Till Cancel), 'IOC' (Immediate Or Cancel) or 'PO' (Post Only) |
| params.postOnly | <code>bool</code> | No | non trigger orders only true to place a post only order |
| params.reduceOnly | <code>bool</code> | No | non trigger orders only a mark to reduce the position size for margin, swap and future orders |
| params.triggerPrice | <code>float</code> | No | the price a trigger order is triggered at |
| params.stopLoss.triggerPrice | <code>float</code> | No | the price that a stop loss order is triggered at |
| params.takeProfit.triggerPrice | <code>float</code> | No | the price that a take profit order is triggered at |
| params.positionSide | <code>string</code> | No | if position mode is one-way: set to 'net', if position mode is hedge-mode: set to 'long' or 'short' |
| params.hedged | <code>bool</code> | No | swap only true for hedged mode, false for one way mode |
| params.marginMode | <code>string</code> | No | swap only'cross' or 'isolated', the default is 'cash' for spot and 'cross' for swap |
deepcoin.createOrder (symbol, type, side, amount[, price, params])
<a name="createMarketOrderWithCost" id="createmarketorderwithcost"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to create an order in |
| side | <code>string</code> | Yes | 'buy' or 'sell' |
| cost | <code>float</code> | Yes | how much you want to trade in units of the quote currency |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
deepcoin.createMarketOrderWithCost (symbol, side, cost[, params])
<a name="createMarketBuyOrderWithCost" id="createmarketbuyorderwithcost"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to create an order in |
| cost | <code>float</code> | Yes | how much you want to trade in units of the quote currency |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
deepcoin.createMarketBuyOrderWithCost (symbol, cost[, params])
<a name="createMarketSellOrderWithCost" id="createmarketsellorderwithcost"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to create an order in |
| cost | <code>float</code> | Yes | how much you want to trade in units of the quote currency |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
deepcoin.createMarketSellOrderWithCost (symbol, cost[, params])
<a name="fetchClosedOrder" id="fetchclosedorder"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| id | <code>string</code> | Yes | order id |
| symbol | <code>string</code> | Yes | unified symbol of the market the order was made in |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
deepcoin.fetchClosedOrder (id, symbol[, params])
<a name="fetchOpenOrder" id="fetchopenorder"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| id | <code>string</code> | Yes | order id |
| symbol | <code>string</code> | Yes | unified market symbol, default is undefined |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
deepcoin.fetchOpenOrder (id, symbol[, params])
<a name="fetchCanceledAndClosedOrders" id="fetchcanceledandclosedorders"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | No | unified market symbol of the market orders were made in |
| since | <code>int</code> | No | the earliest time in ms to fetch orders for |
| limit | <code>int</code> | No | the maximum number of order structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.trigger | <code>bool</code> | No | whether to fetch trigger/algo orders (default false) |
| params.type | <code>string</code> | No | non trigger orders only 'spot' or 'swap', the market type for the orders |
| params.state | <code>string</code> | No | non trigger orders only 'canceled' or 'filled', the order state to filter by |
| params.OrderType | <code>string</code> | No | trigger orders only 'limit' or 'market' |
| params.paginate | <code>boolean</code> | No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters |
deepcoin.fetchCanceledAndClosedOrders ([symbol, since, limit, params])
<a name="fetchCanceledOrders" id="fetchcanceledorders"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol of the market the orders were made in |
| since | <code>int</code> | No | the earliest time in ms to fetch orders for |
| limit | <code>int</code> | No | the maximum number of order structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.type | <code>string</code> | No | 'spot' or 'swap', the market type for the orders |
deepcoin.fetchCanceledOrders (symbol[, since, limit, params])
<a name="fetchClosedOrders" id="fetchclosedorders"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol of the market the orders were made in |
| since | <code>int</code> | No | the earliest time in ms to fetch orders for |
| limit | <code>int</code> | No | the maximum number of order structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.type | <code>string</code> | No | 'spot' or 'swap', the market type for the orders |
deepcoin.fetchClosedOrders (symbol[, since, limit, params])
<a name="fetchOpenOrders" id="fetchopenorders"></a>
fetch all unfilled currently open orders
Kind: instance method of <code>deepcoin</code>
Returns: <code>Array<Order></code> - a list of order structures
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol of the market orders were made in |
| since | <code>int</code> | No | the earliest time in ms to fetch orders for |
| limit | <code>int</code> | No | the maximum number of order structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.trigger | <code>bool</code> | No | whether to fetch trigger/algo orders (default false) |
| params.index | <code>int</code> | No | non trigger orders only pagination index, default is 1 |
| params.orderType | <code>string</code> | No | trigger orders only 'limit' or 'market' |
deepcoin.fetchOpenOrders (symbol[, since, limit, params])
<a name="cancelOrder" id="cancelorder"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| id | <code>string</code> | Yes | order id |
| symbol | <code>string</code> | Yes | unified symbol of the market the order was made in |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.trigger | <code>bool</code> | No | whether the order is a trigger/algo order (default false) |
deepcoin.cancelOrder (id, symbol[, params])
<a name="cancelAllOrders" id="cancelallorders"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol of the market to cancel orders in |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.marginMode | <code>string</code> | No | swap only 'cross' or 'isolated', the default is 'cash' for spot and 'cross' for swap |
| params.merged | <code>bool</code> | No | swap only true for merged positions, false for split positions (default true) |
deepcoin.cancelAllOrders (symbol[, params])
<a name="editOrder" id="editorder"></a>
edit a trade order
Kind: instance method of <code>deepcoin</code>
Returns: <code>object</code> - an order structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| id | <code>string</code> | Yes | cancel order id |
| symbol | <code>string</code> | No | unified 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> | No | how much of currency you want to trade in units of base currency |
| price | <code>float</code> | No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.stopLossPrice | <code>float</code> | No | the price that a stop loss order is triggered at |
| params.takeProfitPrice | <code>float</code> | No | the price that a take profit order is triggered at |
deepcoin.editOrder (id[, symbol, type, side, amount, price, params])
<a name="cancelOrders" id="cancelorders"></a>
cancel multiple orders
Kind: instance method of <code>deepcoin</code>
Returns: <code>object</code> - an list of order structures
| Param | Type | Required | Description |
|---|---|---|---|
| ids | <code>Array<string></code> | Yes | order ids |
| symbol | <code>string</code> | No | unified market symbol, default is undefined |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
deepcoin.cancelOrders (ids[, symbol, params])
<a name="fetchPositionsForSymbol" id="fetchpositionsforsymbol"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
deepcoin.fetchPositionsForSymbol (symbol[, params])
<a name="fetchPositions" id="fetchpositions"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | No | list of unified market symbols |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
deepcoin.fetchPositions ([symbols, params])
<a name="setLeverage" id="setleverage"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| leverage | <code>float</code> | Yes | the rate of leverage |
| symbol | <code>string</code> | Yes | unified market symbol |
| params | <code>object</code> | No | extra 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 |
deepcoin.setLeverage (leverage, symbol[, params])
<a name="fetchFundingRates" id="fetchfundingrates"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code>, <code>undefined</code> | Yes | list of unified market symbols |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.subType | <code>string</code> | No | "linear" or "inverse" |
deepcoin.fetchFundingRates (symbols[, params])
<a name="fetchFundingRate" id="fetchfundingrate"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
deepcoin.fetchFundingRate (symbol[, params])
<a name="fetchFundingRateHistory" id="fetchfundingratehistory"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the funding rate history for |
| since | <code>int</code> | No | timestamp in ms of the earliest funding rate to fetch |
| limit | <code>int</code> | No | the maximum amount of funding rate structures to fetch |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.page | <code>int</code> | No | pagination page number |
deepcoin.fetchFundingRateHistory (symbol[, since, limit, params])
<a name="fetchMyTrades" id="fetchmytrades"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol |
| since | <code>int</code> | No | the earliest time in ms to fetch trades for |
| limit | <code>int</code> | No | the maximum number of trades structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.until | <code>int</code> | No | timestamp 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> | No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters |
deepcoin.fetchMyTrades (symbol[, since, limit, params])
<a name="fetchOrderTrades" id="fetchordertrades"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| id | <code>string</code> | Yes | order id |
| symbol | <code>string</code> | Yes | unified market symbol |
| since | <code>int</code> | No | the earliest time in ms to fetch trades for |
| limit | <code>int</code> | No | the maximum number of trades to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.type | <code>string</code> | No | 'spot' or 'swap', the market type for the trades |
deepcoin.fetchOrderTrades (id, symbol[, since, limit, params])
<a name="closePosition" id="closeposition"></a>
closes open positions for a market
Kind: instance method of <code>deepcoin</code>
Returns: <code>object</code> - an order structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | Unified CCXT market symbol |
| side | <code>string</code> | No | not used by deepcoin |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.positionId | <code>string</code>, <code>undefined</code> | No | the id of the position you would like to close |
| params.positionIds | <code>Array<string></code>, <code>undefined</code> | No | list of position ids to close (for batch closing) |
deepcoin.closePosition (symbol[, side, params])
<a name="watchTicker" id="watchticker"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the ticker for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
deepcoin.watchTicker (symbol[, params])
<a name="unWatchTicker" id="unwatchticker"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the ticker for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
deepcoin.unWatchTicker (symbol[, params])
<a name="watchTrades" id="watchtrades"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol of the market trades were made in |
| since | <code>int</code> | No | the earliest time in ms to fetch orders for |
| limit | <code>int</code> | No | the maximum number of trade structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
deepcoin.watchTrades (symbol[, since, limit, params])
<a name="unWatchTrades" id="unwatchtrades"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch trades for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
deepcoin.unWatchTrades (symbol[, params])
<a name="watchOHLCV" id="watchohlcv"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | <code>string</code> | No | the length of time each candle represents |
| since | <code>int</code> | No | timestamp in ms of the earliest candle to fetch |
| limit | <code>int</code> | No | the maximum amount of candles to fetch |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
deepcoin.watchOHLCV (symbol[, timeframe, since, limit, params])
<a name="unWatchOHLCV" id="unwatchohlcv"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | <code>string</code> | No | the length of time each candle represents |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
deepcoin.unWatchOHLCV (symbol[, timeframe, params])
<a name="watchOrderBook" id="watchorderbook"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the order book for |
| limit | <code>int</code> | No | the maximum amount of order book entries to return. |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
deepcoin.watchOrderBook (symbol[, limit, params])
<a name="unWatchOrderBook" id="unwatchorderbook"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified array of symbols |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
deepcoin.unWatchOrderBook (symbol[, params])
<a name="watchMyTrades" id="watchmytrades"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol of the market orders were made in |
| since | <code>int</code> | No | the earliest time in ms to fetch orders for |
| limit | <code>int</code> | No | the maximum number of order structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
deepcoin.watchMyTrades (symbol[, since, limit, params])
<a name="watchOrders" id="watchorders"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol of the market orders were made in |
| since | <code>int</code> | No | the earliest time in ms to fetch orders for |
| limit | <code>int</code> | No | the maximum number of order structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
deepcoin.watchOrders (symbol[, since, limit, params])
<a name="watchPositions" id="watchpositions"></a>
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | No | list of unified market symbols to watch positions for |
| since | <code>int</code> | No | the earliest time in ms to fetch positions for |
| limit | <code>int</code> | No | the maximum number of positions to retrieve |
| params | <code>object</code> | Yes | extra parameters specific to the exchange API endpoint |
deepcoin.watchPositions ([symbols, since, limit, params])