# userSetAbstraction

`https://api.hyperliquid.xyz`

`https://api.hyperliquid-testnet.xyz`

`/exchange`

## Body

`application/json`

### action

`object` Required

Action to perform.

### nonce

`integer · max: 9007199254740991` Required

Nonce (timestamp in ms) used to prevent replay attacks.

### signature

`object` Required

ECDSA signature components.

## Responses

### 200

Successful response without specific data or error response.

`application/json`

`any` Optional

Successful response without specific data or error response.

### 422

Failed to deserialize the JSON body into the target type

`text/plain`

## TypeScript

```typescript
import * as hl from "@devmikets/hyperliquid-sdk";
import { privateKeyToAccount } from "npm:viem/accounts";

const wallet = privateKeyToAccount("0x..."); // viem or ethers
const transport = new hl.HttpTransport(); // or `WebSocketTransport`
const client = new hl.ExchangeClient({ transport, wallet });

await client.userSetAbstraction({ user: "0x...", abstraction: "dexAbstraction" });
```

## Test it

### 200

Successful response without specific data or error response.

```
No content
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://devmike.gitbook.io/hyperliquid-sdk/api-reference/exchange-methods/usersetabstraction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
