Solrouter
APISessions

Poll a swap session's state

Fetch the current state of any swap/balance session. Poll until `state` is `settled` (or `failed`).

GET
/agents/v1/sessions/{id}

Path Parameters

id*string

Response Body

application/json

application/json

curl -X GET "https://example.com/agents/v1/sessions/b3d9a1e2-5c4f-4a8b-9e7d-1f2a3b4c5d6e"
{
  "id": "b3d9a1e2-5c4f-4a8b-9e7d-1f2a3b4c5d6e",
  "mode": "oneshot",
  "state": "settled",
  "ephemeralPubkey": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
  "walletId": null,
  "fromMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "toMint": "So11111111111111111111111111111111111111112",
  "amountBaseUnits": "1000000",
  "actualOut": "6628113450",
  "destinationPubkey": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
  "fundingTxSig": "5h7Qw2KQz9oA3nP1cVxYtRb8sLmJ4dE6fGh9kU2wXcZ1aBpQ7rT3vN5mY8sD0fL2gH4jK6lM9nP1qR3sT5uV7w",
  "finalTxSig": "5h7Qw2KQz9oA3nP1cVxYtRb8sLmJ4dE6fGh9kU2wXcZ1aBpQ7rT3vN5mY8sD0fL2gH4jK6lM9nP1qR3sT5uV7w",
  "attestationPda": "AtStPdaXyZ1111111111111111111111111111111111"
}
{
  "error": "missing_required_fields"
}