Commit 6e4e841
Fix limit order API examples and documentation (#116)
* SDK fixes and examples
* fix(docs): Correct limit order API examples and documentation
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 <[email protected]>
---------
Co-authored-by: Bernard Bussy <[email protected]>
Co-authored-by: Claude <[email protected]>1 parent e24dec8 commit 6e4e841
File tree
24 files changed
+881
-121
lines changed- docs/docs/api-reference/trading/limit_order/v1
- service
- cancel-limit-order
- create-limit-order
- get-limit-order-by-external-reference
- get-limit-order
- list-limit-orders
- monitor-limit-order
- search-limit-orders
- go/trading/limit_order/v1
- proto/meshtrade/trading/limit_order/v1
24 files changed
+881
-121
lines changedLines changed: 93 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
33 | | - | |
34 | | - | |
35 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
36 | 57 | | |
37 | 58 | | |
38 | 59 | | |
39 | | - | |
40 | | - | |
41 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
42 | 64 | | |
43 | 65 | | |
44 | 66 | | |
45 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
46 | 119 | | |
47 | 120 | | |
48 | 121 | | |
49 | | - | |
50 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
Lines changed: 42 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | | - | |
| 27 | + | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
28 | | - | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
33 | | - | |
34 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
35 | 72 | | |
Lines changed: 41 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | | - | |
| 5 | + | |
4 | 6 | | |
| 7 | + | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
| |||
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
13 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
14 | 20 | | |
15 | | - | |
| 21 | + | |
16 | 22 | | |
17 | 23 | | |
18 | 24 | | |
19 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
20 | 53 | | |
21 | | - | |
22 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
23 | 58 | | |
24 | 59 | | |
25 | 60 | | |
| |||
Lines changed: 30 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
15 | 20 | | |
16 | | - | |
| 21 | + | |
17 | 22 | | |
18 | 23 | | |
19 | 24 | | |
20 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
21 | 45 | | |
22 | | - | |
23 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
24 | 49 | | |
25 | 50 | | |
26 | 51 | | |
| |||
0 commit comments