Back to Ccxt

Grvt

wiki/exchanges/grvt.md

4.5.5232.8 KB
Original Source

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

grvt{docsify-ignore}

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

<a name="signIn" id="signin"></a>

signIn{docsify-ignore}

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

Kind: instance method of <code>grvt</code>
Returns: response from exchange

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

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

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

fetchMarkets{docsify-ignore}

retrieves data on all markets

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

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

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

<a name="fetchCurrencies" id="fetchcurrencies"></a>

fetchCurrencies{docsify-ignore}

fetches all available currencies on an exchange

Kind: instance method of <code>grvt</code>
Returns: <code>object</code> - an associative dictionary of currencies

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

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

<a name="fetchTicker" id="fetchticker"></a>

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

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

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

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

fetchOrderBook{docsify-ignore}

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

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

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

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

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

fetchTrades{docsify-ignore}

get the list of most recent trades for a particular symbol

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

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market
since<code>int</code>Notimestamp in ms of the earliest item to fetch
limit<code>int</code>Nothe maximum amount of items to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Notimestamp in ms for the ending date filter, default is the current time
javascript
grvt.fetchTrades (symbol[, since, limit, params])

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

fetchOHLCV{docsify-ignore}

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

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

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch OHLCV data for
timeframe<code>string</code>Yesthe length of time each candle represents
since<code>int</code>Notimestamp in ms of the earliest item to fetch
limit<code>int</code>Nothe maximum amount of items to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Notimestamp in ms for the ending date filter, default is the current time
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
javascript
grvt.fetchOHLCV (symbol, timeframe[, since, limit, params])

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

fetchFundingRateHistory{docsify-ignore}

fetches historical funding rate prices

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

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the funding rate history for
since<code>int</code>Notimestamp in ms of the earliest funding rate to fetch
limit<code>int</code>Nothe maximum amount of funding rate structures to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Notimestamp in ms of the latest item
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
javascript
grvt.fetchFundingRateHistory (symbol[, since, limit, params])

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

fetchBalance{docsify-ignore}

query for account info

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

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

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

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

fetchDeposits{docsify-ignore}

fetch all deposits made to an account

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

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

ParamTypeRequiredDescription
code<code>string</code>Nounified currency code
since<code>int</code>Nothe earliest time in ms to fetch deposits for
limit<code>int</code>Nothe maximum number of deposits structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Notimestamp in ms of the latest item
javascript
grvt.fetchDeposits ([code, since, limit, params])

<a name="fetchTransfers" id="fetchtransfers"></a>

fetchTransfers{docsify-ignore}

fetch a history of internal transfers made on an account

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

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

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code of the currency transferred
since<code>int</code>Nothe earliest time in ms to fetch transfers for
limit<code>int</code>Nothe maximum number of transfers structures to retrieve (default 10, max 100)
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.paginate<code>boolean</code>Nowhether to paginate the results (default false)
javascript
grvt.fetchTransfers (code[, since, limit, params])

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

transfer{docsify-ignore}

transfer currency internally between wallets on the same account

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

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

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency codeåå
amount<code>float</code>Yesamount to transfer
fromAccount<code>string</code>Yesaccount to transfer from
toAccount<code>string</code>Yesaccount to transfer to
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
grvt.transfer (code, amount, fromAccount, toAccount[, params])

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

withdraw{docsify-ignore}

make a withdrawal

Kind: instance method of <code>grvt</code>
Returns: <code>object</code> - a transaction structure

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

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
amount<code>float</code>Yesthe amount to withdraw
address<code>string</code>Yesthe address to withdraw to
tag<code>string</code>Yes
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.network<code>string</code>Yesthe network to withdraw on (mandatory)
javascript
grvt.withdraw (code, amount, address, tag[, params])

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

createOrder{docsify-ignore}

create a trade order

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

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to create an order in
type<code>string</code>Yes'market' or 'limit'
side<code>string</code>Yes'buy' or 'sell'
amount<code>float</code>Yeshow much of currency you want to trade in units of base currency
price<code>float</code>Nothe price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.triggerPrice<code>float</code>NoThe price a trigger order is triggered at
params.stopLossPrice<code>float</code>NoThe price a stop loss order is triggered at
params.takeProfitPrice<code>float</code>NoThe price a take profit order is triggered at
params.timeInForce<code>string</code>No"GTC", "IOC", or "POST_ONLY"
params.postOnly<code>bool</code>Notrue or false
params.reduceOnly<code>bool</code>NoEnsures that the executed order does not flip the opened position.
params.clientOrderId<code>string</code>Noa unique id for the order
javascript
grvt.createOrder (symbol, type, side, amount[, price, params])

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

