# Program ABI

The objective of this page is to give a brief overview of the Zeta Cross Program Invocation (CPI) interface. For a more detailed view please refer to the[ Github Repository](https://github.com/zetamarkets/zeta-abi).

### Cross Program Invocations

#### Instructions

The instructions currently supported are as follows:

The instructions currently supported are as follows:

* `initialize_cross_margin_account` - create and initialize a user's margin account
* `initialize_cross_margin_account_manager` - create and initialize a user's margin account manager
* `initialize_open_orders_v3` - create and initialize user's open orders account
* `deposit_v2` - deposit USDC collateral into the margin account
* `withdraw_v2` - withdraw USDC collateral from the margin account
* `place_perp_order_v3` - place a perp order of (price, size, side) on the relevant market
* `cancel_order_xxx` - collection of order cancellation functions, by orderId, clientOrderId, market, etc
* `close_open_orders` - close open orders account
* `liquidate_v2` - trigger liquidation

#### Accounts

The accounts and relevant data that is currently supported (non-exhaustive):

* `State` - contains global parameters relating to all markets
  * Fee percentages
  * Admin pubkeys
  * Platform limits
  * Halt state
* `Pricing` - global mark prices, pricing params and funding information
  * Mark Prices
  * Funding rates
  * Perp and margin params
* `CrossMarginAccount` - individual user margin accounts
  * Balance
  * Positions
  * Orders

For a more detailed view please refer to the [Github Repository](https://github.com/zetamarkets/zeta-abi).

### Ready to start trading?

[Start trading now!](https://dex.zeta.markets?utm_source=gitbook\&utm_campaign=Program_ABI\&utm_term=cta)


---

# 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://docs.zeta.markets/build-with-zeta/program-abi.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.
