> ## Documentation Index
> Fetch the complete documentation index at: https://docs.argyros.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# SDK types reference

> Every type exported from @argyros/sdk — unions, config, quote, swap, and instructions.

All types exported from `@argyros/sdk`.

***

## Unions

### `SwapMode`

```typescript theme={"theme":"github-dark"}
type SwapMode = "ExactIn" | "ExactOut";
```

### `Chain`

```typescript theme={"theme":"github-dark"}
type Chain = "solana" | "fogo";
```

### `PriceImpactSeverity`

```typescript theme={"theme":"github-dark"}
type PriceImpactSeverity = "none" | "low" | "moderate" | "high" | "extreme";
```

***

## Configuration

### `SDKConfig`

```typescript theme={"theme":"github-dark"}
interface SDKConfig {
  apiKey: string;
  chain?: Chain;
  baseUrl?: string;
  timeout?: number;
  retries?: number;
}
```

***

## Quote

### `QuoteRequest`

```typescript theme={"theme":"github-dark"}
interface QuoteRequest {
  inputMint: string;
  outputMint: string;
  amount: string;
  swapMode: SwapMode;
  slippageBps?: number;
}
```

### `QuoteResponse`

```typescript theme={"theme":"github-dark"}
interface QuoteResponse {
  inputMint: string;
  outputMint: string;
  amountIn: string;
  amountOut: string;
  priceImpactBps: number;
  priceImpactPercent: string;
  priceImpactSeverity: PriceImpactSeverity;
  priceImpactWarning: string;
  feeBps: number;
  routes: RouteInfo[];
  routePath: string[];
  hopCount: number;
  otherAmountThreshold: string;
}
```

### `RouteInfo`

```typescript theme={"theme":"github-dark"}
interface RouteInfo {
  poolAddress: string;
  poolType: string;
  percent: number;
  inputMint: string;
  outputMint: string;
}
```

***

## Swap

### `SwapRequest`

```typescript theme={"theme":"github-dark"}
interface SwapRequest {
  userWallet: string;
  inputMint: string;
  outputMint: string;
  amount: string;
  swapMode: SwapMode;
  slippageBps?: number;
  skipSimulation?: boolean;
}
```

### `SwapResponse`

```typescript theme={"theme":"github-dark"}
interface SwapResponse {
  transaction: string;
  lastValidBlockHeight: number;
  amountIn: string;
  amountOut: string;
  minAmountOut?: string;
  maxAmountIn?: string;
  feeAmount: string;
  simulation?: SimulationResult;
  computeUnitsEstimate?: number;
  route: string[];
  hopCount: number;
  pools: string[];
  isSplitRoute?: boolean;
  splitPercents?: number[];
}
```

### `SimulationResult`

```typescript theme={"theme":"github-dark"}
interface SimulationResult {
  success: boolean;
  computeUnitsConsumed: number;
  computeUnitsTotal: number;
  logs: string[];
  error: string;
  slippageExceeded: boolean;
  insufficientFunds: boolean;
  accountsNeeded: string[];
}
```

***

## Instructions

### `InstructionsRequest`

```typescript theme={"theme":"github-dark"}
interface InstructionsRequest {
  userWallet: string;
  inputMint: string;
  outputMint: string;
  amount: string;
  swapMode: SwapMode;
  slippageBps?: number;
}
```

### `InstructionsResponse`

```typescript theme={"theme":"github-dark"}
interface InstructionsResponse {
  instructions: RawInstruction[];
  addressLookupTableAddresses: string[];
  amountIn: string;
  amountOut: string;
  otherAmountThreshold: string;
  feeAmount: string;
  hopCount: number;
  route: string[];
  pools: string[];
}
```

### `RawInstruction`

```typescript theme={"theme":"github-dark"}
interface RawInstruction {
  programId: string;
  accounts: RawAccountMeta[];
  data: string;
}
```

### `RawAccountMeta`

```typescript theme={"theme":"github-dark"}
interface RawAccountMeta {
  publicKey: string;
  isSigner: boolean;
  isWritable: boolean;
}
```

***

## Errors

### `ArgyrosError`

```typescript theme={"theme":"github-dark"}
class ArgyrosError extends Error {
  readonly statusCode: number;
  readonly body?: unknown;
}
```

### `BadRequestError`

```typescript theme={"theme":"github-dark"}
class BadRequestError extends ArgyrosError {} // statusCode: 400
```

### `AuthError`

```typescript theme={"theme":"github-dark"}
class AuthError extends ArgyrosError {} // statusCode: 401
```

### `NoRouteError`

```typescript theme={"theme":"github-dark"}
class NoRouteError extends ArgyrosError {} // statusCode: 404
```

### `RateLimitError`

```typescript theme={"theme":"github-dark"}
class RateLimitError extends ArgyrosError {} // statusCode: 429
```

### `ServerError`

```typescript theme={"theme":"github-dark"}
class ServerError extends ArgyrosError {} // statusCode: 500
```
