CCXT

krakenfutures

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

krakenfutures

Kind: global class
Extends: Exchange

fetchMarkets

Fetches the available trading markets from the exchange, Multi-collateral markets are returned as linear markets, but can be settled in multiple currencies

Kind: instance method of krakenfutures
Returns: An array of market structures

See: https://docs.kraken.com/api/docs/futures-api/trading/get-instruments

ParamTypeRequiredDescription
paramsobjectNoexchange specific params
krakenfutures.fetchMarkets (params?)

fetchOrderBook

Fetches a list of open orders in a market

Kind: instance method of krakenfutures
Returns: An order book structure

See: https://docs.kraken.com/api/docs/futures-api/trading/get-orderbook

ParamTypeRequiredDescription
symbolstringYesUnified market symbol
limitintNoNot used by krakenfutures
paramsobjectNoexchange specific params
krakenfutures.fetchOrderBook (symbol, limit?, params?)

fetchTickers

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

Kind: instance method of krakenfutures
Returns: object - an array of ticker structures

See: https://docs.kraken.com/api/docs/futures-api/trading/get-tickers

ParamTypeRequiredDescription
symbolsArray<string>Yesunified 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
krakenfutures.fetchTickers (symbols, params?)

fetchOHLCV

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

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

See: https://docs.kraken.com/api/docs/futures-api/charts/candles

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.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
krakenfutures.fetchOHLCV (symbol, timeframe, since?, limit?, params?)

fetchTrades

Fetch a history of filled trades that this account has made

Kind: instance method of krakenfutures
Returns: An array of trade structures

See

ParamTypeRequiredDescription
symbolstringYesUnified CCXT market symbol
sinceintNoTimestamp in ms of earliest trade. Not used by krakenfutures except in combination with params.until
limitintNoTotal number of trades, cannot exceed 100
paramsobjectNoExchange specific params
params.untilintNoTimestamp in ms of latest trade
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
params.methodstringNoThe method to use to fetch trades. Can be 'historyGetMarketSymbolExecutions' or 'publicGetHistory' default is 'historyGetMarketSymbolExecutions'
krakenfutures.fetchTrades (symbol, since?, limit?, params?)

createOrder

Create an order on the exchange

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

See: https://docs.kraken.com/api/docs/futures-api/trading/send-order

ParamTypeRequiredDescription
symbolstringYesunified market symbol
typestringYes'limit' or 'market'
sidestringYes'buy' or 'sell'
amountfloatYesnumber of contracts
pricefloatNolimit order price
paramsobjectNoextra parameters specific to the exchange API endpoint
params.reduceOnlyboolNoset as true if you wish the order to only reduce an existing position, any order which increases an existing position will be rejected, default is false
params.postOnlyboolNoset as true if you wish to make a postOnly order, default is false
params.clientOrderIdstringNoUUID The order identity that is specified from the user, It must be globally unique
params.triggerPricefloatNothe price that a stop order is triggered at
params.stopLossPricefloatNothe price that a stop loss order is triggered at
params.takeProfitPricefloatNothe price that a take profit order is triggered at
params.triggerSignalstringNofor triggerPrice, stopLossPrice and takeProfitPrice orders, the trigger price type, 'last', 'mark' or 'index', default is 'last'
krakenfutures.createOrder (symbol, type, side, amount, price?, params?)

createOrders

create a list of trade orders

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

See: https://docs.kraken.com/api/docs/futures-api/trading/send-batch-order

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 exchange API endpoint
krakenfutures.createOrders (orders, params?)

editOrder

Edit an open order on the exchange

Kind: instance method of krakenfutures
Returns: An order structure

See: https://docs.kraken.com/api/docs/futures-api/trading/edit-order-spring

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesNot used by Krakenfutures
typestringYesNot used by Krakenfutures
sidestringYesNot used by Krakenfutures
amountfloatYesOrder size
pricefloatNoPrice to fill order at
paramsobjectNoExchange specific params
krakenfutures.editOrder (id, symbol, type, side, amount, price?, params?)

cancelOrder

Cancel an open order on the exchange

Kind: instance method of krakenfutures
Returns: An order structure

See: https://docs.kraken.com/api/docs/futures-api/trading/cancel-order

ParamTypeRequiredDescription
idstringYesOrder id
symbolstringYesNot used by Krakenfutures
paramsobjectNoExchange specific params
krakenfutures.cancelOrder (id, symbol, params?)

cancelOrders

cancel multiple orders

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

See: https://docs.kraken.com/api/docs/futures-api/trading/send-batch-order

ParamTypeRequiredDescription
idsArray<string>Yesorder ids
symbolstringNounified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint EXCHANGE SPECIFIC PARAMETERS
params.clientOrderIdsArray<string>Nomax length 10 e.g. ["my_id_1","my_id_2"]
krakenfutures.cancelOrders (ids, symbol?, params?)

cancelAllOrders

Cancels all orders on the exchange, including trigger orders

Kind: instance method of krakenfutures
Returns: Response from exchange api

See: https://docs.kraken.com/api/docs/futures-api/trading/cancel-all-orders

ParamTypeRequiredDescription
symbolstrYesUnified market symbol
paramsdictNoExchange specific params
krakenfutures.cancelAllOrders (symbol, params?)

cancelAllOrdersAfter

dead man's switch, cancel all orders after the given timeout

Kind: instance method of krakenfutures
Returns: object - the api result

See: https://docs.kraken.com/api/docs/futures-api/trading/cancel-all-orders-after

ParamTypeRequiredDescription
timeoutnumberYestime in milliseconds, 0 represents cancel the timer
paramsobjectNoextra parameters specific to the exchange API endpoint
krakenfutures.cancelAllOrdersAfter (timeout, params?)

fetchOpenOrders

