solana-orderbook: account orders endpoint - #4876
Conversation
|
Reminder: Please consider backward compatibility when modifying the API specification.
Caused by: |
|
Claude finished @squadgazzz's task in 1m 41s —— View job PR Review: account orders endpoint
Overall: Clean, well-scoped PR that mirrors the EVM endpoint closely. The DB query rides the One non-blocking parity note posted inline:
Nothing blocking from my side. |
| return Err(error::reply( | ||
| StatusCode::BAD_REQUEST, | ||
| "LIMIT_OUT_OF_BOUNDS", | ||
| "The pagination limit is [1,1000].", |
There was a problem hiding this comment.
this could reference the constants to never go out of sync with them.
a234509 to
ec0d658
Compare
Description
Front-end requested to implement the
GET /api/v1/account/{owner}/ordersendpoint already for the demo. The Solana version serves the same shape: one owner's orders with their fill state, newest first,offset/limitpagination with the EVM defaults and bounds, and the verbatimLIMIT_OUT_OF_BOUNDSrejection.Deliberate differences: the owner is a base58 public key (
InvalidOwnerin the API's error shape on a malformed one), and each order carries the fill state fromsolana.order_pda, same as the single-order endpoint. The query rides the existingsolana_orders_user_creationindex.Changes
GET /api/v1/account/{owner}/orderswith EVM pagination semanticsorders_by_ownerread in the db layer, newest first with the fill-state joinHow to test
New ignored postgres test for the pagination and a unit test for the parameter rejections.
Related issues
BE-259