digifinex
digifinex cryptocurrency exchange — CCXT unified API: methods, parameters and endpoints.
digifinex
Kind: global class
Extends: Exchange
- fetchCurrencies
- fetchMarkets
- fetchBalance
- fetchOrderBook
- fetchTickers
- fetchTicker
- fetchTime
- fetchStatus
- fetchTrades
- fetchOHLCV
- createOrder
- createOrders
- createMarketBuyOrderWithCost
- cancelOrder
- cancelOrders
- fetchOpenOrders
- fetchOrders
- fetchOrder
- fetchMyTrades
- fetchLedger
- fetchDepositAddress
- fetchDeposits
- fetchWithdrawals
- transfer
- withdraw
- fetchCrossBorrowRate
- fetchCrossBorrowRates
- fetchFundingRate
- fetchFundingInterval
- fetchFundingRateHistory
- fetchTradingFee
- fetchPositions
- fetchPosition
- setLeverage
- fetchTransfers
- fetchLeverageTiers
- fetchMarketLeverageTiers
- fetchDepositWithdrawFees
- addMargin
- reduceMargin
- fetchFundingHistory
- setMarginMode
fetchCurrencies
fetches all available currencies on an exchange
Kind: instance method of digifinex
Returns: object - an associative dictionary of currencies
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra 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
- https://docs.digifinex.com/en-ww/spot/v3/rest.html#spot-account-assets
- https://docs.digifinex.com/en-ww/spot/v3/rest.html#margin-assets
- https://docs.digifinex.com/en-ww/swap/v2/rest.html#accountbalance
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra 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
- https://docs.digifinex.com/en-ww/spot/v3/rest.html#get-orderbook
- https://docs.digifinex.com/en-ww/swap/v2/rest.html#orderbook
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the order book for |
| limit | int | No | the maximum amount of order book entries to return |
| params | object | No | extra 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
- https://docs.digifinex.com/en-ww/spot/v3/rest.html#ticker-price
- https://docs.digifinex.com/en-ww/swap/v2/rest.html#tickers
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string>, undefined | Yes | unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned |
| params | object | No | extra 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
- https://docs.digifinex.com/en-ww/spot/v3/rest.html#ticker-price
- https://docs.digifinex.com/en-ww/swap/v2/rest.html#ticker
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the ticker for |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra 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
- https://docs.digifinex.com/en-ww/spot/v3/rest.html#get-recent-trades
- https://docs.digifinex.com/en-ww/swap/v2/rest.html#recenttrades
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch trades for |
| since | int | No | timestamp in ms of the earliest trade to fetch |
| limit | int | No | the maximum amount of trades to fetch |
| params | object | No | extra 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
- https://docs.digifinex.com/en-ww/spot/v3/rest.html#get-candles-data
- https://docs.digifinex.com/en-ww/swap/v2/rest.html#recentcandle
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | string | Yes | the length of time each candle represents |
| since | int | No | timestamp in ms of the earliest candle to fetch |
| limit | int | No | the maximum amount of candles to fetch |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | timestamp 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
- https://docs.digifinex.com/en-ww/spot/v3/rest.html#create-new-order
- https://docs.digifinex.com/en-ww/swap/v2/rest.html#orderplace
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to create an order in |
| type | string | Yes | 'market' or 'limit' |
| side | string | Yes | 'buy' or 'sell' |
| amount | float | Yes | how much you want to trade in units of the base currency, spot market orders use the quote currency, swap requires the number of contracts |
| price | float | No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.timeInForce | string | No | "GTC", "IOC", "FOK", or "PO" |
| params.postOnly | bool | No | true or false |
| params.reduceOnly | bool | No | true or false |
| params.marginMode | string | No | 'cross' or 'isolated', for spot margin trading |
| params.cost | float | No | spot 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
- https://docs.digifinex.com/en-ww/spot/v3/rest.html#create-multiple-order
- https://docs.digifinex.com/en-ww/swap/v2/rest.html#batchorder
| Param | Type | Required | Description |
|---|---|---|---|
| orders | Array | Yes | list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to create an order in |
| cost | float | Yes | how much you want to trade in units of the quote currency |
| params | object | No | extra 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
- https://docs.digifinex.com/en-ww/spot/v3/rest.html#cancel-order
- https://docs.digifinex.com/en-ww/swap/v2/rest.html#cancelorder
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | order id |
| symbol | string | Yes | not used by digifinex cancelOrder () |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| ids | Array<string> | Yes | order ids |
| symbol | string | Yes | not used by digifinex cancelOrders () |
| params | object | No | extra 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
- https://docs.digifinex.com/en-ww/spot/v3/rest.html#current-active-orders
- https://docs.digifinex.com/en-ww/swap/v2/rest.html#openorder
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| since | int | No | the earliest time in ms to fetch open orders for |
| limit | int | No | the maximum number of open orders structures to retrieve |
| params | object | No | extra 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
- https://docs.digifinex.com/en-ww/spot/v3/rest.html#get-all-orders-including-history-orders
- https://docs.digifinex.com/en-ww/swap/v2/rest.html#historyorder
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol of the market orders were made in |
| since | int | No | the earliest time in ms to fetch orders for |
| limit | int | No | the maximum number of order structures to retrieve |
| params | object | No | extra 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
- https://docs.digifinex.com/en-ww/spot/v3/rest.html#get-order-status
- https://docs.digifinex.com/en-ww/swap/v2/rest.html#orderinfo
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | order id |
| symbol | string | Yes | unified symbol of the market the order was made in |
| params | object | No | extra 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
- https://docs.digifinex.com/en-ww/spot/v3/rest.html#customer-39-s-trades
- https://docs.digifinex.com/en-ww/swap/v2/rest.html#historytrade
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| since | int | No | the earliest time in ms to fetch trades for |
| limit | int | No | the maximum number of trades structures to retrieve |
| params | object | No | extra 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
- https://docs.digifinex.com/en-ww/spot/v3/rest.html#spot-margin-otc-financial-logs
- https://docs.digifinex.com/en-ww/swap/v2/rest.html#bills
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | No | unified currency code, default is undefined |
| since | int | No | timestamp in ms of the earliest ledger entry, default is undefined |
| limit | int | No | max number of ledger entries to return, default is undefined |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| since | int | No | the earliest time in ms to fetch deposits for |
| limit | int | No | the maximum number of deposits structures to retrieve |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| since | int | No | the earliest time in ms to fetch withdrawals for |
| limit | int | No | the maximum number of withdrawals structures to retrieve |
| params | object | No | extra 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
- https://docs.digifinex.com/en-ww/spot/v3/rest.html#transfer-assets-among-accounts
- https://docs.digifinex.com/en-ww/swap/v2/rest.html#accounttransfer
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| amount | float | Yes | amount to transfer |
| fromAccount | string | Yes | 'spot', 'swap', 'margin', 'OTC' - account to transfer from |
| toAccount | string | Yes | 'spot', 'swap', 'margin', 'OTC' - account to transfer to |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| amount | float | Yes | the amount to withdraw |
| address | string | Yes | the address to withdraw to |
| tag | string | Yes | |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the funding rate history for |
| since | int | No | timestamp in ms of the earliest funding rate to fetch |
| limit | int | No | the maximum amount of funding rate structures to fetch |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra 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
- https://docs.digifinex.com/en-ww/spot/v3/rest.html#margin-positions
- https://docs.digifinex.com/en-ww/swap/v2/rest.html#positions
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string>, undefined | Yes | list of unified market symbols |
| params | object | No | extra 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
- https://docs.digifinex.com/en-ww/spot/v3/rest.html#margin-positions
- https://docs.digifinex.com/en-ww/swap/v2/rest.html#positions
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol of the market the position is held in |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| leverage | float | Yes | the rate of leverage |
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.marginMode | string | No | either 'cross' or 'isolated', default is cross |
| params.side | string | No | either '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
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code of the currency transferred |
| since | int | No | the earliest time in ms to fetch transfers for |
| limit | int | No | the maximum number of transfers to retrieve |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string>, undefined | Yes | a list of unified market symbols |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| codes | Array<string>, undefined | Yes | not used by fetchDepositWithdrawFees () |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| amount | float | Yes | amount of margin to add |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.side | string | Yes | the 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| amount | float | Yes | the amount of margin to remove |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.side | string | Yes | the 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | unified market symbol |
| since | int | No | the earliest time in ms to fetch funding history for |
| limit | int | No | the maximum number of funding history structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | timestamp 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
| Param | Type | Required | Description |
|---|---|---|---|
| marginMode | string | Yes | 'cross' or 'isolated' |
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
digifinex.setMarginMode (marginMode, symbol, params?)