Skip to content
All library documents

Diagnosing Invalid Order Quantity Errors in VeighNa

Article vn.py community

Summary

This forum exchange investigates a VeighNa futures order rejected with error 1007 for an invalid quantity. The logged requests show a one-contract close-today order alongside an open order with zero volume, even though the user expected to submit only a close instruction. A respondent suggests checking whether the strategy’s send_order call uses its lock or net parameter, and the original poster later reports that the problem came from their own code and was resolved.

The exchange points to inspecting the actual requests sent to the gateway, especially quantity and order-splitting behavior, when an order rejection seems inconsistent with the strategy’s intent. It does not identify the precise code defect or document a general fix; the resolution is only briefly confirmed. Treat the lock/net suggestion as a debugging lead rather than a complete diagnosis, and verify order quantities and offsets in the application’s logs.

Key ideas

  • Inspect logged order requests to find quantities and offsets that differ from the strategy’s intent.
  • A rejected order may be accompanied by a separate request with zero volume.
  • The discussion suggests checking the send_order lock or net settings.
  • The poster reports a code issue was fixed but does not share the specific correction.

Tags

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