Skip to main content

Module types

Module types 

Source

Structs§

ADL
Unified auto-deleveraging rank (fetchADLRank, fetchPositionADLRank, and each row of fetchPositionsADLRank). Mirrors the TS ADL interface.
Account
One sub-account / wallet entry (each row of fetchAccounts). Mirrors the TS Account interface.
Balances
Unified balance / account info.
BorrowInterest
Unified borrow-interest record (margin interest accrued on a borrow). Distinct from BorrowRate — it carries accrued interest and the borrowed amount, not a periodic rate (review #7: fetchBorrowInterest was wrongly mapped to BorrowRate).
BorrowRate
Unified borrow / lending rate.
Conversion
Unified currency-conversion record (fetchConvertQuote, createConvertTrade, fetchConvertTrade, and each row of fetchConvertTradeHistory). Mirrors the TS Conversion interface.
Currency
Unified currency descriptor.
DepositAddress
Unified deposit address.
DepositWithdrawFee
Unified deposit/withdraw fee for one currency (fetchDepositWithdrawFee, and each value of fetchDepositWithdrawFees). Mirrors the TS DepositWithdrawFee interface: a currency-level withdraw/deposit pair plus the same pair per network under networks.
DepositWithdrawFeeLeg
One leg of a DepositWithdrawFee — the fee for a deposit or a withdrawal, and whether it is a percentage of the amount (vs. a flat fee). Mirrors the TS DepositWithdrawFeeNetwork interface.
DepositWithdrawFeeNetwork
Per-network withdraw/deposit legs inside DepositWithdrawFee::networks.
Fee
A single trading-fee descriptor (per currency or per side).
FundingHistory
One funding payment made or received (each row of fetchFundingHistory). Mirrors the TS FundingHistory interface.
FundingRate
Unified funding rate. Mirrors the TS FundingRate interface.
FundingRateHistory
One historical funding-rate sample (each row of fetchFundingRateHistory). Mirrors the TS FundingRateHistory interface. Distinct from FundingRate, which is the live snapshot with next/previous rates.
Greeks
Unified greeks (options). Mirrors the TS Greeks interface.
IsolatedBorrowRate
Unified isolated-margin borrow rate — one entry per symbol with a rate for each leg (fetchIsolatedBorrowRate, and each value of fetchIsolatedBorrowRates). Mirrors the TS IsolatedBorrowRate interface. Distinct from BorrowRate (cross-margin, single currency/rate), whose decoder would leave every field of an isolated rate None.
LastPrice
Last traded price per symbol (each value of fetchLastPrices). Mirrors the TS LastPrice interface.
LedgerEntry
Unified ledger entry. Mirrors the TS LedgerEntry interface.
Leverage
Unified leverage per symbol.
LeverageTier
One bracket in a leverage-tier ladder.
Liquidation
Unified liquidation record.
LongShortRatio
Unified long/short ratio (fetchLongShortRatio, and each row of fetchLongShortRatioHistory). Mirrors the TS LongShortRatio interface.
MarginLoan
Unified margin borrow/repay receipt returned by borrowCrossMargin, borrowIsolatedMargin, repayCrossMargin and repayIsolatedMargin. Mirrors the TS MarginLoan interface (ts/src/base/types.ts): every venue’s parseMarginLoan emits exactly id/currency/amount/symbol/ timestamp/datetime (+ info).
MarginMode
Unified margin mode per symbol.
MarginModification
Unified margin modification — the result of addMargin / reduceMargin / setMargin, and each row of fetchMarginAdjustmentHistory. Mirrors the TS MarginModification interface (ts/src/base/types.ts).
Market
A unified market / symbol descriptor.
MarketLimits
A market’s declared order limits. Check these before sending an order — it costs no request and no rate-limit weight.
MarketPrecision
A market’s tick/step sizes.
MinMax
A { min, max } bound from a market’s limits block. Either side may be absent when the venue does not declare it.
OpenInterest
Unified open-interest snapshot.
OptionContract
Unified option-contract snapshot (fetchOption, and each value of fetchOptionChain). Named OptionContract because Option collides with core::option::Option. Mirrors the TS Option interface.
Order
A unified order. Mirrors the TS Order interface.
OrderBook
A unified order-book snapshot.
OrderBookL3
A unified level-3 (per-order, non-aggregated) order-book snapshot.
OrderBookL3Entry
One level-3 (per-order) book entry: [price, amount, orderId].
Position
Unified position (derivatives). Mirrors the TS Position interface.
PositionModeInfo
Position-mode flag (fetchPositionMode). Mirrors the TS PositionModeInfo interface: hedged is true for hedge (dual-side) mode, false for one-way.
Status
Exchange-wide status snapshot.
Ticker
A unified ticker. Mirrors the TS Ticker interface (ts/src/base/types.ts).
Trade
A unified trade record. Mirrors the TS Trade interface.
TradingFee
Unified trading-fee descriptor (per-symbol maker / taker).
Transaction
Unified transaction (deposit / withdrawal). Mirrors the TS Transaction interface.
Transfer
Unified transfer record.

Enums§

DefaultSubType
TS DefaultSubType — options.defaultSubType.
DefaultType
TS DefaultType — options.defaultType.

Functions§

dict_from_value
Walk a Value::Dict of <key> → Value and decode each value with the supplied from_value constructor. Returns an empty map on a non-dict input — matches the lenient fallback semantics of the individual from_value impls.
vec_from_value
Walk a Value::Arr and decode each element with the supplied from_value constructor.

Type Aliases§

AllGreeks
fetchAllGreeks — symbol → Greeks.
CrossBorrowRates
fetchCrossBorrowRates — currency code → BorrowRate.
Currencies
DepositAddresses
fetchDepositAddresses — currency code → DepositAddress.
DepositWithdrawFees
fetchDepositWithdrawFees — currency code → DepositWithdrawFee.
FundingRates
IsolatedBorrowRates
fetchIsolatedBorrowRates — symbol → IsolatedBorrowRate.
LastPrices
fetchLastPrices — symbol → LastPrice.
LeverageTiers
fetchLeverageTiers — symbol → its ladder of LeverageTiers.
Leverages
MarginModes
Markets
OHLCV
A unified OHLCV candle: [timestamp, open, high, low, close, volume].
OpenInterests
OptionChain
fetchOptionChain — symbol → OptionContract.
OrderBooks
Tickers
TradingFees