Skip to content

Conversation

@LawrenceMarsman
Copy link
Contributor

@LawrenceMarsman LawrenceMarsman commented Nov 19, 2025

Summary

Fixes critical inaccuracies in limit order API examples and documentation across all languages (Go, Python, Java).

Changes

API Example Corrections

All Languages (Go, Python, Java):

  • Fixed resource name format: limit_orders/{id} (not nested under groups/accounts)
  • Added required owner field to CreateLimitOrder
  • Removed invalid pagination fields from ListLimitOrders and SearchLimitOrders
    • No page_size, page_token, or next_page_token (these don't exist in protobuf)
  • Fixed SearchLimitOrders filters to only use: token, account, live_ledger_data
  • Fixed MonitorLimitOrder to use oneof identifier (name OR external_reference)
  • Corrected CancelLimitOrder return type (returns LimitOrder, not response wrapper)
  • Fixed status enums: LIMIT_ORDER_STATUS_COMPLETE (not FILLED or PARTIALLY_FILLED)

Go-specific:

  • Added missing type_v1 import to create example

Enhanced Monitoring Patterns

monitor-limit-order examples:

  • Handle all 7 limit order states with proper transitions
  • Use labeled breaks (monitorOrder:) for clean exit
  • Show transient states: SUBMISSION_IN_PROGRESS, COMPLETE_IN_PROGRESS, CANCELLATION_IN_PROGRESS

create-limit-order examples:

  • Monitor order after creation until it reaches OPEN status
  • Handle SUBMISSION_FAILED with error
  • Show complete workflow from creation to active order

cancel-limit-order examples:

  • Monitor order after cancellation until it reaches CANCELLED status
  • Track CANCELLATION_IN_PROGRESSCANCELLED transition
  • Confirm completion on ledger

Documentation Fixes (index.mdx)

  • Corrected resource naming section (flat format, not nested hierarchy)
  • Fixed all status enum references throughout
  • Removed incorrect pagination documentation
  • Clarified MonitorLimitOrder uses oneof (not multiple filters)
  • Added comprehensive list of all 7 order states
  • Updated create workflow to include required owner field and monitoring

Verification

All changes verified against protobuf definitions:

  • proto/meshtrade/trading/limit_order/v1/service.proto
  • proto/meshtrade/trading/limit_order/v1/limit_order.proto

Test Plan

  • Reviewed all 21 example files (7 endpoints × 3 languages)
  • Verified field names against protobuf definitions
  • Confirmed status enum values match LimitOrderStatus enum
  • Validated resource name formats
  • Checked monitoring patterns follow production examples

Files Modified

  • 19 files: 348 insertions, 175 deletions
  • 6 example endpoints × 3 languages = 18 example files
  • 1 service documentation file (index.mdx)

🤖 Generated with Claude Code

LawrenceMarsman and others added 3 commits November 19, 2025 14:39
Fix multiple inaccuracies across all limit order API examples (Go, Python, Java) and service documentation:

API Example Corrections:
- Add missing type_v1 import to Go create example
- Fix resource name format from nested to flat (limit_orders/{id})
- Remove invalid pagination fields (page_size, page_token, next_page_token) from list/search
- Remove invalid external_reference filter from SearchLimitOrders
- Fix MonitorLimitOrder to use oneof identifier (name OR external_reference)
- Correct return type for CancelLimitOrder (returns LimitOrder, not response wrapper)
- Add required owner field to CreateLimitOrder examples
- Replace non-existent status enums (FILLED, PARTIALLY_FILLED) with correct ones (COMPLETE)

Enhanced Examples with State Monitoring:
- Update monitor examples to handle all 7 limit order states
- Add monitoring to create examples until order reaches OPEN status
- Add monitoring to cancel examples until order reaches CANCELLED status
- Show proper handling of transient states (SUBMISSION_IN_PROGRESS, CANCELLATION_IN_PROGRESS, etc.)
- Use labeled breaks for clean monitoring loop exits

Documentation Fixes (index.mdx):
- Correct resource naming from nested hierarchy to flat format
- Fix status enum names throughout (COMPLETE not FILLED)
- Remove references to non-existent pagination in SearchLimitOrders
- Clarify MonitorLimitOrder request structure (oneof, not filters)
- Add all 7 order states to status documentation
- Include owner field requirement in create workflow

All changes verified against protobuf definitions in proto/meshtrade/trading/limit_order/v1/

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@BRBussy BRBussy changed the title SDK fixes and examples Fix limit order API examples and documentation Nov 19, 2025
@BRBussy BRBussy merged commit 6e4e841 into master Nov 19, 2025
@BRBussy BRBussy deleted the limit_order_API_examples_and_fixes branch November 19, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants