CCXT

digifinex

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

digifinex

Kind: global class
Extends: Exchange

fetchCurrencies

fetches all available currencies on an exchange

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

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

fetchMarkets

retrieves data on all markets for digifinex

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

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
digifinex.fetchMarkets (params?)

fetchBalance

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

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

See

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

fetchOrderBook

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

Kind: instance method of digifinex
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
digifinex.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 digifinex
Returns: object - a dictionary of ticker structures

See

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYesunified 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
digifinex.fetchTickers (symbols, 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 digifinex
Returns: object - a ticker structure

See

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

fetchTime

fetches the current integer timestamp in milliseconds from the exchange server

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

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

fetchStatus

the latest known information on the availability of the exchange API

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

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

fetchTrades

get the list of most recent trades for a particular symbol

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

See

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
digifinex.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 digifinex
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume

See

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

createOrder

create a trade order

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit'
sidestringYes'buy' or 'sell'
amountfloatYeshow much you want to trade in units of the base currency, spot market orders use the quote currency, swap requires the number of contracts
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.timeInForcestringNo"GTC", "IOC", "FOK", or "PO"
params.postOnlyboolNotrue or false
params.reduceOnlyboolNotrue or false
params.marginModestringNo'cross' or 'isolated', for spot margin trading
params.costfloatNospot market buy only the quote quantity that can be used as an alternative for the amount
digifinex.createOrder (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 digifinex
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 exchange API endpoint
digifinex.createOrders (orders, params?)

createMarketBuyOrderWithCost

create a market buy order by providing the symbol and cost

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

See: https://docs.digifinex.com/en-ww/spot/v3/rest.html#create-new-order

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
digifinex.createMarketBuyOrderWithCost (symbol, cost, params?)

cancelOrder

cancels an open order

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

See

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesnot used by digifinex cancelOrder ()
paramsobjectNoextra parameters specific to the exchange API endpoint
digifinex.cancelOrder (id, symbol, params?)

cancelOrders

cancel multiple orders

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

ParamTypeRequiredDescription
idsArray<string>Yesorder ids
symbolstringYesnot used by digifinex cancelOrders ()
paramsobjectNoextra parameters specific to the exchange API endpoint
digifinex.cancelOrders (ids, symbol, params?)

fetchOpenOrders

fetch all unfilled currently open orders

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

See

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

fetchOrders

fetches information on multiple orders made by the user

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

See

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

fetchOrder

fetches information on an order made by the user

Kind: instance method of digifinex
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
digifinex.fetchOrder (id, symbol, params?)

fetchMyTrades

fetch all trades made by the user

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

See

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
digifinex.fetchMyTrades (symbol, since?, limit?, 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 digifinex
Returns: object - a ledger structure

See

ParamTypeRequiredDescription
codestringNounified currency code, default is undefined
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
digifinex.fetchLedger (code?, since?, limit?, params?)

fetchDepositAddress

fetch the deposit address for a currency associated with this account

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

ParamTypeRequiredDescription
codestringYesunified currency code
paramsobjectNoextra parameters specific to the exchange API endpoint
digifinex.fetchDepositAddress (code, params?)

fetchDeposits

fetch all deposits made to an account

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

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
digifinex.fetchDeposits (code, since?, limit?, params?)

fetchWithdrawals

fetch all withdrawals made from an account

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

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
digifinex.fetchWithdrawals (code, since?, limit?, params?)

transfer

transfer currency internally between wallets on the same account

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

See

ParamTypeRequiredDescription
codestringYesunified currency code
amountfloatYesamount to transfer
fromAccountstringYes'spot', 'swap', 'margin', 'OTC' - account to transfer from
toAccountstringYes'spot', 'swap', 'margin', 'OTC' - account to transfer to
paramsobjectNoextra parameters specific to the exchange API endpoint
digifinex.transfer (code, amount, fromAccount, toAccount, params?)

withdraw

make a withdrawal

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

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

fetchCrossBorrowRate

fetch the rate of interest to borrow a currency for margin trading

Kind: instance method of digifinex
Returns: object - a borrow rate structure

See: https://docs.digifinex.com/en-ww/spot/v3/rest.html#margin-assets

ParamTypeRequiredDescription
codestringYesunified currency code
paramsobjectNoextra parameters specific to the exchange API endpoint
digifinex.fetchCrossBorrowRate (code, params?)

fetchCrossBorrowRates

fetch the borrow interest rates of all currencies

Kind: instance method of digifinex
Returns: object - a list of borrow rate structures

See: https://docs.digifinex.com/en-ww/spot/v3/rest.html#margin-assets

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
digifinex.fetchCrossBorrowRates (params?)

fetchFundingRate

fetch the current funding rate

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

See: https://docs.digifinex.com/en-ww/swap/v2/rest.html#currentfundingrate

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

fetchFundingInterval

fetch the current funding rate interval

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

See: https://docs.digifinex.com/en-ww/swap/v2/rest.html#currentfundingrate

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

fetchFundingRateHistory

fetches historical funding rate prices

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

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

fetchTradingFee

fetch the trading fees for a market

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

See: https://docs.digifinex.com/en-ww/swap/v2/rest.html#tradingfee

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

fetchPositions

fetch all open positions

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

See

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

fetchPosition

fetch data on a single open contract trade position

Kind: instance method of digifinex
Returns: object - a position structure

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market the position is held in
paramsobjectNoextra parameters specific to the exchange API endpoint
digifinex.fetchPosition (symbol, params?)

setLeverage

set the level of leverage for a market

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

See: https://docs.digifinex.com/en-ww/swap/v2/rest.html#setleverage

ParamTypeRequiredDescription
leveragefloatYesthe rate of leverage
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.marginModestringNoeither 'cross' or 'isolated', default is cross
params.sidestringNoeither 'long' or 'short', required for isolated markets only
digifinex.setLeverage (leverage, symbol, params?)

fetchTransfers

fetch the transfer history, only transfers between spot and swap accounts are supported

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

See: https://docs.digifinex.com/en-ww/swap/v2/rest.html#transferrecord

ParamTypeRequiredDescription
codestringYesunified currency code of the currency transferred
sinceintNothe earliest time in ms to fetch transfers for
limitintNothe maximum number of transfers to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
digifinex.fetchTransfers (code, since?, limit?, params?)

fetchLeverageTiers

retrieve information on the maximum leverage, for different trade sizes

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

See: https://docs.digifinex.com/en-ww/swap/v2/rest.html#instruments

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

fetchMarketLeverageTiers

retrieve information on the maximum leverage, for different trade sizes for a single market

Kind: instance method of digifinex
Returns: object - a leverage tiers structure

See: https://docs.digifinex.com/en-ww/swap/v2/rest.html#instrument

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

fetchDepositWithdrawFees

fetch deposit and withdraw fees

Kind: instance method of digifinex
Returns: object - a list of fee structures

See: https://docs.digifinex.com/en-ww/spot/v3/rest.html#get-currency-deposit-and-withdrawal-information

ParamTypeRequiredDescription
codesArray<string>, undefinedYesnot used by fetchDepositWithdrawFees ()
paramsobjectNoextra parameters specific to the exchange API endpoint
digifinex.fetchDepositWithdrawFees (codes, params?)

addMargin

add margin to a position

Kind: instance method of digifinex
Returns: object - a margin structure

See: https://docs.digifinex.com/en-ww/swap/v2/rest.html#positionmargin

ParamTypeRequiredDescription
symbolstringYesunified market symbol
amountfloatYesamount of margin to add
paramsobjectNoextra parameters specific to the exchange API endpoint
params.sidestringYesthe position side: 'long' or 'short'
digifinex.addMargin (symbol, amount, params?)

reduceMargin

remove margin from a position

Kind: instance method of digifinex
Returns: object - a margin structure

See: https://docs.digifinex.com/en-ww/swap/v2/rest.html#positionmargin

ParamTypeRequiredDescription
symbolstringYesunified market symbol
amountfloatYesthe amount of margin to remove
paramsobjectNoextra parameters specific to the exchange API endpoint
params.sidestringYesthe position side: 'long' or 'short'
digifinex.reduceMargin (symbol, amount, params?)

fetchFundingHistory

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

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

See: https://docs.digifinex.com/en-ww/swap/v2/rest.html#funding-fee

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 funding payment
digifinex.fetchFundingHistory (symbol?, since?, limit?, params?)

setMarginMode

set margin mode to 'cross' or 'isolated'

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

See: https://docs.digifinex.com/en-ww/swap/v2/rest.html#positionmode

ParamTypeRequiredDescription
marginModestringYes'cross' or 'isolated'
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
digifinex.setMarginMode (marginMode, symbol, params?)

On this page