CCXT

hashkey

hashkey cryptocurrency exchange — CCXT unified API: methods, parameters and endpoints.

hashkey

Kind: global class
Extends: Exchange

fetchTime

fetches the current integer timestamp in milliseconds from the exchange server

Kind: instance method of hashkey
Returns: int - the current integer timestamp in milliseconds from the exchange server

See: https://hashkeyglobal-apidoc.readme.io/reference/check-server-time

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
hashkey.fetchTime (params?)

fetchStatus

the latest known information on the availability of the exchange API

Kind: instance method of hashkey
Returns: object - a status structure

See: https://hashkeyglobal-apidoc.readme.io/reference/test-connectivity

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
hashkey.fetchStatus (params?)

fetchMarkets

retrieves data on all markets for the exchange

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

See: https://hashkeyglobal-apidoc.readme.io/reference/exchangeinfo

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.symbolstringNothe id of the market to fetch
hashkey.fetchMarkets (params?)

fetchCurrencies

fetches all available currencies on an exchange

Kind: instance method of hashkey
Returns: object - an associative dictionary of currencies

See: https://hashkeyglobal-apidoc.readme.io/reference/exchangeinfo

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
hashkey.fetchCurrencies (params?)

fetchOrderBook

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

Kind: instance method of hashkey
Returns: object - A dictionary of order book structures indexed by market symbols

See: https://hashkeyglobal-apidoc.readme.io/reference/get-order-book

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
limitintNothe maximum amount of order book entries to return (maximum value is 200)
paramsobjectNoextra parameters specific to the exchange API endpoint
hashkey.fetchOrderBook (symbol, limit?, params?)

fetchTrades

get the list of most recent trades for a particular symbol

Kind: instance method of hashkey
Returns: Array<Trade> - a list of trade structures

See: https://hashkeyglobal-apidoc.readme.io/reference/get-recent-trade-list

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch trades for
sinceintNotimestamp in ms of the earliest trade to fetch
limitintNothe maximum amount of trades to fetch (maximum value is 100)
paramsobjectNoextra parameters specific to the exchange API endpoint
hashkey.fetchTrades (symbol, since?, limit?, params?)

fetchMyTrades

fetch all trades made by the user

Kind: instance method of hashkey
Returns: Array<Trade> - a list of trade structures

See

ParamTypeRequiredDescription
symbolstringYesis mandatory for swap markets unified market symbol
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum amount of trades to fetch (default 200, max 500)
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNo'spot' or 'swap' - the type of the market to fetch trades for (default 'spot')
params.untilintNothe latest time in ms to fetch trades for, only supports the last 30 days timeframe
params.fromIdstringNosrarting trade id
params.toIdstringNoending trade id
params.clientOrderIdstringNospot markets only filter trades by orderId
params.accountIdstringNoaccount id to fetch the orders from
hashkey.fetchMyTrades (symbol, since?, limit?, params?)

fetchOHLCV

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

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

See: https://hashkeyglobal-apidoc.readme.io/reference/get-kline

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch OHLCV data for
timeframestringYesthe length of time each candle represents
sinceintNotimestamp in ms of the earliest candle to fetch
limitintNothe maximum amount of candles to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNotimestamp in ms of the latest candle to fetch
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
hashkey.fetchOHLCV (symbol, timeframe, since?, limit?, params?)

fetchTicker

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

Kind: instance method of hashkey
Returns: object - a ticker structure

See: https://hashkeyglobal-apidoc.readme.io/reference/get-24hr-ticker-price-change

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
hashkey.fetchTicker (symbol, params?)

fetchTickers

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

Kind: instance method of hashkey
Returns: object - a dictionary of ticker structures

See: https://hashkeyglobal-apidoc.readme.io/reference/get-24hr-ticker-price-change

ParamTypeRequiredDescription
symbolsArray<string>Nounified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
paramsobjectNoextra parameters specific to the exchange API endpoint
hashkey.fetchTickers (symbols?, params?)

fetchLastPrices

fetches the last price for multiple markets

Kind: instance method of hashkey
Returns: object - a dictionary of lastprices structures

See: https://hashkeyglobal-apidoc.readme.io/reference/get-symbol-price-ticker

