Uniswap Get swap status
Retrieve swap status with the Uniswap API. The sample response includes status information. Use it in a transaction-routing workflow. The GET request schema also lists txHashes, userOpHashes, chainId. Use the response in a DeFi workflow for the selected protocol, and compare the request and response with the provider example.
- Selected price
- $0 / callPublished pricing
- Sellers / APIs
- 1 / 1
- Requests · 30d
- —Loading...
- Success rate · 30d
- —Loading...
Uniswap Get swap status
Prepare your request, then continue with your agent.
Selected price
$0 / call
- Provider
- Pricing
On this page
Playground
Run sends a real API request. Charges follow the published API contract.
Response structure
requestIdstringswapsobject[]statusstringswapTypestringtxHashstring
// Inferred from response examples. Fields are optional and other fields may be returned.
export type ApiResponse = {
requestId?: string;
swaps?: Array<{
status?: string;
swapType?: string;
txHash?: string;
}>;
};Sellers
| Seller | Pricing | Requests · 30d | Performance | Access |
|---|---|---|---|---|
uniswapCurrent Uniswap Get swap status · GET · View API reference | $0 / call | — | —successP50— |
- Unit price
- $0
Statistics use persisted gateway logs from the last 30 days up to now, including today.
Success rate = successful requests / all requests;
P50 = median latency of successful requests.
Prices reflect the published API contract. Contract revision: 5. Price update time: not supplied.
Total $0
API
- Method
- GET
- Endpoint
https://api.openany.si/v1/agent-apis/uniswap/v1/swaps- Content type
- application/json
- Authentication
Authorization: Bearer $OPENANY_API_KEY
curl \
'https://api.openany.si/v1/agent-apis/uniswap/v1/swaps?chainId=1&txHashes=0x1b2424a7e661a5376e7aa85efe868c6f8ce2037732d7d51d84505670d37dc69a' \
-X GET \
-H "Authorization: Bearer $OPENANY_API_KEY" \
-H 'Content-Type: application/json'Input parameters
Fields in this listing; additional options and input encoding can vary by provider.
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
txHashes | URL query parametersquery | string | No | On-chain transaction hashes. At least one of txHashes or userOpHashes must be provided. minLength: 1 |
userOpHashes | URL query parametersquery | string | No | ERC-4337 UserOperation hashes. At least one of txHashes or userOpHashes must be provided. minLength: 1 |
chainId | URL query parametersquery | number | No | Native chainId parameter. enum: 1, 10, 56, 130, 137, 143, 196, 324, 480, 1868, 4217, 4326, 4663, 5042, 8453, 10143, 42161, 42220, 43114, 57073, 59144, 81457, 7777777, 1301, 84532, 11155111 |
x-agent-info | Request headersheaders | string | No | Optional attribution hint for AI-agent traffic; send it if an AI agent built or operates your integration. The value is a JSON object with up to three fields: `decision_origin` (required, exactly `autonomous` or `human_mediated`, case-sensitive), `integration_name` (optional string naming your integration, e.g. `my-trading-bot`), and `version` (optional string identifying your integration's version). Any other key is dropped, never rejected. The raw value must be at most 1024 bytes of printable US-ASCII (`0x20`-`0x7E`), so send non-ASCII text as JSON `\u` escapes; `integration_name` and `version` are each limited to 256 UTF-16 code units and may not contain control characters, U+2028, U+2029, or U+FFFD. Send the header once: repeated header lines are joined with `, ` and the joined string is what gets parsed, so two complete objects fail as invalid JSON while a single object split across two lines still parses. The header is analytics-only and never affects the request: omitting it, sending it, or sending a value that fails these rules never changes the response status, body, or swap behavior. A value that fails to parse is dropped and reported by the `x-agent-info-status` response header. Never put a user ID, wallet address, email, session token, or API key in these fields. maxLength: 1024 |
Required markers inside a nested object or variant apply when that object or variant is used.
Sample response
Sample response · Documented HTTP 200 Published documentation example. Verify the actual response after an approved call.
{
"requestId": "6a142c1b4352c7109df2e62f0469b072",
"swaps": [
{
"status": "SUCCESS",
"swapType": "CLASSIC",
"txHash": "0x1b2424a7e661a5376e7aa85efe868c6f8ce2037732d7d51d84505670d37dc69a"
}
]
}Agent integration
Copy the resource contract without sharing an API key.
View API Markdown
# Uniswap Get swap status
Retrieve swap status with the Uniswap API. The sample response includes status information. Use it in a transaction-routing workflow. The GET request schema also lists txHashes, userOpHashes, chainId. Use the response in a DeFi workflow for the selected protocol, and compare the request and response with the provider example.
Documentation: https://openany.si/apis/3ee118ab-10f9-45d4-81bb-ce3ce0e66624
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/uniswap/v1/swaps
Price: $0 / call
Provider: uniswap
Contract revision: 5
Price source: OpenAny public API contract and documented provider unit rates. Price update time: not supplied.
Use OPENANY_API_KEY from the environment. API Key calls use your shared balance.
## Prepared request
```bash
curl \
'https://api.openany.si/v1/agent-apis/uniswap/v1/swaps?chainId=1&txHashes=0x1b2424a7e661a5376e7aa85efe868c6f8ce2037732d7d51d84505670d37dc69a' \
-X GET \
-H "Authorization: Bearer $OPENANY_API_KEY" \
-H 'Content-Type: application/json'
```
## API contract
```json
{
"resource_type": "api",
"name": "Uniswap Get swap status",
"endpoint": "https://api.openany.si/v1/agent-apis/uniswap/v1/swaps",
"method": "GET",
"content_type": "none",
"execution_mode": "sync",
"authentication": {
"type": "bearer",
"environment_variable": "OPENANY_API_KEY"
},
"inputs": [
{
"description": "On-chain transaction hashes. At least one of txHashes or userOpHashes must be provided.",
"location": "query",
"min_length": 1,
"name": "txHashes",
"nullable": false,
"required": false,
"type": "string"
},
{
"description": "ERC-4337 UserOperation hashes. At least one of txHashes or userOpHashes must be provided.",
"location": "query",
"min_length": 1,
"name": "userOpHashes",
"nullable": false,
"required": false,
"type": "string"
},
{
"description": "Native chainId parameter.",
"enum_values": [
"1",
"10",
"56",
"130",
"137",
"143",
"196",
"324",
"480",
"1868",
"4217",
"4326",
"4663",
"5042",
"8453",
"10143",
"42161",
"42220",
"43114",
"57073",
"59144",
"81457",
"7777777",
"1301",
"84532",
"11155111"
],
"location": "query",
"name": "chainId",
"nullable": false,
"required": false,
"type": "number"
},
{
"description": "Optional attribution hint for AI-agent traffic; send it if an AI agent built or operates your integration. The value is a JSON object with up to three fields: `decision_origin` (required, exactly `autonomous` or `human_mediated`, case-sensitive), `integration_name` (optional string naming your integration, e.g. `my-trading-bot`), and `version` (optional string identifying your integration's version). Any other key is dropped, never rejected. The raw value must be at most 1024 bytes of printable US-ASCII (`0x20`-`0x7E`), so send non-ASCII text as JSON `\\u` escapes; `integration_name` and `version` are each limited to 256 UTF-16 code units and may not contain control characters, U+2028, U+2029, or U+FFFD. Send the header once: repeated header lines are joined with `, ` and the joined string is what gets parsed, so two complete objects fail as invalid JSON while a single object split across two lines still parses. The header is analytics-only and never affects the request: omitting it, sending it, or sending a value that fails these rules never changes the response status, body, or swap behavior. A value that fails to parse is dropped and reported by the `x-agent-info-status` response header. Never put a user ID, wallet address, email, session token, or API key in these fields.",
"location": "header",
"max_length": 1024,
"name": "x-agent-info",
"nullable": false,
"required": false,
"type": "string"
}
],
"billing": {
"currency": "USD",
"mode": "fixed",
"priceMicroUsd": "0",
"rounding": null,
"unit": "call",
"unitQuantity": null
},
"examples": [
{
"http_status": 200,
"name": "swap",
"request": {
"body": {},
"headers": {},
"path": {},
"query": {
"chainId": "1",
"txHashes": "0x1b2424a7e661a5376e7aa85efe868c6f8ce2037732d7d51d84505670d37dc69a"
}
},
"response_body": {
"requestId": "6a142c1b4352c7109df2e62f0469b072",
"swaps": [
{
"status": "SUCCESS",
"swapType": "CLASSIC",
"txHash": "0x1b2424a7e661a5376e7aa85efe868c6f8ce2037732d7d51d84505670d37dc69a"
}
]
}
}
]
}
```Error handling
| Status | Next step |
|---|---|
400 | Check the offering and request fields. |
401 / 403 | Verify your credentials and access permissions. |
402 | Inspect the selected access mode and returned payment requirements. |
429 | Respect the returned rate limit and retry guidance. |
5xx | Inspect the error and usage record before retrying a paid operation. |
Examples
swap
Published documentation example. Verify the actual response after an approved call.
Prepare your environment
Use a terminal with cURL installed.
Use an OpenAny API key with shared-balance access. Confirm availability and price before running; a call may charge your balance.
Set the key in your terminal using the hidden prompt below. Keep its value out of source files and logs.
Terminal · macOS / Linuxprintf 'OpenAny API key: ' read -r -s OPENANY_API_KEY export OPENANY_API_KEY printf '\n'Run the request
Paste the complete command below into your terminal.
Values to replace before running 4
Review these request fields before running. Keep the published provider and request method unchanged.
txHashes- On-chain transaction hashes. At least one of txHashes or userOpHashes must be provided.
userOpHashes- ERC-4337 UserOperation hashes. At least one of txHashes or userOpHashes must be provided.
chainId- Native chainId parameter.
x-agent-info- Optional attribution hint for AI-agent traffic; send it if an AI agent built or operates your integration. The value is a JSON object with up to three fields: `decision_origin` (required, exactly `autonomous` or `human_mediated`, case-sensitive), `integration_name` (optional string naming your integration, e.g. `my-trading-bot`), and `version` (optional string identifying your integration's version). Any other key is dropped, never rejected. The raw value must be at most 1024 bytes of printable US-ASCII (`0x20`-`0x7E`), so send non-ASCII text as JSON `\u` escapes; `integration_name` and `version` are each limited to 256 UTF-16 code units and may not contain control characters, U+2028, U+2029, or U+FFFD. Send the header once: repeated header lines are joined with `, ` and the joined string is what gets parsed, so two complete objects fail as invalid JSON while a single object split across two lines still parses. The header is analytics-only and never affects the request: omitting it, sending it, or sending a value that fails these rules never changes the response status, body, or swap behavior. A value that fails to parse is dropped and reported by the `x-agent-info-status` response header. Never put a user ID, wallet address, email, session token, or API key in these fields.
Terminal · cURLcurl \ 'https://api.openany.si/v1/agent-apis/uniswap/v1/swaps?chainId=1&txHashes=0x1b2424a7e661a5376e7aa85efe868c6f8ce2037732d7d51d84505670d37dc69a' \ -X GET \ -H "Authorization: Bearer $OPENANY_API_KEY" \ -H 'Content-Type: application/json'Check the response
Sample response · Documented HTTP 200
Sample response{ "requestId": "6a142c1b4352c7109df2e62f0469b072", "swaps": [ { "status": "SUCCESS", "swapType": "CLASSIC", "txHash": "0x1b2424a7e661a5376e7aa85efe868c6f8ce2037732d7d51d84505670d37dc69a" } ] }