55 KiB
cryptocom{docsify-ignore}
Kind: global class
Extends: Exchange
- fetchCurrencies
- fetchMarkets
- fetchTickers
- fetchTicker
- fetchOrders
- fetchTrades
- fetchOHLCV
- fetchOrderBook
- fetchBalance
- fetchOrder
- createOrder
- createOrders
- editOrder
- cancelAllOrders
- cancelOrder
- cancelOrders
- cancelOrdersForSymbols
- fetchOpenOrders
- fetchMyTrades
- withdraw
- fetchDepositAddressesByNetwork
- fetchDepositAddress
- fetchDeposits
- fetchWithdrawals
- fetchDepositWithdrawFees
- fetchLedger
- fetchAccounts
- fetchSettlementHistory
- fetchFundingRate
- fetchFundingRateHistory
- fetchPosition
- fetchPositions
- closePositions
- fetchTradingFee
- fetchTradingFees
- watchOrderBook
- unWatchOrderBook
- watchOrderBookForSymbols
- unWatchOrderBookForSymbols
- watchTrades
- unWatchTrades
- watchTradesForSymbols
- unWatchTradesForSymbols
- watchMyTrades
- watchTicker
- unWatchTicker
- watchTickers
- unWatchTickers
- watchBidsAsks
- watchOHLCV
- unWatchOHLCV
- watchOrders
- watchPositions
- watchBalance
- createOrderWs
- editOrderWs
- cancelOrderWs
- cancelAllOrdersWs
fetchCurrencies{docsify-ignore}
fetches all available currencies on an exchange
Kind: instance method of cryptocom
Returns: object - an associative dictionary of currencies
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-currency-networks
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.fetchCurrencies ([params])
fetchMarkets{docsify-ignore}
retrieves data on all markets for cryptocom
Kind: instance method of cryptocom
Returns: Array<object> - an array of objects representing market data
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#public-get-instruments
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.fetchMarkets ([params])
fetchTickers{docsify-ignore}
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
Kind: instance method of cryptocom
Returns: object - a dictionary of ticker structures
See
- https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#public-get-tickers
- https://exchange-docs.crypto.com/derivatives/index.html#public-get-tickers
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string>, undefined |
Yes | unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.fetchTickers (symbols[, params])
fetchTicker{docsify-ignore}
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
Kind: instance method of cryptocom
Returns: object - a ticker structure
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#public-get-tickers
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the ticker for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.fetchTicker (symbol[, params])
fetchOrders{docsify-ignore}
fetches information on multiple orders made by the user
Kind: instance method of cryptocom
Returns: Array<Order> - a list of order structures
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-order-history
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the market the orders were made in |
| since | int |
No | the earliest time in ms to fetch orders for, max date range is one day |
| limit | int |
No | the maximum number of order structures to retrieve, default 100 max 100 |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.until | int |
No | timestamp in ms for the ending date filter, default is the current time |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters |
cryptocom.fetchOrders (symbol[, since, limit, params])
fetchTrades{docsify-ignore}
get a list of the most recent trades for a particular symbol
Kind: instance method of cryptocom
Returns: Array<Trade> - a list of trade structures
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#public-get-trades
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch trades for |
| since | int |
No | timestamp in ms of the earliest trade to fetch, maximum date range is one day |
| limit | int |
No | the maximum number of trades to fetch |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.until | int |
No | timestamp in ms for the ending date filter, default is the current time |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters |
cryptocom.fetchTrades (symbol[, since, limit, params])
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 cryptocom
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#public-get-candlestick
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | string |
Yes | the length of time each candle represents |
| since | int |
No | timestamp in ms of the earliest candle to fetch |
| limit | int |
No | the maximum amount of candles to fetch |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.until | int |
No | timestamp in ms for the ending date filter, default is the current time |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters |
cryptocom.fetchOHLCV (symbol, timeframe[, since, limit, params])
fetchOrderBook{docsify-ignore}
fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of cryptocom
Returns: object - A dictionary of order book structures indexed by market symbols
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#public-get-book
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the order book for |
| limit | int |
No | the number of order book entries to return, max 50 |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.fetchOrderBook (symbol[, limit, params])
fetchBalance{docsify-ignore}
query for balance and get the amount of funds available for trading or funds locked in orders
Kind: instance method of cryptocom
Returns: object - a balance structure
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-user-balance
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.fetchBalance ([params])
fetchOrder{docsify-ignore}
fetches information on an order made by the user
Kind: instance method of cryptocom
Returns: object - An order structure
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-order-detail
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | order id |
| symbol | string |
Yes | unified symbol of the market the order was made in |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.fetchOrder (id, symbol[, params])
createOrder{docsify-ignore}
create a trade order
Kind: instance method of cryptocom
Returns: object - an order structure
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-create-order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to create an order in |
| type | string |
Yes | 'market', 'limit', 'stop_loss', 'stop_limit', 'take_profit', 'take_profit_limit' |
| side | string |
Yes | 'buy' or 'sell' |
| amount | float |
Yes | how much you want to trade in units of base currency |
| price | float |
No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.timeInForce | string |
No | 'GTC', 'IOC', 'FOK' or 'PO' |
| params.ref_price_type | string |
No | 'MARK_PRICE', 'INDEX_PRICE', 'LAST_PRICE' which trigger price type to use, default is MARK_PRICE |
| params.triggerPrice | float |
No | price to trigger a trigger order |
| params.stopLossPrice | float |
No | price to trigger a stop-loss trigger order |
| params.takeProfitPrice | float |
No | price to trigger a take-profit trigger order |
cryptocom.createOrder (symbol, type, side, amount[, price, params])
createOrders{docsify-ignore}
create a list of trade orders
Kind: instance method of cryptocom
Returns: object - an order structure
See
- https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-create-order-list-list
- https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-create-order-list-oco
| Param | Type | Required | Description |
|---|---|---|---|
| orders | Array |
Yes | list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.createOrders (orders[, params])
editOrder{docsify-ignore}
edit a trade order
Kind: instance method of cryptocom
Returns: object - an order structure
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-amend-order
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | order id |
| symbol | string |
Yes | unified market symbol of the order to edit |
| type | string |
No | not used by cryptocom editOrder |
| side | string |
No | not used by cryptocom editOrder |
| amount | float |
Yes | (mandatory) how much of the currency you want to trade in units of the base currency |
| price | float |
Yes | (mandatory) the price for the order, in units of the quote currency, ignored in market orders |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.clientOrderId | string |
No | the original client order id of the order to edit, required if id is not provided |
cryptocom.editOrder (id, symbol[, type, side, amount, price, params])
cancelAllOrders{docsify-ignore}
cancel all open orders
Kind: instance method of cryptocom
Returns: object - Returns exchange raw messagehttps://docs.ccxt.com/#/?id=order-structure
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-cancel-all-orders
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the orders to cancel |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.cancelAllOrders (symbol[, params])
cancelOrder{docsify-ignore}
cancels an open order
Kind: instance method of cryptocom
Returns: object - An order structure
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-cancel-order
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | the order id of the order to cancel |
| symbol | string |
No | unified symbol of the market the order was made in |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.cancelOrder (id[, symbol, params])
cancelOrders{docsify-ignore}
cancel multiple orders
Kind: instance method of cryptocom
Returns: object - an list of order structures
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-cancel-order-list-list
| Param | Type | Required | Description |
|---|---|---|---|
| ids | Array<string> |
Yes | order ids |
| symbol | string |
Yes | unified market symbol |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.cancelOrders (ids, symbol[, params])
cancelOrdersForSymbols{docsify-ignore}
cancel multiple orders for multiple symbols
Kind: instance method of cryptocom
Returns: object - an list of order structures
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-cancel-order-list-list
| Param | Type | Required | Description |
|---|---|---|---|
| orders | Array<CancellationRequest> |
Yes | each order should contain the parameters required by cancelOrder namely id and symbol, example [{"id": "a", "symbol": "BTC/USDT"}, {"id": "b", "symbol": "ETH/USDT"}] |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.cancelOrdersForSymbols (orders[, params])
fetchOpenOrders{docsify-ignore}
fetch all unfilled currently open orders
Kind: instance method of cryptocom
Returns: Array<Order> - a list of order structures
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-open-orders
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol |
| since | int |
No | the earliest time in ms to fetch open orders for |
| limit | int |
No | the maximum number of open order structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.fetchOpenOrders (symbol[, since, limit, params])
fetchMyTrades{docsify-ignore}
fetch all trades made by the user
Kind: instance method of cryptocom
Returns: Array<Trade> - a list of trade structures
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-trades
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol |
| since | int |
No | the earliest time in ms to fetch trades for, maximum date range is one day |
| limit | int |
No | the maximum number of trade structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.until | int |
No | timestamp in ms for the ending date filter, default is the current time |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters |
cryptocom.fetchMyTrades (symbol[, since, limit, params])
withdraw{docsify-ignore}
make a withdrawal
Kind: instance method of cryptocom
Returns: object - a transaction structure
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-create-withdrawal
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code |
| amount | float |
Yes | the amount to withdraw |
| address | string |
Yes | the address to withdraw to |
| tag | string |
Yes | |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.withdraw (code, amount, address, tag[, params])
fetchDepositAddressesByNetwork{docsify-ignore}
fetch a dictionary of addresses for a currency, indexed by network
Kind: instance method of cryptocom
Returns: object - a dictionary of address structures indexed by the network
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-deposit-address
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code of the currency for the deposit address |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.fetchDepositAddressesByNetwork (code[, params])
fetchDepositAddress{docsify-ignore}
fetch the deposit address for a currency associated with this account
Kind: instance method of cryptocom
Returns: object - an address structure
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-deposit-address
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.fetchDepositAddress (code[, params])
fetchDeposits{docsify-ignore}
fetch all deposits made to an account
Kind: instance method of cryptocom
Returns: Array<object> - a list of transaction structures
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-deposit-history
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code |
| since | int |
No | the earliest time in ms to fetch deposits for |
| limit | int |
No | the maximum number of deposits structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.until | int |
No | timestamp in ms for the ending date filter, default is the current time |
cryptocom.fetchDeposits (code[, since, limit, params])
fetchWithdrawals{docsify-ignore}
fetch all withdrawals made from an account
Kind: instance method of cryptocom
Returns: Array<object> - a list of transaction structures
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-withdrawal-history
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code |
| since | int |
No | the earliest time in ms to fetch withdrawals for |
| limit | int |
No | the maximum number of withdrawals structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.until | int |
No | timestamp in ms for the ending date filter, default is the current time |
cryptocom.fetchWithdrawals (code[, since, limit, params])
fetchDepositWithdrawFees{docsify-ignore}
fetch deposit and withdraw fees
Kind: instance method of cryptocom
Returns: object - a list of fee structures
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-currency-networks
| Param | Type | Required | Description |
|---|---|---|---|
| codes | Array<string>, undefined |
Yes | list of unified currency codes |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.fetchDepositWithdrawFees (codes[, params])
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 cryptocom
Returns: object - a ledger structure
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-transactions
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
No | unified currency code |
| since | int |
No | timestamp in ms of the earliest ledger entry |
| limit | int |
No | max number of ledger entries to return |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.until | int |
No | timestamp in ms for the ending date filter, default is the current time |
cryptocom.fetchLedger ([code, since, limit, params])
fetchAccounts{docsify-ignore}
fetch all the accounts associated with a profile
Kind: instance method of cryptocom
Returns: object - a dictionary of account structures indexed by the account type
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-accounts
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.fetchAccounts ([params])
fetchSettlementHistory{docsify-ignore}
fetches historical settlement records
Kind: instance method of cryptocom
Returns: Array<object> - a list of settlement history objects
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#public-get-expired-settlement-price
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the settlement history |
| since | int |
No | timestamp in ms |
| limit | int |
No | number of records |
| params | object |
No | exchange specific params |
| params.type | int |
No | 'future', 'option' |
cryptocom.fetchSettlementHistory (symbol[, since, limit, params])
fetchFundingRate{docsify-ignore}
fetches historical funding rates
Kind: instance method of cryptocom
Returns: Array<object> - a list of funding rate structures
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#public-get-valuations
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the funding rate history for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.fetchFundingRate (symbol[, params])
fetchFundingRateHistory{docsify-ignore}
fetches historical funding rates
Kind: instance method of cryptocom
Returns: Array<object> - a list of funding rate structures
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#public-get-valuations
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the funding rate history for |
| since | int |
No | timestamp in ms of the earliest funding rate to fetch |
| limit | int |
No | the maximum amount of [funding rate structures] to fetch |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.until | int |
No | timestamp in ms for the ending date filter, default is the current time |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters |
cryptocom.fetchFundingRateHistory (symbol[, since, limit, params])
fetchPosition{docsify-ignore}
fetch data on a single open contract trade position
Kind: instance method of cryptocom
Returns: object - a position structure
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-positions
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the market the position is held in |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.fetchPosition (symbol[, params])
fetchPositions{docsify-ignore}
fetch all open positions
Kind: instance method of cryptocom
Returns: Array<object> - a list of position structure
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-positions
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string>, undefined |
Yes | list of unified market symbols |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.fetchPositions (symbols[, params])
closePositions{docsify-ignore}
closes open positions for a market
Kind: instance method of cryptocom
Returns: Array<object> - A list of position structures
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-close-position
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | Unified CCXT market symbol |
| side | string |
No | not used by cryptocom.closePositions |
| params | object |
No | extra parameters specific to the okx api endpoint EXCHANGE SPECIFIC PARAMETERS |
| params.type | string |
No | LIMIT or MARKET |
| params.price | number |
No | for limit orders only |
cryptocom.closePositions (symbol[, side, params])
fetchTradingFee{docsify-ignore}
fetch the trading fees for a market
Kind: instance method of cryptocom
Returns: object - a fee structure
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-instrument-fee-rate
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.fetchTradingFee (symbol[, params])
fetchTradingFees{docsify-ignore}
fetch the trading fees for multiple markets
Kind: instance method of cryptocom
Returns: object - a dictionary of fee structures indexed by market symbols
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-fee-rate
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.fetchTradingFees ([params])
watchOrderBook{docsify-ignore}
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of cryptocom
Returns: object - A dictionary of order book structures indexed by market symbols
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#book-instrument_name
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the order book for |
| limit | int |
No | the maximum amount of order book entries to return |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.bookSubscriptionType | string |
No | The subscription type. Allowed values: SNAPSHOT full snapshot. This is the default if not specified. SNAPSHOT_AND_UPDATE delta updates |
| params.bookUpdateFrequency | int |
No | Book update interval in ms. Allowed values: 100 for snapshot subscription 10 for delta subscription |
cryptocom.watchOrderBook (symbol[, limit, params])
unWatchOrderBook{docsify-ignore}
unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of cryptocom
Returns: object - A dictionary of order book structures indexed by market symbols
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#book-instrument_name
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the order book for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.bookSubscriptionType | string |
No | The subscription type. Allowed values: SNAPSHOT full snapshot. This is the default if not specified. SNAPSHOT_AND_UPDATE delta updates |
| params.bookUpdateFrequency | int |
No | Book update interval in ms. Allowed values: 100 for snapshot subscription 10 for delta subscription |
cryptocom.unWatchOrderBook (symbol[, params])
watchOrderBookForSymbols{docsify-ignore}
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of cryptocom
Returns: object - A dictionary of order book structures indexed by market symbols
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#book-instrument_name
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
Yes | unified array of symbols |
| limit | int |
No | the maximum amount of order book entries to return |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.bookSubscriptionType | string |
No | The subscription type. Allowed values: SNAPSHOT full snapshot. This is the default if not specified. SNAPSHOT_AND_UPDATE delta updates |
| params.bookUpdateFrequency | int |
No | Book update interval in ms. Allowed values: 100 for snapshot subscription 10 for delta subscription |
cryptocom.watchOrderBookForSymbols (symbols[, limit, params])
unWatchOrderBookForSymbols{docsify-ignore}
unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of cryptocom
Returns: object - A dictionary of order book structures indexed by market symbols
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#book-instrument_name
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
Yes | unified array of symbols |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.limit | int |
No | orderbook limit, default is 50 |
| params.bookSubscriptionType | string |
No | The subscription type. Allowed values: SNAPSHOT full snapshot. This is the default if not specified. SNAPSHOT_AND_UPDATE delta updates |
| params.bookUpdateFrequency | int |
No | Book update interval in ms. Allowed values: 100 for snapshot subscription 10 for delta subscription |
cryptocom.unWatchOrderBookForSymbols (symbols[, params])
watchTrades{docsify-ignore}
get the list of most recent trades for a particular symbol
Kind: instance method of cryptocom
Returns: Array<object> - a list of trade structures
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#trade-instrument_name
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch trades for |
| since | int |
No | timestamp in ms of the earliest trade to fetch |
| limit | int |
No | the maximum amount of trades to fetch |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.watchTrades (symbol[, since, limit, params])
unWatchTrades{docsify-ignore}
get the list of most recent trades for a particular symbol
Kind: instance method of cryptocom
Returns: Array<object> - a list of trade structures
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#trade-instrument_name
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch trades for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.unWatchTrades (symbol[, params])
watchTradesForSymbols{docsify-ignore}
get the list of most recent trades for a particular symbol
Kind: instance method of cryptocom
Returns: Array<object> - a list of trade structures
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#trade-instrument_name
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
Yes | unified symbol of the market to fetch trades for |
| since | int |
No | timestamp in ms of the earliest trade to fetch |
| limit | int |
No | the maximum amount of trades to fetch |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.watchTradesForSymbols (symbols[, since, limit, params])
unWatchTradesForSymbols{docsify-ignore}
get the list of most recent trades for a particular symbol
Kind: instance method of cryptocom
Returns: Array<object> - a list of trade structures
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#trade-instrument_name
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
No | list of unified market symbols to unwatch trades for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.unWatchTradesForSymbols ([symbols, params])
watchMyTrades{docsify-ignore}
watches information on multiple trades made by the user
Kind: instance method of cryptocom
Returns: Array<object> - a list of trade structures
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#user-trade-instrument_name
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the market trades were made in |
| since | int |
No | the earliest time in ms to fetch trades for |
| limit | int |
No | the maximum number of trade structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.watchMyTrades (symbol[, since, limit, params])
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 cryptocom
Returns: object - a ticker structure
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#ticker-instrument_name
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the ticker for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.watchTicker (symbol[, params])
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 cryptocom
Returns: object - a ticker structure
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#ticker-instrument_name
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the ticker for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.unWatchTicker (symbol[, params])
watchTickers{docsify-ignore}
watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
Kind: instance method of cryptocom
Returns: object - a ticker structure
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#ticker-instrument_name
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
Yes | unified symbol of the market to fetch the ticker for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.watchTickers (symbols[, params])
unWatchTickers{docsify-ignore}
unWatches a price ticker
Kind: instance method of cryptocom
Returns: object - a ticker structure
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#ticker-instrument_name
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
Yes | unified symbol of the market to fetch the ticker for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.unWatchTickers (symbols[, params])
watchBidsAsks{docsify-ignore}
watches best bid & ask for symbols
Kind: instance method of cryptocom
Returns: object - a ticker structure
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#ticker-instrument_name
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
Yes | unified symbol of the market to fetch the ticker for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.watchBidsAsks (symbols[, params])
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 cryptocom
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | string |
Yes | the length of time each candle represents |
| since | int |
No | timestamp in ms of the earliest candle to fetch |
| limit | int |
No | the maximum amount of candles to fetch |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.watchOHLCV (symbol, timeframe[, since, limit, params])
unWatchOHLCV{docsify-ignore}
unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of cryptocom
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | string |
Yes | the length of time each candle represents |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.unWatchOHLCV (symbol, timeframe[, params])
watchOrders{docsify-ignore}
watches information on multiple orders made by the user
Kind: instance method of cryptocom
Returns: Array<object> - a list of order structures
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#user-order-instrument_name
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the market orders were made in |
| since | int |
No | the earliest time in ms to fetch orders for |
| limit | int |
No | the maximum number of order structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.watchOrders (symbol[, since, limit, params])
watchPositions{docsify-ignore}
watch all open positions
Kind: instance method of cryptocom
Returns: Array<object> - a list of position structure
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#user-position_balance
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
No | list of unified market symbols to watch positions for |
| since | int |
No | the earliest time in ms to fetch positions for |
| limit | int |
No | the maximum number of positions to retrieve |
| params | object |
Yes | extra parameters specific to the exchange API endpoint |
cryptocom.watchPositions ([symbols, since, limit, params])
watchBalance{docsify-ignore}
watch balance and get the amount of funds available for trading or funds locked in orders
Kind: instance method of cryptocom
Returns: object - a balance structure
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#user-balance
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.watchBalance ([params])
createOrderWs{docsify-ignore}
create a trade order
Kind: instance method of cryptocom
Returns: object - an order structure
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-create-order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to create an order in |
| type | string |
Yes | 'market' or 'limit' |
| side | string |
Yes | 'buy' or 'sell' |
| amount | float |
Yes | how much of currency you want to trade in units of base currency |
| price | float |
No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.createOrderWs (symbol, type, side, amount[, price, params])
editOrderWs{docsify-ignore}
edit a trade order
Kind: instance method of cryptocom
Returns: object - an order structure
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-amend-order
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | order id |
| symbol | string |
Yes | unified market symbol of the order to edit |
| type | string |
No | not used by cryptocom editOrder |
| side | string |
No | not used by cryptocom editOrder |
| amount | float |
Yes | (mandatory) how much of the currency you want to trade in units of the base currency |
| price | float |
Yes | (mandatory) the price for the order, in units of the quote currency, ignored in market orders |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.clientOrderId | string |
No | the original client order id of the order to edit, required if id is not provided |
cryptocom.editOrderWs (id, symbol[, type, side, amount, price, params])
cancelOrderWs{docsify-ignore}
cancels an open order
Kind: instance method of cryptocom
Returns: object - An order structure
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-cancel-order
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | the order id of the order to cancel |
| symbol | string |
No | unified symbol of the market the order was made in |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.cancelOrderWs (id[, symbol, params])
cancelAllOrdersWs{docsify-ignore}
cancel all open orders
Kind: instance method of cryptocom
Returns: object - Returns exchange raw message https://docs.ccxt.com/#/?id=order-structure
See: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-cancel-all-orders
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the orders to cancel |
| params | object |
No | extra parameters specific to the exchange API endpoint |
cryptocom.cancelAllOrdersWs (symbol[, params])