ParamTypeRequiredDescription
symbolsArray<string>Nounified symbols of the markets to fetch the last prices
paramsobjectNoextra parameters specific to the exchange API endpoint
params.symbolstringNothe id of the market to fetch last price for
hashkey.fetchLastPrices (symbols?, params?)

fetchBalance

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

Kind: instance method of hashkey
Returns: object - a balance structure

See: https://hashkeyglobal-apidoc.readme.io/reference/get-account-information

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountIdstringNoaccount ID, for Master Key only
params.typestringNo'spot' or 'swap' - the type of the market to fetch balance for (default 'spot')
hashkey.fetchBalance (params?)

fetchDepositAddress

fetch the deposit address for a currency associated with this account

Kind: instance method of hashkey
Returns: object - an address structure

See: https://hashkeyglobal-apidoc.readme.io/reference/get-deposit-address

ParamTypeRequiredDescription
codestringYesunified currency code (default is 'USDT')
paramsobjectNoextra parameters specific to the exchange API endpoint
params.networkstringNonetwork for fetch deposit address (default is 'ETH')
hashkey.fetchDepositAddress (code, params?)

fetchDeposits

fetch all deposits made to an account

Kind: instance method of hashkey
Returns: Array<object> - a list of transfer structures

See: https://hashkeyglobal-apidoc.readme.io/reference/get-deposit-history

ParamTypeRequiredDescription
codestringYesunified currency code of the currency transferred
sinceintNothe earliest time in ms to fetch transfers for (default 24 hours ago)
limitintNothe maximum number of transfer structures to retrieve (default 50, max 200)
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch transfers for (default time now)
params.fromIdintNostarting ID (To be released)
hashkey.fetchDeposits (code, since?, limit?, params?)

fetchWithdrawals

fetch all withdrawals made from an account

Kind: instance method of hashkey
Returns: Array<object> - a list of transaction structures

See: https://hashkeyglobal-apidoc.readme.io/reference/withdrawal-records

ParamTypeRequiredDescription
codestringYesunified currency code of the currency transferred
sinceintNothe earliest time in ms to fetch transfers for (default 24 hours ago)
limitintNothe maximum number of transfer structures to retrieve (default 50, max 200)
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch transfers for (default time now)
hashkey.fetchWithdrawals (code, since?, limit?, params?)

withdraw

make a withdrawal

Kind: instance method of hashkey
Returns: object - a transaction structure

See: https://hashkeyglobal-apidoc.readme.io/reference/withdraw

ParamTypeRequiredDescription
codestringYesunified currency code
amountfloatYesthe amount to withdraw
addressstringYesthe address to withdraw to
tagstringYes
paramsobjectNoextra parameters specific to the exchange API endpoint
params.networkstringNonetwork for withdraw
params.clientOrderIdstringNoclient order id
params.platformstringNothe platform to withdraw to (hashkey, HashKey HK)
hashkey.withdraw (code, amount, address, tag, params?)

transfer

transfer currency internally between wallets on the same account

Kind: instance method of hashkey
Returns: object - a transfer structure

See: https://hashkeyglobal-apidoc.readme.io/reference/new-account-transfer

ParamTypeRequiredDescription
codestringYesunified currency code
amountfloatYesamount to transfer
fromAccountstringYesaccount id to transfer from
toAccountstringYesaccount id to transfer to
paramsobjectNoextra parameters specific to the exchange API endpoint
params.clientOrderIdstringNoa unique id for the transfer
params.remarkstringNoa note for the transfer
hashkey.transfer (code, amount, fromAccount, toAccount, params?)

fetchAccounts

fetch all the accounts associated with a profile

Kind: instance method of hashkey
Returns: object - a dictionary of account structures indexed by the account type

See: https://hashkeyglobal-apidoc.readme.io/reference/query-sub-account

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
hashkey.fetchAccounts (params?)

fetchLedger

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

Kind: instance method of hashkey
Returns: object - a ledger structure

See: https://hashkeyglobal-apidoc.readme.io/reference/get-account-transaction-list

ParamTypeRequiredDescription
codestringNounified currency code, default is undefined (not used)
sinceintNotimestamp in ms of the earliest ledger entry, default is undefined
limitintNomax number of ledger entries to return, default is undefined
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch entries for
params.flowTypeintNotrade, fee, transfer, deposit, withdrawal
params.accountTypeintNospot, swap, custody
hashkey.fetchLedger (code?, since?, limit?, params?)

