Skip to content
All library documents

OKEx Futures Framework for Contract Setup and Order Monitoring

Article Strategy library · Author: 区班量化

Summary

This document is a beginner-oriented example of working with OKEx futures through a trading framework. It demonstrates setting a quarterly contract and leverage, retrieving account and market data, placing an initial order, and inspecting open orders and positions. The accompanying parameters cover polling frequency, a 30-minute bar lookback, and an initial position ratio; the text also notes that an ETH contract has a stated dollar value per contract.

The example calculates a midpoint from recent highs and lows, but it does not use that value to define a complete entry or exit strategy. Its initial-order section contains repeated buy operations, while the position-closing logic is commented out, so it is best read as an interface and order-management illustration rather than a finished trading method. Published backtest settings specify ETH-USDT on OKEx over part of 2019, but no results are given. Contract specifications and exchange interfaces can change, and the sample does not provide comprehensive exposure or execution safeguards.

Key ideas

  • The example shows how to select a quarterly futures contract and set leverage.
  • It retrieves account, ticker, order, and position information through the framework.
  • Recent bar highs and lows are used to calculate a midpoint reference.
  • The sample does not implement a complete trading signal or active position-closing logic.
  • Backtest configuration is provided without performance results.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.