Skip to main content

ListLimitOrders

Lists all limit orders within the authenticated group's scope.

Returns the complete set of limit orders accessible to the executing context.

Method Options​

Authorisation specification of the ListLimitOrders method.

TypeMETHOD_TYPE_READ
Access LevelMETHOD_ACCESS_LEVEL_AUTHORISED
Roles
  • ROLE_TRADING_ADMIN
  • ROLE_TRADING_VIEWER
  • ROLE_TRADING_LIMIT_ORDER_ADMIN
  • ROLE_TRADING_LIMIT_ORDER_VIEWER

Parameters​

Request and response parameter message overview:

Input: ListLimitOrdersRequest Message​

FieldTypeRequiredDescription
LiveLedgerData

bool

False

When true, fetches live ledger data for all orders. When false, returns only stored metadata.

Returns: ListLimitOrdersResponse Message​

FieldTypeDescription
LimitOrders

meshtrade.trading.limit_order.v1.LimitOrder[]

Collection of limit orders in the hierarchy.

Code Examples​

Select supported SDK in the language of your choice for a full example of how to invoke the this method:

package main

import (
"context"
"log"

limit_orderv1 "github.com/meshtrade/api/go/trading/limit_order/v1"
)

func main() {
ctx := context.Background()

// Default configuration is used and credentials come from MESH_API_CREDENTIALS
// environment variable or default discovery methods. Zero config required
// unless you want custom configuration.
service, err := limit_orderv1.NewLimitOrderService()
if err != nil {
log.Fatalf("Failed to create service: %v", err)
}
defer service.Close()

// List all limit orders in your group hierarchy
request := &limit_orderv1.ListLimitOrdersRequest{
// Optional: Set to true to enrich with live ledger status (slower)
LiveLedgerData: false,
}

// Call the ListLimitOrders method
response, err := service.ListLimitOrders(ctx, request)
if err != nil {
log.Fatalf("ListLimitOrders failed: %v", err)
}

// Response contains list of limit orders
log.Printf("✓ Listed %d limit orders:", len(response.LimitOrders))
for i, order := range response.LimitOrders {
log.Printf("\n Order #%d:", i+1)
log.Printf(" Resource name: %s", order.Name)
log.Printf(" Account: %s", order.Account)
log.Printf(" External ref: %s", order.ExternalReference)
log.Printf(" Side: %s", order.Side)
log.Printf(" Limit price: %s %s", order.LimitPrice.Value.Value, order.LimitPrice.Token.Code)
log.Printf(" Quantity: %s %s", order.Quantity.Value.Value, order.Quantity.Token.Code)
log.Printf(" State: %s", order.State)
}
}

Advanced Configuration​

For advanced client configuration options (custom endpoints, TLS settings, timeouts), see the SDK Configuration Guide.

Other Methods​