createOrder

create a trade order

Kind: instance method of hashkey
Returns: object - an order structure

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit' or 'LIMIT_MAKER' for spot, 'market' or 'limit' or 'STOP' for swap
sidestringYes'buy' or 'sell'
amountfloatYeshow much of you want to trade in units of the base currency
pricefloatNothe price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.costfloatNospot market buy only the quote quantity that can be used as an alternative for the amount
params.testbooleanNospot markets only whether to use the test endpoint or not, default is false
params.postOnlyboolNoif true, the order will only be posted to the order book and not executed immediately
params.timeInForcestringNo"GTC" or "IOC" or "PO" for spot, 'GTC' or 'FOK' or 'IOC' or 'LIMIT_MAKER' or 'PO' for swap
params.clientOrderIdstringNoa unique id for the order - is mandatory for swap
params.triggerPricefloatNoswap markets only The price at which a trigger order is triggered at
hashkey.createOrder (symbol, type, side, amount, price?, params?)

createMarketBuyOrderWithCost

create a market buy order by providing the symbol and cost

Kind: instance method of hashkey
Returns: object - an order structure

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
costfloatYeshow much you want to trade in units of the quote currency
paramsobjectNoextra parameters specific to the exchange API endpoint
hashkey.createMarketBuyOrderWithCost (symbol, cost, params?)

createSpotOrder

create a trade order on spot market

Kind: instance method of hashkey
Returns: object - an order structure

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit' or 'LIMIT_MAKER'
sidestringYes'buy' or 'sell'
amountfloatYeshow much of you want to trade in units of the base currency
pricefloatNothe price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.costfloatNomarket buy only the quote quantity that can be used as an alternative for the amount
params.testboolNowhether to use the test endpoint or not, default is false
params.postOnlyboolNoif true, the order will only be posted to the order book and not executed immediately
params.timeInForcestringNo'GTC', 'IOC', or 'PO'
params.clientOrderIdstringNoa unique id for the order
hashkey.createSpotOrder (symbol, type, side, amount, price?, params?)

createSwapOrder

create a trade order on swap market

Kind: instance method of hashkey
Returns: object - an order structure

See: https://hashkeyglobal-apidoc.readme.io/reference/create-new-futures-order

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit' or 'STOP'
sidestringYes'buy' or 'sell'
amountfloatYeshow much of you want to trade in units of the base currency
pricefloatNothe price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.postOnlyboolNoif true, the order will only be posted to the order book and not executed immediately
params.reduceOnlyboolNotrue or false whether the order is reduce only
params.triggerPricefloatNoThe price at which a trigger order is triggered at
params.timeInForcestringNo'GTC', 'FOK', 'IOC', 'LIMIT_MAKER' or 'PO'
params.clientOrderIdstringNoa unique id for the order
hashkey.createSwapOrder (symbol, type, side, amount, price?, params?)

createOrders

create a list of trade orders (all orders should be of the same symbol)

Kind: instance method of hashkey
Returns: object - an order structure

See

ParamTypeRequiredDescription
ordersArrayYeslist of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
paramsobjectNoextra parameters specific to the api endpoint
hashkey.createOrders (orders, params?)

cancelOrder

cancels an open order

Kind: instance method of hashkey
Returns: object - An order structure

See

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNo'spot' or 'swap' - the type of the market to fetch entry for (default 'spot')
params.clientOrderIdstringNoa unique id for the order that can be used as an alternative for the id
params.triggerboolNoswap markets only true for canceling a trigger order (default false)
params.stopboolNoswap markets only an alternative for trigger param
hashkey.cancelOrder (id, symbol, params?)

cancelAllOrders

cancel all open orders

Kind: instance method of hashkey
Returns: object - response from exchange

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
paramsobjectNoextra parameters specific to the exchange API endpoint
params.sidestringNo'buy' or 'sell'
hashkey.cancelAllOrders (symbol, params?)

cancelOrders

cancel multiple orders

Kind: instance method of hashkey
Returns: object - an list of order structures

See

