Type/to search
Built-in Functions
Structures
Built-in Variables and Constants
Conventions
Exchanges
Capability Matrix
Centralized Exchanges
AscendEx
Backpack
BigONE
Binance
Bitfinex
bitFlyer
Bitget
Bithumb
Bitstamp
Bybit
Coincheck
Coinone
CoinW
Crypto.com
DeepCoin
Deribit
DigiFinex
Gate
Gemini
HashKey
HitBTC
HTX
Korbit
Kraken
KuCoin
LBank
MEXC
OKX
Poloniex
Upbit
WEEX
WOO X
Zaif
Decentralized Exchanges (DEX)
Prediction Markets
Securities and Futures
On-chain & Custom

DigiFinex (Spot): DigiFinex spot trading over the REST endpoints of DigiFinex OpenAPI v3 (openapi.digifinex.com); private endpoints need an API key (Access Key and Secret Key). Spot only, with no simulated trading; use Futures_DigiFinex for perpetual contracts.

Futures_DigiFinex (Futures): DigiFinex perpetual contracts over the REST endpoints of the DigiFinex futures API (/swap/v2): USDⓈ-margined (e.g. BTC_USDT.swap) and coin-margined inverse contracts (e.g. BTC_USD.swap), with no delivery contracts. Private endpoints need an API key (Access Key and Secret Key); check Simulate to use DigiFinex futures simulated trading.

Names and Configuration
exchange.GetName()Type
DigiFinexSpot
Futures_DigiFinexFutures

✓ marks the exchange objects that have the field.

FieldDigiFinexFutures_DigiFinexRequiredDefault
Access Key✓✓Yes—
Secret Key✓✓Yes—
Simulate✓NoUnchecked

Trading Pairs and Contract Codes
DigiFinex (Spot)

Pair examples: BTC_USDT, ETH_USDT

Trading pairs are written BTC_USDT, matching the DigiFinex native code btc_usdt (lower case). This exchange object trades spot only; symbols with a contract suffix are rejected; use Futures_DigiFinex for perpetual contracts.

Futures_DigiFinex (Futures)

Pair examples: BTC_USDT, BTC_USD

The quote currency selects the contract family: BTC_USDT is USDⓈ-margined (native code BTCUSDTPERP), BTC_USD is a coin-margined inverse contract (native code BTCPERP).

Contract codeDescription
swapPerpetual contract, available as USDⓈ-margined and coin-margined.

DigiFinex lists perpetual contracts only; other contract codes are rejected. Order amounts are in contracts; the size per contract is CtVal in exchange.GetMarkets() (unit in CtValCcy).

Exchange-specific IO Commands
DigiFinex (Spot)
CommandArgumentsDescriptionReturns
apimethod, path[, params[, raw]]Call a DigiFinex endpoint directly; path may be a full URL. (more below the table)The whole exchange response; an error is raised when the response code is not 0.

The rest of the longer descriptions in the table:

  • api: Requests are signed by default, with GET parameters in the query string and POST parameters as a form body; with the sign argument set to false the request is unsigned, which only works for GET. raw is not a request body but a parameter table (a JSON object) that replaces params entirely when non-empty and is signed as usual; object or array values are JSON-encoded into a single field.

For the common commands base and currency see exchange.IO.

Futures_DigiFinex (Futures)
CommandArgumentsDescriptionReturns
simulateboolSwitch between simulated (true) and live (false) trading; only changes the local setting. After switching, the ticker list (exchange.GetTickers()), contract list, account balance and position queries carry the simulated-trading parameter (type=1); orders, cancels and other endpoints do not.Null on success.
crossbool[, symbol]Cross (true) / isolated (false) margin, sent to the exchange per contract; applies to the current contract when no symbol is given.The value that was set (false when switching to isolated); null when the exchange rejects it.
apimethod, path[, params[, raw]]Call a DigiFinex futures endpoint directly; only GET and POST are supported, and path starts with / or is a full URL. (more below the table)The whole exchange response (with code and data); an error is raised when the response code is not 0.

The rest of the longer descriptions in the table:

  • api: Requests are signed by default, with GET parameters in the query string and POST parameters as a JSON body; with the sign argument set to false the request is unsigned, which only works for GET. raw is not a request body but a parameter table (a JSON object or "a=1&b=2") that replaces params entirely when non-empty and is signed as usual.

For the common commands base and currency see exchange.IO.

Function Support

Not supported (the call fails with an error and returns null): exchange.ModifyOrder, exchange.CreateConditionOrder, exchange.ModifyConditionOrder, exchange.CancelConditionOrder, exchange.GetConditionOrder, exchange.GetConditionOrders, exchange.GetHistoryConditionOrders.

Served through a fallback:

  • exchange.GetRecords: Native periods are 1m, 5m, 15m, 30m, 1h, 4h, 12h, 1d, 1w; other periods are synthesized by the docker.

Margin, Account and Simulation
Futures_DigiFinex (Futures)

Margin mode: Switch cross/isolated margin per contract with exchange.IO("cross", bool); it fails when the exchange's acknowledgement does not match the request. exchange.SetMarginLevel() sets leverage per contract and needs no extra arguments: cross-margin or one-way accounts are set in one request; isolated accounts in hedge mode need leverage per side, so when the exchange reports a position mode error the connector adds the margin mode and sets the same leverage on both the long and the short side (it fails if either side fails, and the error names the side that was already set). The margin mode it adds is the one exchange.IO("cross", bool) set for that contract during this run, or isolated when it was not set. The direction set by exchange.SetDirection() does not affect leverage.

Position mode: There is no command for switching the position mode (exchange.IO("dual", ...) reports it as unsupported). Orders use the four direction codes open long, open short, close long and close short, following the direction set by exchange.SetDirection().

Simulation: Check the Simulate box when adding the exchange to use DigiFinex futures simulated trading; exchange.IO("simulate", true) still switches at run time for older strategies. Simulated trading only affects the ticker list, contract list, account balance and position queries (they carry type=1).

Notes
DigiFinex (Spot)

DigiFinex spot has no simulated environment and its configuration has no Simulate option; only futures (Futures_DigiFinex) support simulated trading.

Futures_DigiFinex (Futures)
  • Batch funding rate queries are not supported: exchange.GetFundings() requires a concrete perpetual contract (for example BTC_USDT.swap) and fails when it is omitted or given a range (such as USDT.swap).