debug: add logging for Lighter GetActiveOrders API call

This commit is contained in:
tinkle-community
2026-01-13 13:24:57 +08:00
parent 2fcbdbab36
commit ef91bec2dd

View File

@@ -214,6 +214,8 @@ func (t *LighterTraderV2) GetActiveOrders(symbol string) ([]OrderResponse, error
endpoint := fmt.Sprintf("%s/api/v1/accountActiveOrders?account_index=%d&market_id=%d",
t.baseURL, t.accountIndex, marketIndex)
logger.Infof("📋 LIGHTER GetActiveOrders: endpoint=%s", endpoint)
// Send GET request
req, err := http.NewRequest("GET", endpoint, nil)
if err != nil {
@@ -235,6 +237,8 @@ func (t *LighterTraderV2) GetActiveOrders(symbol string) ([]OrderResponse, error
return nil, fmt.Errorf("failed to read response: %w", err)
}
logger.Infof("📋 LIGHTER GetActiveOrders raw response: %s", string(body))
// Parse response
var apiResp struct {
Code int `json:"code"`