ParamTypeRequiredDescription
idsArray<string>Yesorder ids
symbolstringNounified market symbol (not used by hashkey)
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNo'spot' or 'swap' - the type of the market to fetch entry for (default 'spot')
hashkey.cancelOrders (ids, symbol?, params?)

fetchOrder

fetches information on an order made by the user

Kind: instance method of hashkey
Returns: object - An order structure

See

ParamTypeRequiredDescription
idstringYesthe order id
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNo'spot' or 'swap' - the type of the market to fetch entry for (default 'spot')
params.clientOrderIdstringNoa unique id for the order that can be used as an alternative for the id
params.accountIdstringNospot markets only account id to fetch the order from
params.triggerboolNoswap markets only true for fetching a trigger order (default false)
params.stopboolNoswap markets only an alternative for trigger param
hashkey.fetchOrder (id, symbol, params?)

fetchOpenOrders

fetch all unfilled currently open orders

Kind: instance method of hashkey
Returns: Array<Order> - a list of order structures

See

ParamTypeRequiredDescription
symbolstringNounified market symbol of the market orders were made in - is mandatory for swap markets
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve - default 500, maximum 1000
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNo'spot' or 'swap' - the type of the market to fetch entries for (default 'spot')
params.orderIdstringNospot markets only the id of the order to fetch
params.sidestringNospot markets only 'buy' or 'sell' - the side of the orders to fetch
params.fromOrderIdstringNoswap markets only the id of the order to start from
params.triggerboolNoswap markets only true for fetching trigger orders (default false)
params.stopboolNoswap markets only an alternative for trigger param
params.accountIdstringNoaccount id to fetch the orders from
hashkey.fetchOpenOrders (symbol?, since?, limit?, params?)

fetchCanceledAndClosedOrders

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

Kind: instance method of hashkey
Returns: Array<Order> - a list of order structures

See

ParamTypeRequiredDescription
symbolstringYesis mandatory for swap markets unified market symbol of the market orders were made in
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve - default 500, maximum 1000
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch entries for - only supports the last 90 days timeframe
params.typestringNo'spot' or 'swap' - the type of the market to fetch entries for (default 'spot')
params.orderIdstringNospot markets only the id of the order to fetch
params.sidestringNospot markets only 'buy' or 'sell' - the side of the orders to fetch
params.fromOrderIdstringNoswap markets only the id of the order to start from
params.triggerboolNoswap markets only the id of the order to start from true for fetching trigger orders (default false)
params.stopboolNoswap markets only the id of the order to start from an alternative for trigger param
params.accountIdstringNoaccount id to fetch the orders from
hashkey.fetchCanceledAndClosedOrders (symbol, since?, limit?, params?)

fetchFundingRate

fetch the current funding rate

Kind: instance method of hashkey
Returns: object - a funding rate structure

See: https://hashkeyglobal-apidoc.readme.io/reference/get-futures-funding-rate

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
hashkey.fetchFundingRate (symbol, params?)

fetchFundingRates

fetch the funding rate for multiple markets

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

See: https://hashkeyglobal-apidoc.readme.io/reference/get-futures-funding-rate

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYeslist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
hashkey.fetchFundingRates (symbols, params?)

fetchFundingRateHistory

fetches historical funding rate prices

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

See: https://hashkeyglobal-apidoc.readme.io/reference/get-futures-history-funding-rate

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the funding rate history for
sinceintNotimestamp in ms of the earliest funding rate to fetch
limitintNothe maximum amount of funding rate structures to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
params.fromIdintNothe id of the entry to start from
params.endIdintNothe id of the entry to end with
hashkey.fetchFundingRateHistory (symbol, since?, limit?, params?)

fetchPositions

fetch all open positions

Kind: instance method of hashkey
Returns: Array<object> - a list of position structure

See: https://hashkeyglobal-apidoc.readme.io/reference/get-futures-positions

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYeslist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
params.sidestringNo'LONG' or 'SHORT' - the direction of the position (if not provided, positions for both sides will be returned)
hashkey.fetchPositions (symbols, params?)

fetchPositionsForSymbol

fetch all open positions for specific symbol

Kind: instance method of hashkey
Returns: Array<object> - a list of position structure