Gets all open orders, including trigger orders, for an account from the exchange api

Kind: instance method of krakenfutures
Returns: An array of order structures

See: https://docs.kraken.com/api/docs/futures-api/trading/get-open-orders

ParamTypeRequiredDescription
symbolstringYesUnified market symbol
sinceintNoTimestamp (ms) of earliest order. (Not used by kraken api but filtered internally by CCXT)
limitintNoHow many orders to return. (Not used by kraken api but filtered internally by CCXT)
paramsobjectNoExchange specific parameters
krakenfutures.fetchOpenOrders (symbol, since?, limit?, params?)

fetchOrders

Gets all orders for an account from the exchange api

Kind: instance method of krakenfutures
Returns: An array of order structures

See: https://docs.kraken.com/api/docs/futures-api/trading/get-order-status/

ParamTypeRequiredDescription
symbolstringYesUnified market symbol
sinceintNoTimestamp (ms) of earliest order. (Not used by kraken api but filtered internally by CCXT)
limitintNoHow many orders to return. (Not used by kraken api but filtered internally by CCXT)
paramsobjectNoExchange specific parameters
krakenfutures.fetchOrders (symbol, since?, limit?, params?)

fetchOrder

fetches information on an order made by the user

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

See: https://docs.kraken.com/api/docs/futures-api/trading/get-order-status/

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

fetchClosedOrders

Gets all closed orders, including trigger orders, for an account from the exchange api

Kind: instance method of krakenfutures
Returns: An array of order structures

See: https://docs.futures.kraken.com/#http-api-history-account-history-get-order-events

ParamTypeRequiredDescription
symbolstringYesUnified market symbol
sinceintNoTimestamp (ms) of earliest order.
limitintNoHow many orders to return.
paramsobjectNoExchange specific parameters
params.triggerboolNoset to true if you wish to fetch only trigger orders
krakenfutures.fetchClosedOrders (symbol, since?, limit?, params?)

fetchCanceledOrders

Gets all canceled orders, including trigger orders, for an account from the exchange api

Kind: instance method of krakenfutures
Returns: An array of order structures

See: https://docs.kraken.com/api/docs/futures-api/history/get-order-events

ParamTypeRequiredDescription
symbolstringYesUnified market symbol
sinceintNoTimestamp (ms) of earliest order.
limitintNoHow many orders to return.
paramsobjectNoExchange specific parameters
params.triggerboolNoset to true if you wish to fetch only trigger orders
krakenfutures.fetchCanceledOrders (symbol, since?, limit?, params?)

fetchMyTrades

fetch all trades made by the user

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

See: https://docs.kraken.com/api/docs/futures-api/trading/get-fills

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNonot used by the api the earliest time in ms to fetch trades for
limitintNothe maximum number of trades structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch entries for
krakenfutures.fetchMyTrades (symbol, since?, limit?, params?)

fetchBalance

Fetch the balance for a sub-account, all sub-account balances are inside 'info' in the response

Kind: instance method of krakenfutures
Returns: A balance structure

See: https://docs.kraken.com/api/docs/futures-api/trading/get-accounts

ParamTypeRequiredDescription
paramsobjectNoExchange specific parameters
params.typestringNoThe sub-account type to query the balance of, possible values include 'flex', 'cash'/'main'/'funding', or a market symbol * defaults to 'flex' *
params.symbolstringNoA unified market symbol, when assigned the balance for a trading market that matches the symbol is returned
krakenfutures.fetchBalance (params?)

fetchFundingRates

fetch the current funding rates for multiple markets

Kind: instance method of krakenfutures
Returns: Array<Order> - an array of funding rate structures

See: https://docs.kraken.com/api/docs/futures-api/trading/get-tickers

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

fetchFundingRateHistory

fetches historical funding rate prices

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

See: https://docs.kraken.com/api/docs/futures-api/trading/historical-funding-rates

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 api endpoint
krakenfutures.fetchFundingRateHistory (symbol, since?, limit?, params?)

fetchPositions

Fetches current contract trading positions

Kind: instance method of krakenfutures
Returns: Parsed exchange response for positions

See: https://docs.kraken.com/api/docs/futures-api/trading/get-open-positions

ParamTypeRequiredDescription
symbolsArray<string>YesList of unified symbols
paramsobjectNoNot used by krakenfutures
krakenfutures.fetchPositions (symbols, params?)

fetchLeverageTiers

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

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

See: https://docs.kraken.com/api/docs/futures-api/trading/get-instruments

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

transferOut

transfer from futures wallet to spot wallet

Kind: instance method of krakenfutures
Returns: a transfer structure

ParamTypeRequiredDescription
codestrYesUnified currency code
amountfloatYesSize of the transfer
paramsdictNoExchange specific parameters
krakenfutures.transferOut (code, amount, params?)

transfer

transfers currencies between sub-accounts

Kind: instance method of krakenfutures
Returns: a transfer structure

See

ParamTypeRequiredDescription
codestringYesUnified currency code
amountfloatYesSize of the transfer
fromAccountstringYes'main'/'funding'/'future', 'flex', or a unified market symbol
toAccountstringYes'main'/'funding', 'flex', 'spot' or a unified market symbol
paramsobjectNoExchange specific parameters
krakenfutures.transfer (code, amount, fromAccount, toAccount, params?)

setLeverage

set the level of leverage for a market

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

See: https://docs.kraken.com/api/docs/futures-api/trading/set-leverage-setting

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

fetchLeverages

fetch the set leverage for all contract and margin markets

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

See: https://docs.kraken.com/api/docs/futures-api/trading/get-leverage-setting

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

fetchLeverage

fetch the set leverage for a market

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

See: https://docs.kraken.com/api/docs/futures-api/trading/get-leverage-setting

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

On this page