> For the complete documentation index, see [llms.txt](https://docs.proxima.one/proxima/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.proxima.one/proxima/streams/our-streams/dex-events.md).

# DEX events

### `proxima.{dex}.{network}.gen-dex-amm.1_0`

Events happening on decentralized exchanges like Uniswap, Quickswap, etc.

#### TypeScript schema:

```typescript
export type GeneralizedAmmDexEvent =
  NewAmmDex |
  NewPool |
  PoolUpdate;

export interface BlockchainEventBase extends JsonObject {
  ref?: TxRef;
}

export interface NewAmmDex extends BlockchainEventBase {
  type: "newDex";

  dex: AmmDex;
}

export interface NewPool extends BlockchainEventBase {
  type: "newPool";

  pool: Pool;
  dexId: AmmDexId;
  state: PoolState;
}

export interface PoolUpdate extends BlockchainEventBase {
  type: "poolUpdate";

  dexId: AmmDexId;
  poolId: PoolId;
  oldState: PoolState;
  newState: PoolState;
  event?: PoolEvent;
}

export interface PoolState extends JsonObject {
  liquidity: Amount[];
  priceWeights?: Amount[];
}

export type PoolEvent = SwapEvent | MintEvent | BurnEvent | undefined;

export interface SwapEvent extends JsonObject {
  type: "swap";
  amounts: Amount[];
}

export interface MintEvent extends JsonObject {
  type: "mint";
  lpTransfers?: Transfer[];
}

export interface BurnEvent extends JsonObject {
  type: "burn";
  lpTransfers?: Transfer[];
}


export interface AmmDex extends JsonObject {
  id: AmmDexId;
  network: Network;
  displayName: string;
  protocol: AmmDexProtocol | string;
}

export type AmmDexProtocol = "uniswap2" | "uniswap3";

export interface Network extends JsonObject {
  name: string;
  chainId?: number;
}

export interface Pool extends JsonObject {
  id: PoolId;
  assets: Asset[];
  lp?: Asset;
}

export type TxRef = Partial<Omit<TxRefBase, "chain">>;

export interface Transfer extends JsonObject {
  from?: UserId;
  to: UserId;
  value: Amount;
}

export type UserId = Address;
export type PoolId = Address;
export type AmmDexId = string;
export type Asset = Address;
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.proxima.one/proxima/streams/our-streams/dex-events.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