See: https://hashkeyglobal-apidoc.readme.io/reference/get-futures-positions

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.sidestringNo'LONG' or 'SHORT' - the direction of the position (if not provided, positions for both sides will be returned)
hashkey.fetchPositionsForSymbol (symbol, params?)

fetchLeverage

fetch the set leverage for a market

Kind: instance method of hashkey
Returns: object - a leverage structure

See: https://hashkeyglobal-apidoc.readme.io/reference/query-futures-leverage-trade

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
hashkey.fetchLeverage (symbol, params?)

setLeverage

set the level of leverage for a market

Kind: instance method of hashkey
Returns: object - response from the exchange

See: https://hashkeyglobal-apidoc.readme.io/reference/change-futures-leverage-trade

ParamTypeRequiredDescription
leveragefloatYesthe rate of leverage
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
hashkey.setLeverage (leverage, symbol, params?)

fetchLeverageTiers

retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes

Kind: instance method of hashkey
Returns: object - a dictionary of leverage tiers structures, indexed by market symbols

See: https://hashkeyglobal-apidoc.readme.io/reference/exchangeinfo

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYeslist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
hashkey.fetchLeverageTiers (symbols, params?)

fetchTradingFee

fetch the trading fees for a market

Kind: instance method of hashkey
Returns: object - a fee structure

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
hashkey.fetchTradingFee (symbol, params?)

fetchTradingFees

for spot markets only fetch the trading fees for multiple markets

Kind: instance method of hashkey
Returns: object - a dictionary of fee structures indexed by market symbols

See: https://developers.binance.com/docs/wallet/asset/trade-fee

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
hashkey.fetchTradingFees (params?)

watchOHLCV

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

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

See: https://hashkeyglobal-apidoc.readme.io/reference/websocket-api#public-stream

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch OHLCV data for
timeframestringYesthe length of time each candle represents
sinceintNotimestamp in ms of the earliest candle to fetch
limitintNothe maximum amount of candles to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
params.binaryboolNotrue or false - default false
hashkey.watchOHLCV (symbol, timeframe, since?, limit?, params?)

watchTrades

watches information on multiple trades made in a market

Kind: instance method of hashkey
Returns: Array<object> - a list of trade structures

See: https://hashkeyglobal-apidoc.readme.io/reference/websocket-api#public-stream

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market trades were made in
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of trade structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.binaryboolNotrue or false - default false
hashkey.watchTrades (symbol, since?, limit?, params?)

watchOrderBook

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

Kind: instance method of hashkey
Returns: object - A dictionary of order book structures indexed by market symbols

See: https://hashkeyglobal-apidoc.readme.io/reference/websocket-api#public-stream

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
limitintNothe maximum amount of order book entries to return.
paramsobjectNoextra parameters specific to the exchange API endpoint
hashkey.watchOrderBook (symbol, limit?, params?)

watchOrders

watches information on multiple orders made by the user

Kind: instance method of hashkey
Returns: Array<object> - a list of order structures

See: https://hashkeyglobal-apidoc.readme.io/reference/websocket-api#private-stream

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market orders were made in
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
hashkey.watchOrders (symbol, since?, limit?, params?)

watchMyTrades

watches information on multiple trades made by the user

Kind: instance method of hashkey
Returns: Array<object> - a list of trade structures

See: https://hashkeyglobal-apidoc.readme.io/reference/websocket-api#private-stream

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market trades were made in
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trade structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
hashkey.watchMyTrades (symbol, since?, limit?, params?)

watchPositions

watch all open positions

Kind: instance method of hashkey
Returns: Array<object> - a list of position structure

See: https://hashkeyglobal-apidoc.readme.io/reference/websocket-api#private-stream

ParamTypeRequiredDescription
symbolsArray<string>Nolist of unified market symbols to watch positions for
sinceintNothe earliest time in ms to fetch positions for
limitintNothe maximum number of positions to retrieve
paramsobjectYesextra parameters specific to the exchange API endpoint
hashkey.watchPositions (symbols?, since?, limit?, params)

watchBalance

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

Kind: instance method of hashkey
Returns: object - a balance structure

See: https://hashkeyglobal-apidoc.readme.io/reference/websocket-api#private-stream

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNo'spot' or 'swap' - the type of the market to watch balance for (default 'spot')
hashkey.watchBalance (params?)

On this page