CCXT

grvt

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

grvt

Kind: global class
Extends: Exchange

signIn

sign in, must be called prior to using other authenticated methods

Kind: instance method of grvt
Returns: response from exchange

See: https://api-docs.grvt.io/#authentication

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
grvt.signIn (params?)

fetchMarkets

retrieves data on all markets

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

See: https://api-docs.grvt.io/market_data_api/#get-instrument-prod

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange api endpoint
grvt.fetchMarkets (params?)

fetchCurrencies

fetches all available currencies on an exchange

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

See: https://api-docs.grvt.io/market_data_api/#get-currency-response

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
grvt.fetchCurrencies (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 grvt
Returns: object - a ticker structure

See: https://api-docs.grvt.io/market_data_api/#ticker_1

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

fetchOrderBook

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

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

See: https://api-docs.grvt.io/market_data_api/#orderbook-levels

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
params.locstringNocrypto location, default: us
grvt.fetchOrderBook (symbol, limit?, params?)

fetchTrades

get the list of most recent trades for a particular symbol

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

See: https://api-docs.grvt.io/market_data_api/#trade_1

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market
sinceintNotimestamp in ms of the earliest item to fetch
limitintNothe maximum amount of items to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNotimestamp in ms for the ending date filter, default is the current time
grvt.fetchTrades (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 grvt
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume

See: https://api-docs.grvt.io/market_data_api/#candlestick_1

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

fetchFundingRateHistory

fetches historical funding rate prices

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

See: https://api-docs.grvt.io/market_data_api/#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.untilintNotimestamp in ms of the latest item
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
grvt.fetchFundingRateHistory (symbol, since?, limit?, params?)

fetchBalance

query for account info

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

See: https://api-docs.grvt.io/trading_api/#sub-account-summary

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
grvt.fetchBalance (params?)

fetchDeposits

fetch all deposits made to an account

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

See: https://api-docs.grvt.io/trading_api/#transfer

ParamTypeRequiredDescription
codestringNounified currency code
sinceintNothe earliest time in ms to fetch deposits for
limitintNothe maximum number of deposits structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNotimestamp in ms of the latest item
grvt.fetchDeposits (code?, since?, limit?, params?)

fetchTransfers

fetch a history of internal transfers made on an account

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

See: https://api-docs.grvt.io/trading_api/#transfer-history

ParamTypeRequiredDescription
codestringYesunified currency code of the currency transferred
sinceintNothe earliest time in ms to fetch transfers for
limitintNothe maximum number of transfers structures to retrieve (default 10, max 100)
paramsobjectNoextra parameters specific to the exchange API endpoint
params.paginatebooleanNowhether to paginate the results (default false)
grvt.fetchTransfers (code, since?, limit?, params?)

transfer

transfer currency internally between wallets on the same account

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

See: https://api-docs.grvt.io/trading_api/#transfer_1

ParamTypeRequiredDescription
codestringYesunified currency codeåå
amountfloatYesamount to transfer
fromAccountstringYesaccount to transfer from
toAccountstringYesaccount to transfer to
paramsobjectNoextra parameters specific to the exchange API endpoint
grvt.transfer (code, amount, fromAccount, toAccount, params?)

withdraw

make a withdrawal

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

See: https://api-docs.grvt.io/trading_api/#withdrawal

ParamTypeRequiredDescription
codestringYesunified currency code
amountfloatYesthe amount to withdraw
addressstringYesthe address to withdraw to
tagstringYes
paramsobjectNoextra parameters specific to the exchange API endpoint
params.networkstringYesthe network to withdraw on (mandatory)
grvt.withdraw (code, amount, address, tag, params?)

createOrder

create a trade order

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

See: https://api-docs.grvt.io/trading_api/#create-order

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit'
sidestringYes'buy' or 'sell'
amountfloatYeshow much of currency you want to trade in units of base currency
pricefloatNothe price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.triggerPricefloatNoThe price a trigger order is triggered at
params.stopLossPricefloatNoThe price a stop loss order is triggered at
params.takeProfitPricefloatNoThe price a take profit order is triggered at
params.timeInForcestringNo"GTC", "IOC", or "POST_ONLY"
params.postOnlyboolNotrue or false
params.reduceOnlyboolNoEnsures that the executed order does not flip the opened position.
params.clientOrderIdstringNoa unique id for the order
grvt.createOrder (symbol, type, side, amount, price?, params?)

fetchMyTrades

fetch all trades made by the user

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

See: https://api-docs.grvt.io/trading_api/#fill-history

ParamTypeRequiredDescription
symbolstringNounified market symbol
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
params.untilintNotimestamp in ms of the latest item
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
grvt.fetchMyTrades (symbol?, since?, limit?, params?)

fetchPositions

fetch all open positions

Kind: instance method of grvt
Returns: Array<object> - a list of position structures

See: https://api-docs.grvt.io/trading_api/#positions-request

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

fetchLeverages

fetch the set leverage for all contract markets

Kind: instance method of grvt
Returns: object - a list of leverage structures

See: https://api-docs.grvt.io/trading_api/#get-all-initial-leverage

ParamTypeRequiredDescription
symbolsArray<string>Noa list of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
grvt.fetchLeverages (symbols?, params?)

setLeverage

set the level of leverage for a market

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

See: https://api-docs.grvt.io/trading_api/#set-initial-leverage

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

fetchMarginModes

fetches margin mode of the user

Kind: instance method of grvt
Returns: object - a list of margin mode structures

See: https://api-docs.grvt.io/trading_api/#get-all-initial-leverage

ParamTypeRequiredDescription
symbolsArray<string>Yesunified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
grvt.fetchMarginModes (symbols, params?)

fetchFundingHistory

fetch the history of funding payments paid and received on this account

Kind: instance method of grvt
Returns: object - a funding history structure

See: https://api-docs.grvt.io/trading_api/#funding-payment-history

ParamTypeRequiredDescription
symbolstringNounified market symbol
sinceintNothe earliest time in ms to fetch funding history for
limitintNothe maximum number of funding history structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNotimestamp in ms of the latest item
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
grvt.fetchFundingHistory (symbol?, since?, limit?, params?)

fetchOrders

fetches information on multiple orders made by the user

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

See: https://api-docs.grvt.io/trading_api/#order-history

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
params.untilintNotimestamp in ms of the latest item
grvt.fetchOrders (symbol, since?, limit?, params?)

fetchOpenOrders

fetch all unfilled currently open orders

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

See: https://api-docs.grvt.io/trading_api/#open-orders

ParamTypeRequiredDescription
symbolstringNounified market symbol
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
grvt.fetchOpenOrders (symbol?, since?, limit?, params?)

fetchOrder

fetches information on an order made by the user

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

See: https://api-docs.grvt.io/trading_api/#get-order

ParamTypeRequiredDescription
idstringYesthe order id
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.clientOrderIdstringNoclient order id
grvt.fetchOrder (id, symbol, params?)

cancelAllOrders

cancel all open orders in a market

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

See: https://api-docs.grvt.io/trading_api/#cancel-all-orders

ParamTypeRequiredDescription
symbolstringYescancel alls open orders
paramsobjectNoextra parameters specific to the exchange API endpoint
grvt.cancelAllOrders (symbol, params?)

cancelOrder

cancels an open order

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

See: https://api-docs.grvt.io/trading_api/#cancel-order

ParamTypeRequiredDescription
idstringYesorder id
symbolstringNounified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.clientOrderIdstringNoclient order id
grvt.cancelOrder (id, symbol?, params?)

watchTicker

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

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

See: https://api-docs.grvt.io/market_data_streams/#mini-ticker-snap-feed-selector

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

watchTickers

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 grvt
Returns: object - a ticker structure

See: https://docs.backpack.exchange/#tag/Streams/Public/Ticker

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
grvt.watchTickers (symbols, params?)

watchTrades

watches information on multiple trades made in a market

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

See: https://api-docs.grvt.io/market_data_streams/#trade_1

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
grvt.watchTrades (symbol, since?, limit?, params?)

watchTradesForSymbols

get the list of most recent trades for a list of symbols

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

See: https://api-docs.grvt.io/market_data_streams/#trade_1

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch trades for
sinceintNotimestamp in ms of the earliest trade to fetch
limitintNothe maximum amount of trades to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
params.limitstringNo50, 200, 500, 1000 (default 50)
grvt.watchTradesForSymbols (symbols, since?, limit?, params?)

watchOHLCV

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

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

See: https://api-docs.grvt.io/market_data_streams/#candlestick_1

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
grvt.watchOHLCV (symbol, timeframe, since?, limit?, params?)

watchOHLCVForSymbols

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

Kind: instance method of grvt
Returns: object - A list of candles ordered as timestamp, open, high, low, close, volume

See: https://api-docs.grvt.io/market_data_streams/#candlestick_1

ParamTypeRequiredDescription
symbolsAndTimeframesArray<Array<string>>Yesarray of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
sinceintNotimestamp in ms of the earliest candle to fetch
limitintNothe maximum amount of candles to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
grvt.watchOHLCVForSymbols (symbolsAndTimeframes, since?, limit?, params?)

watchOrderBook

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

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

See

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
grvt.watchOrderBook (symbol, limit?, params?)

watchOrderBookForSymbols

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

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

See

ParamTypeRequiredDescription
symbolsArray<string>Yesunified array of symbols
limitintNothe maximum amount of order book entries to return.
paramsobjectNoextra parameters specific to the exchange API endpoint
grvt.watchOrderBookForSymbols (symbols, limit?, params?)

watchMyTrades

watches information on multiple trades made by the user

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

See: https://api-docs.grvt.io/trading_streams/#fill

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
params.unifiedMarginbooleanNouse unified margin account
grvt.watchMyTrades (symbol, since?, limit?, params?)

watchPositions

watch all open positions

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

See: https://api-docs.grvt.io/trading_streams/#positions

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

watchOrders

watches information on multiple orders made by the user

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

See: https://api-docs.grvt.io/trading_streams/#order_1-feed-selector

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
grvt.watchOrders (symbol, since?, limit?, params?)

On this page