Skip to content
All library documents

Testing Deribit Options Orders and Market Data in a Sandbox

Article Strategy library · Author: 发明者量化-小小梦

Summary

This document demonstrates basic interaction with Deribit options through a test environment. It selects a BTC put contract, clears existing orders, and retrieves account, ticker, order book, trade, candle, and position data. It then places a limit order, checks its status, cancels it, and submits another order intended to execute against the market before attempting to close the resulting position.

The material is an operational API example rather than a tested trading strategy: it gives no performance results or evidence that the order sequence will work reliably. The example uses a historical contract and fixed order parameters, and its order execution and position assumptions may depend on market conditions and platform behavior. It is explicitly configured for Deribit’s test environment; adapting it for live trading requires changing that endpoint and handling live execution risks.

Key ideas

  • The example shows how to select an options contract and query account and market data through Deribit.
  • It demonstrates cancelling open orders, submitting an order, checking its status, and retrieving positions.
  • A second order uses the quoted bid or ask to attempt execution, followed by a position-closing order.
  • The code is a connectivity and order-flow test, not evidence of a profitable strategy.

Tags

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