CCXT

derive

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

derive

Kind: global class
Extends: Exchange

fetchTime

fetches the current integer timestamp in milliseconds from the exchange server

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

See: https://docs.derive.xyz/reference/post_public-get-time

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

fetchCurrencies

fetches all available currencies on an exchange

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

See: https://docs.derive.xyz/reference/post_public-get-all-currencies

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

fetchMarkets

retrieves data on all markets for bybit

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

See: https://docs.derive.xyz/reference/post_public-get-all-instruments

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

See: https://docs.derive.xyz/reference/post_public-get-ticker

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

fetchTrades

get the list of most recent trades for a particular symbol

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

See: https://docs.derive.xyz/reference/post_public-get-trade-history

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
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch trades for
derive.fetchTrades (symbol, since?, limit?, params?)

fetchFundingRateHistory

fetches historical funding rate prices

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

See: https://docs.derive.xyz/reference/post_public-get-funding-rate-history

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

fetchFundingRate

fetch the current funding rate

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

See: https://docs.derive.xyz/reference/post_public-get-funding-rate-history

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

createOrder

create a trade order

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

See: https://docs.derive.xyz/reference/post_private-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 fulfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.subaccount_idstringNorequired the subaccount id
params.triggerPricefloatNoThe price a trigger order is triggered at
params.takeProfitobjectNotakeProfit object in params containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only)
params.takeProfit.triggerPricefloatNotake profit trigger price
params.stopLossobjectNostopLoss object in params containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only)
params.stopLoss.triggerPricefloatNostop loss trigger price
params.max_feefloatNorequired the maximum fee you are willing to pay for the order
derive.createOrder (symbol, type, side, amount, price?, params?)

editOrder

edit a trade order

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

See: https://docs.derive.xyz/reference/post_private-replace

ParamTypeRequiredDescription
idstringYesorder id
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 fulfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.subaccount_idstringNorequired the subaccount id
derive.editOrder (id, symbol, type, side, amount, price?, params?)

cancelOrder

cancels an open order

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

See: https://docs.derive.xyz/reference/post_private-cancel

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.triggerbooleanNowhether the order is a trigger/algo order
params.subaccount_idstringNorequired the subaccount id
derive.cancelOrder (id, symbol, params?)

cancelAllOrders

cancel all open orders in a market

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

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.subaccount_idstringNorequired the subaccount id
derive.cancelAllOrders (symbol, params?)

fetchOrders

fetches information on multiple orders made by the user

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

See: https://docs.derive.xyz/reference/post_private-get-orders

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.paginatebooleanNoset to true if you want to fetch orders with pagination
params.triggerbooleanNowhether the order is a trigger/algo order
params.subaccount_idstringNorequired the subaccount id
derive.fetchOrders (symbol, since?, limit?, params?)

fetchOpenOrders

fetches information on multiple orders made by the user

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

See: https://docs.derive.xyz/reference/post_private-get-orders

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.paginatebooleanNoset to true if you want to fetch orders with pagination
derive.fetchOpenOrders (symbol, since?, limit?, params?)

fetchClosedOrders

fetches information on multiple orders made by the user

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

See: https://docs.derive.xyz/reference/post_private-get-orders

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.paginatebooleanNoset to true if you want to fetch orders with pagination
derive.fetchClosedOrders (symbol, since?, limit?, params?)

fetchCanceledOrders

fetches information on multiple canceled orders made by the user

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

See: https://docs.derive.xyz/reference/post_private-get-orders

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

fetchOrderTrades

fetch all the trades made from a single order

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

See: https://docs.derive.xyz/reference/post_private-get-trade-history

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trades to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.subaccount_idstringNorequired the subaccount id
derive.fetchOrderTrades (id, symbol, since?, limit?, params?)

fetchMyTrades

fetch all trades made by the user

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

See: https://docs.derive.xyz/reference/post_private-get-trade-history

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe 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.paginatebooleanNoset to true if you want to fetch trades with pagination
params.subaccount_idstringNorequired the subaccount id
derive.fetchMyTrades (symbol, since?, limit?, params?)

fetchPositions

fetch all open positions

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

See: https://docs.derive.xyz/reference/post_private-get-positions

ParamTypeRequiredDescription
symbolsArray<string>Nonot used by kraken fetchPositions ()
paramsobjectNoextra parameters specific to the exchange API endpoint
params.subaccount_idstringNorequired the subaccount id
derive.fetchPositions (symbols?, params?)

fetchFundingHistory

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

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

See: https://docs.derive.xyz/reference/post_private-get-funding-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.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
derive.fetchFundingHistory (symbol?, since?, limit?, params?)

fetchBalance

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

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

See: https://docs.derive.xyz/reference/post_private-get-all-portfolios

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

fetchDeposits

fetch all deposits made to an account

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

See: https://docs.derive.xyz/reference/post_private-get-deposit-history

ParamTypeRequiredDescription
codestringYesunified 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.subaccount_idstringNorequired the subaccount id
derive.fetchDeposits (code, since?, limit?, params?)

fetchWithdrawals

fetch all withdrawals made from an account

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

See: https://docs.derive.xyz/reference/post_private-get-withdrawal-history

ParamTypeRequiredDescription
codestringYesunified currency code
sinceintNothe earliest time in ms to fetch withdrawals for
limitintNothe maximum number of withdrawals structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.subaccount_idstringNorequired the subaccount id
derive.fetchWithdrawals (code, since?, limit?, params?)

watchOrderBook

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

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

See: https://docs.derive.xyz/reference/orderbook-instrument_name-group-depth

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
derive.watchOrderBook (symbol, limit?, 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 derive
Returns: object - a ticker structure

See: https://docs.derive.xyz/reference/ticker-instrument_name-interval

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

unWatchOrderBook

unsubscribe from the orderbook channel

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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.limitintNoorderbook limit, default is undefined
derive.unWatchOrderBook (symbol, params?)

unWatchTrades

unsubscribe from the trades channel

Kind: instance method of derive
Returns: any - status of the unwatch request

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to unwatch the trades for
paramsobjectNoextra parameters specific to the exchange API endpoint
derive.unWatchTrades (symbol, params?)

watchTrades

watches information on multiple trades made in a market

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

See: https://docs.derive.xyz/reference/trades-instrument_name

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

watchOrders

watches information on multiple orders made by the user

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

See: https://docs.derive.xyz/reference/subaccount_id-orders

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.subaccount_idstringNorequired the subaccount id
derive.watchOrders (symbol, since?, limit?, params?)

watchMyTrades

watches information on multiple trades made by the user

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

See: https://docs.derive.xyz/reference/subaccount_id-trades

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.subaccount_idstringNorequired the subaccount id
derive.watchMyTrades (symbol, since?, limit?, params?)

On this page