fetchMyTrades{docsify-ignore}

fetch all trades made by the user

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

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

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

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

fetchPositions{docsify-ignore}

fetch all open positions

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

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

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

<a name="fetchLeverages" id="fetchleverages"></a>

fetchLeverages{docsify-ignore}

fetch the set leverage for all contract markets

Kind: instance method of <code>grvt</code>
Returns: <code>object</code> - a list of leverage structures

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

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

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

setLeverage{docsify-ignore}

set the level of leverage for a market

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

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

ParamTypeRequiredDescription
leverage<code>float</code>Yesthe rate of leverage
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
grvt.setLeverage (leverage, symbol[, params])

<a name="fetchMarginModes" id="fetchmarginmodes"></a>

fetchMarginModes{docsify-ignore}

fetches margin mode of the user

Kind: instance method of <code>grvt</code>
Returns: <code>object</code> - a list of margin mode structures

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
grvt.fetchMarginModes (symbols[, params])

<a name="fetchFundingHistory" id="fetchfundinghistory"></a>

fetchFundingHistory{docsify-ignore}

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

Kind: instance method of <code>grvt</code>
Returns: <code>object</code> - a funding history structure

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

ParamTypeRequiredDescription
symbol<code>string</code>Nounified market symbol
since<code>int</code>Nothe earliest time in ms to fetch funding history for
limit<code>int</code>Nothe maximum number of funding history structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Notimestamp in ms of the latest item
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
javascript
grvt.fetchFundingHistory ([symbol, since, limit, params])

<a name="fetchOrders" id="fetchorders"></a>

fetchOrders{docsify-ignore}

fetches information on multiple orders made by the user

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

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

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

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

fetchOpenOrders{docsify-ignore}

fetch all unfilled currently open orders

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

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

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

<a name="fetchOrder" id="fetchorder"></a>

fetchOrder{docsify-ignore}

fetches information on an order made by the user

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

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

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

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

cancelAllOrders{docsify-ignore}

cancel all open orders in a market

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

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

ParamTypeRequiredDescription
symbol<code>string</code>Yescancel alls open orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
grvt.cancelAllOrders (symbol[, params])

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

cancelOrder{docsify-ignore}

cancels an open order

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

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

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

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

watchTicker{docsify-ignore}

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

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

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

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

<a name="watchTickers" id="watchtickers"></a>

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

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

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

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

watchTrades{docsify-ignore}

watches information on multiple trades made in a market

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

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

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

<a name="watchTradesForSymbols" id="watchtradesforsymbols"></a>

watchTradesForSymbols{docsify-ignore}

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

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

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified symbol of the market to fetch trades for
since<code>int</code>Notimestamp in ms of the earliest trade to fetch
limit<code>int</code>Nothe maximum amount of trades to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.limit<code>string</code>No50, 200, 500, 1000 (default 50)
javascript
grvt.watchTradesForSymbols (symbols[, since, limit, params])

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

watchOHLCV{docsify-ignore}

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

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

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

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

<a name="watchOHLCVForSymbols" id="watchohlcvforsymbols"></a>

watchOHLCVForSymbols{docsify-ignore}

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

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

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

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

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

watchOrderBook{docsify-ignore}

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

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

See

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

<a name="watchOrderBookForSymbols" id="watchorderbookforsymbols"></a>

watchOrderBookForSymbols{docsify-ignore}

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

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

See

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified array of symbols
limit<code>int</code>Nothe maximum amount of order book entries to return.
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
grvt.watchOrderBookForSymbols (symbols[, limit, params])

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

watchMyTrades{docsify-ignore}

watches information on multiple trades made by the user

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

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

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

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

watchPositions{docsify-ignore}

watch all open positions

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

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

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

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

watchOrders{docsify-ignore}

watches information on multiple orders made by the user

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

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

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