Built-in Functions
Structures
Built-in Variables and Constants
Conventions
Exchanges
Futures
Set contract trading parameters and query positions: contract code, open/close direction, leverage, positions and funding rates. They apply to futures exchange objects only.
Usually select the contract with exchange.SetContractType first (or write the full symbol in a function's symbol argument, see Symbols), then trade and query positions. The contract codes, margin modes and position modes of each exchange are on its exchange page.
In this sectionRead the whole section
| Name | Description |
| exchange.SetContractType | Sets the current contract code of the exchange object. |
| exchange.GetContractType | Gets the contract code currently set for the exchange object. |
| exchange.SetDirection | Sets the order direction when calling the exchange.Buy function or exchange.Sell function to place futures contract orders. |
| exchange.SetMarginLevel | Sets the leverage value for the trading pair or contract specified by the symbol parameter. |
| exchange.GetPositions | Gets position information. |
| exchange.GetFundings | Obtains the funding rate data for the current period. |