Expand description
Data transfer objects for deserializing OKX HTTP API payloads.
Re-exports§
pub use crate::common::models::OKXAttachedAlgoOrd;
Structs§
- OKXAccount
- Represents an account balance snapshot from
GET /api/v5/account/balance. - OKXAmend
Algo Order Request - Represents the request body for
POST /api/v5/trade/amend-algos(amend algo order). - OKXAmend
Algo Order Response - Represents the response from
POST /api/v5/trade/amend-algos(amend algo order). - OKXAttach
Algo OrdRequest - Represents an attached TP/SL instruction on
POST /api/v5/trade/order. - OKXBalance
Detail - Represents a balance detail for a single currency in an OKX account.
- OKXCancel
Algo Order Request - Represents the request body for
POST /api/v5/trade/cancel-algos(cancel algo order). - OKXCancel
Algo Order Response - Represents the response from
POST /api/v5/trade/cancel-algos(cancel algo order). - OKXCandlestick
- Represents a candlestick from the GET /api/v5/market/history-candles endpoint. The tuple contains [timestamp(ms), open, high, low, close, volume, turnover, base_volume, count].
- OKXFee
Rate - Represents a fee rate entry from
GET /api/v5/account/trade-fee. - OKXFunding
Rate History - Represents a funding rate history entry from the GET /api/v5/public/funding-rate-history endpoint.
- OKXIndex
Ticker - Represents an index price from the GET /api/v5/public/index-tickers endpoint.
- OKXMark
Price - Represents a mark price from the GET /api/v5/public/mark-price endpoint.
- OKXOption
Summary - Represents an option summary row from the GET /api/v5/public/opt-summary endpoint.
- OKXOrder
Algo - Represents an algo order response from
/trade/order-algo-*endpoints. - OKXOrder
Book Snapshot - Represents an order book snapshot from the GET /api/v5/market/books endpoint.
- OKXOrder
History - Represents a single historical order record from
GET /api/v5/trade/orders-history. - OKXPlace
Algo Order Request - Represents the request body for
POST /api/v5/trade/order-algo(place algo order). - OKXPlace
Algo Order Response - Represents the response from
POST /api/v5/trade/order-algo(place algo order). - OKXPlace
Order Request - Represents the request body for
POST /api/v5/trade/order(place order). - OKXPlace
Order Response - Represents the response from
POST /api/v5/trade/order(place order). This model is designed to be flexible and handle the minimal fields that the API returns. - OKXPosition
- Represents a single open position from
GET /api/v5/account/positions. - OKXPosition
History - Represents a single historical position record from
GET /api/v5/account/positions-history. - OKXPosition
Tier - Represents a position tier from the GET /api/v5/public/position-tiers endpoint.
- OKXServer
Time - Represents the response from
GET /api/v5/public/time(get system time). - OKXTrade
- Represents a trade tick from the GET /api/v5/market/trades endpoint.
- OKXTransaction
Detail - Represents a transaction detail (fill) from
GET /api/v5/trade/fills.
Type Aliases§
- OKXOrder
Book Level - Represents an order book level from the GET /api/v5/market/books endpoint. Each entry is a 4-element tuple: [price, size, liquidated_orders, num_orders].