# Data types (v1)

> The enums, shared objects, address formats and amounts used across API v1.

> API v1 is deprecated. It stays supported, but new integrations should use the [Khalani API](/). See [Migrate to v2](/v1/migrate/).

## Enums

All values are literal strings, compared case-sensitively.

### TradeType

| Value | Meaning |
|---|---|
| `EXACT_INPUT` | `amount` is what the user sends. The output varies. |
| `EXACT_OUTPUT` | `amount` is what the user receives. The input varies. |

### Route ids

| `routeId` | Route |
|---|---|
| `Hyperstream` | The native route. |
| `HyperstreamUTXO` | The native route for trades with TRON or Bitcoin on either side. |
| `Across` | Across. |
| `DeBridge` | deBridge. |
| `Glacis` | Glacis. |

### FillerType

The route's `type`, also the order's `type`.

| Value | Routes |
|---|---|
| `native-filler` | `Hyperstream` |
| `liquidity-router` | `HyperstreamUTXO` |
| `external-intent-router` | `Across`, `DeBridge`, `Glacis` |
| `aggregator-router` | Defined in the schema. No route uses it today. |

### FillerProvider

The `provider` in an order's `providerStatus`.

| Value | Provider |
|---|---|
| `hyperstream` | The native route. |
| `across` | Across. |
| `debridge` | deBridge. |
| `glacis` | Glacis. |

### OrderStatus

| Value | Meaning | Final |
|---|---|---|
| `created` | The order exists; the route has not reported deposit progress yet. | No |
| `deposited` | The route reports deposit progress. Source-chain confirmation depends on the route. | No |
| `published` | The order is visible to fillers. | No |
| `filled` | The user received the output on the destination chain. | Yes |
| `refund_pending` | Native route only. The intent was cancelled or expired; waiting for the cross-chain refund message to be delivered. | No |
| `refunded` | The deposit was returned on the source chain. | Yes |
| `failed` | The order cannot complete. | Yes |

`deposited` can include deposits still awaiting confirmation, including on Bitcoin and TRON. See [Order statuses](/v1/reference/orders/#statuses) before using it as evidence of source-chain finality.

### ExactOutMethod

How a route handles `EXACT_OUTPUT`.

| Value | Meaning |
|---|---|
| `native` | The route quotes exact output directly. |
| `adaptive` | The route quotes exact input only, so the API searches for the input that gives the requested output. Glacis uses this. |

### RouteTag

| Value | Meaning |
|---|---|
| `1-click` | No approval needed. The deposit is one transaction. |
| `needs-approval` | A token approval comes before the deposit. |

### DepositMethod

| Value | Meaning |
|---|---|
| `CONTRACT_CALL` | The wallet runs actions that call a deposit contract. Every route offers it, except for TRON and Bitcoin sources. |
| `TRANSFER` | A plain transfer to a deposit address, from any wallet. The native route offers it on some EVM source chains. |
| `TRANSFER_WITH_TX_HASH_SUBMIT` | A plain transfer to a deposit address on TRON or Bitcoin, followed by a submit of its hash. `HyperstreamUTXO` uses it for those sources. |
| `PERMIT2` | Defined in the schema, but no route offers it. Asking for it returns `400 NotSupportedDepositMethodException`. |

### ChainType

| Value | Chains |
|---|---|
| `eip155` | EVM chains. |
| `solana` | Solana. |
| `tron` | TRON. |
| `bitcoin` | Bitcoin. |

## Shared objects

### Error

```json
{
  "message": "Quote(quoteId: 3f6c2a1e-8b4d-4e7a-9c15-2d0b7e9a4f61, routeId: Hyperstream) not found",
  "name": "QuoteNotFoundException",
  "details": { "quoteId": "3f6c2a1e-8b4d-4e7a-9c15-2d0b7e9a4f61", "routeId": "Hyperstream", "code": 0 }
}
```

| Field | Type | Description |
|---|---|---|
| `message` | string | Human-readable. |
| `name` | string | The exception. Branch on it. |
| `details` | object or array | Optional. Hidden on some exceptions. |

On validation errors, `details` is a list of issues:

```json
{
  "message": "Validation failed",
  "name": "ValidationException",
  "details": [{ "field": "q", "message": "Invalid input: expected string, received undefined", "code": "invalid_type" }]
}
```

Rate limits (`429`, `{ errorCode, message }`) and the by-id `404` (plain text) use other shapes. See [Handling exceptions](/v1/handling-exceptions/) for every name and status.

### TokenMeta

The `fromTokenMeta` and `toTokenMeta` of an order.

| Field | Type | Description |
|---|---|---|
| `symbol` | string | Token symbol. |
| `decimals` | integer | Token decimals on that chain. |
| `logoURI` | string or null | Icon URL. |

### TransactionInfo

An entry of an order's `transactions`: `deposit`, `fill` or `refund`.

| Field | Type | Description |
|---|---|---|
| `timestamp` | string | ISO 8601. |
| `txHash` | string | The transaction hash. |
| `chainId` | integer | The chain it is on. |
| `amount` | string | Optional. The amount moved, in base units. |

### ProviderStatus

| Field | Type | Description |
|---|---|---|
| `provider` | string | A [FillerProvider](#fillerprovider) value. |
| `nativeStatus` | string | The provider's raw status. Opaque: show it in support tools, but do not build logic on it. |
| `substatus` | string | Optional. More provider detail. |
| `metadata` | object | Optional. Provider-specific data. |

## Address formats

| Chain | Format | Example |
|---|---|---|
| EVM | `0x` and 40 hex characters. Lowercase, or a valid EIP-55 checksum: other mixed case fails validation. | `0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48` |
| Solana | Base58, 32 to 44 characters. | `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v` |
| TRON | Base58, starting with `T`. | `TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t` |
| Bitcoin | Bech32 (`bc1…`) or base58 (`1…`, `3…`). | |
| CKB | `ckb1…`. | |
| Stellar | A Stellar account address (`G…`). | |

Quote fields and `GET /v1/orders/{address}` accept any of these. `referrer` and `filler` must be EVM addresses.

Use token addresses as `GET /v1/tokens` lists them. It writes an EVM chain's native token as `0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee`. The API also recognizes the zero address as the native token on EVM chains, and `11111111111111111111111111111111` on Solana.

## Transaction hash formats

| Chain | Format |
|---|---|
| EVM | `0x` and 64 hex characters. |
| Solana | A base58 signature, 87 or 88 characters. |
| TRON, Bitcoin | 64 hex characters. Submit it without `0x`. |

## Amounts

Every amount is a string of integer base units: the token's smallest unit, with no decimal point. Never send a JSON number.

| Token | Decimals | Amount | In the API |
|---|---|---|---|
| USDC | 6 | 100 | `"100000000"` |
| ETH | 18 | 1.5 | `"1500000000000000000"` |
| WBTC | 8 | 0.5 | `"50000000"` |

The quote's `amount` also accepts `0x` hex: `"0x5f5e100"` equals `"100000000"`. Read `decimals` per chain from the token list, because the same token can have different decimals on different chains.
