GET
/
v1
/
swaps
/
user
/
{userPublicKey}
Get User Swaps
curl --request GET \
  --url https://api.amm.flashnet.xyz/v1/swaps/user/{userPublicKey}
{
  "swaps": [
    {
      "amountIn": "1000000",
      "amountOut": "500000",
      "assetInAddress": "66471063147ab9f53515bf18d1cea9a8ad166840ba9de93d46018d7007426e17",
      "assetOutAddress": "020202020202020202020202020202020202020202020202020202020202020202",
      "createdAt": "2025-01-15T10:30:00Z",
      "feePaid": "5000",
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "inboundTransferId": "550e8400-e29b-41d4-a716-446655440001",
      "outboundTransferId": "550e8400-e29b-41d4-a716-446655440001",
      "poolAssetAAddress": "66471063147ab9f53515bf18d1cea9a8ad166840ba9de93d46018d7007426e17",
      "poolAssetBAddress": "020202020202020202020202020202020202020202020202020202020202020202",
      "poolLpPublicKey": "0315299b3f9f4e2beb8576ea2bf72ea1bc741eb255bfc3f6387de4d47b5c05972d",
      "price": "0.5"
    }
  ],
  "totalCount": 25
}

Path Parameters

userPublicKey
string
required

The public key of the user whose swaps to retrieve

Query Parameters

poolLpPubkey
string | null

Filter by pool LP public key.

assetInAddress
string | null

Filter by asset in token public key.

assetOutAddress
string | null

Filter by asset out token public key.

minAmountIn
integer | null

Minimum amount in.

maxAmountIn
integer | null

Maximum amount in.

startTime
string | null

Start timestamp (inclusive) in RFC3339 format.

endTime
string | null

End timestamp (inclusive) in RFC3339 format.

sort
enum<string>

Sort order for results.

Available options:
timestampDesc,
timestampAsc,
amountInDesc,
amountInAsc,
amountOutDesc,
amountOutAsc
limit
integer | null
default:20

Maximum number of swaps to return.

Required range: 1 <= x <= 100
offset
integer | null
default:0

Number of swaps to skip before starting to collect the result set.

Required range: x >= 0

Response

200
application/json

User swap history retrieved successfully

Response for listing user swaps