36 KiB
digifinex{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{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 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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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{docsify-ignore}
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])