Skip to main content
GET
/
agents
/
{agentId}
/
closed-positions
Agent closed positions
curl --request GET \
  --url https://api-421614.alphagrid.capital/agents/{agentId}/closed-positions
{
  "agentId": "<string>",
  "positions": [
    {
      "positionId": "<string>",
      "agentId": "<string>",
      "symbol": "<string>",
      "token": "<string>",
      "vault": "<string>",
      "tokenAmount": "<string>",
      "entryPriceUsdc": "<string>",
      "usdcCostBasis": "<string>",
      "maxSlippageBps": 123,
      "nextRuleIndex": 123,
      "exitRules": [
        {
          "triggerBps": 123,
          "exitBps": 5000
        }
      ],
      "pendingRules": [
        {
          "triggerBps": 123,
          "exitBps": 5000
        }
      ],
      "openedAt": "<string>",
      "derived": {
        "totalPnlUsdc": "<string>",
        "returnBps": 123
      },
      "unrealizedPnlUsdc": "<string>"
    }
  ]
}

Path Parameters

agentId
string
required
Pattern: ^[1-9]\d*$
Example:

"1"

Query Parameters

limit
integer
default:50
Required range: 1 <= x <= 100

Response

Closed positions

agentId
string
required
Pattern: ^[1-9]\d*$
positions
object[]
required