mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-14 08:16:56 +08:00
debug: add logging for Lighter GetActiveOrders API call
This commit is contained in:
@@ -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",
|
endpoint := fmt.Sprintf("%s/api/v1/accountActiveOrders?account_index=%d&market_id=%d",
|
||||||
t.baseURL, t.accountIndex, marketIndex)
|
t.baseURL, t.accountIndex, marketIndex)
|
||||||
|
|
||||||
|
logger.Infof("📋 LIGHTER GetActiveOrders: endpoint=%s", endpoint)
|
||||||
|
|
||||||
// Send GET request
|
// Send GET request
|
||||||
req, err := http.NewRequest("GET", endpoint, nil)
|
req, err := http.NewRequest("GET", endpoint, nil)
|
||||||
if err != 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)
|
return nil, fmt.Errorf("failed to read response: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.Infof("📋 LIGHTER GetActiveOrders raw response: %s", string(body))
|
||||||
|
|
||||||
// Parse response
|
// Parse response
|
||||||
var apiResp struct {
|
var apiResp struct {
|
||||||
Code int `json:"code"`
|
Code int `json:"code"`
|
||||||
|
|||||||
Reference in New Issue
Block a user